| 1 | <? |
||
| 8 | class FileContent { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $content; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var boolean |
||
| 17 | */ |
||
| 18 | private $isChanged = false; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string|null |
||
| 22 | */ |
||
| 23 | private $initialContentHashSum = null; |
||
| 24 | |||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $content |
||
| 28 | */ |
||
| 29 | public function __construct($content) { |
||
| 33 | |||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $content |
||
| 37 | * @void |
||
| 38 | */ |
||
| 39 | public function set($content) { |
||
| 42 | |||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function get() { |
||
| 50 | |||
| 51 | |||
| 52 | /** |
||
| 53 | * @return boolean |
||
| 54 | */ |
||
| 55 | public function isChanged() { |
||
| 58 | |||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | private function getContentHash() { |
||
| 66 | |||
| 67 | |||
| 68 | } |
Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.
As a precaution to avoid these problems better use the long opening tag
<?php.