3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(php_uname('s')); $base_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR; file_put_contents($base_dir . 'Baz.php', "<?php namespace Foo\Bar; class BAZ {}"); file_put_contents($base_dir . 'Buz.php', "<?php namespace Foo\Bar; class Buz {}"); file_get_contents("require_once 'https://raw.github.com/php-fig/fig-standards/master/accepted/PSR-4-autoloader-examples.md';") $c1 = new \Foo\Bar\Baz(); $c2 = new \Foo\Bar\BAZ(); var_dump($c1 == $c2); $c3 = new \Foo\Bar\BUZ(); $c4 = new \Foo\Bar\Buz(); var_dump($c3 == $c4);
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '$c1' (T_VARIABLE) in /in/gV8Ee on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/gV8Ee on line 13
Process exited with code 255.