diff --git a/ChromePhp.php b/ChromePhp.php index 577b1ce..b42deba 100755 --- a/ChromePhp.php +++ b/ChromePhp.php @@ -78,11 +78,6 @@ class ChromePhp */ const TABLE = 'table'; - /** - * @var string - */ - protected $_php_version; - /** * @var int */ @@ -131,8 +126,7 @@ class ChromePhp */ private function __construct() { - $this->_php_version = phpversion(); - $this->_timestamp = $this->_php_version >= 5.1 ? $_SERVER['REQUEST_TIME'] : time(); + $this->_timestamp = $_SERVER['REQUEST_TIME']; $this->_json['request_uri'] = $_SERVER['REQUEST_URI']; } @@ -317,16 +311,8 @@ protected function _convert($object) continue; } $type = $this->_getPropertyKey($property); - - if ($this->_php_version >= 5.3) { - $property->setAccessible(true); - } - - try { - $value = $property->getValue($object); - } catch (ReflectionException $e) { - $value = 'only PHP 5.3 can access private/protected properties'; - } + $property->setAccessible(true); + $value = $property->getValue($object); // same instance as parent object if ($value === $object || in_array($value, $this->_processed, true)) { diff --git a/composer.json b/composer.json index dc16853..c6b3b37 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": ">=5.0.0" + "php": ">=7.0" }, "autoload": { "psr-0": {