3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Some { public function __construct() { echo "construct called"; }; public function __destruct() { echo "destruct called"; }; } $a = new Some(); //unset($a);
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected ';', expecting function (T_FUNCTION) in /in/4pO14 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /in/4pO14 on line 5
Process exited with code 255.

preferences:
198.4 ms | 1386 KiB | 53 Q