3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test{ public static $some_array = array( 'one' => '1', 'two' => '22', 'three' => '333', ); public function __construct() { $this->doIt(); } public function doIt() { var_dump(self::$some_array); } } $a = new test(); $a::someArray = array("poop","pee"); $a->doIt();
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.24, 5.5.0 - 5.5.8
Parse error: syntax error, unexpected '=' in /in/tAEN0 on line 24
Process exited with code 255.

preferences:
181.16 ms | 1395 KiB | 70 Q