3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class first { protected $someArray = array(); } class second extends first { protected $someValue = null; protected $someArray = array(); protected $someValue = null; public function __construct($someValue) { $this->someValue = $someValue; } } $objFirst = new second('123'); $objSecond = new second('321'); var_dump ($objFirst == $objSecond); $dummy = print_r($objFirst); var_dump ($objFirst == $objSecond);
Output for 5.3.0 - 5.4.23
Fatal error: Cannot redeclare second::$someValue in /in/oUCsq on line 13
Process exited with code 255.