3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $prop1=1, $prop2=2,$prop3=3,$prop4=4; private $prop1=11, $prop2=22,$prop3=33,$prop4=44; protected $prop1=111, $prop2=222,$prop3=333,$prop4=444; } $t = new Test; echo count( (array) $t);
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
Fatal error: Cannot redeclare Test::$prop1 in /in/7WhYH on line 4
Process exited with code 255.

preferences:
184.82 ms | 1395 KiB | 65 Q