3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected static $bla = array('bla' => 'alex'); public function getBla() { return self::$bla; } } class TestChild extends Test { protected $bla = array('alex' => 'bla'); public function getBla() { var_dump(parent::getBla()); } } $test = new TestChild(); $test->getBla();
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
Fatal error: Cannot redeclare static Test::$bla as non static TestChild::$bla in /in/LmkUY on line 21
Process exited with code 255.

preferences:
191.86 ms | 1395 KiB | 65 Q