3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements Countable { private $a = array($prop1, $prop2,$prop3,$prop4); public function count(){ return count($a); } $t = new Test; echo count($t);
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '$prop1' (T_VARIABLE), expecting ')' in /in/2OSvB on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting ')' in /in/2OSvB on line 3
Process exited with code 255.

preferences:
183.4 ms | 1395 KiB | 65 Q