3v4l.org - online PHP & HHVM shell, execute code in 100+ different versions!

<?php // https://bugs.php.net/bug.php?id=18556 // Set language to desired language $g_lang = 'tr_TR'; putenv("LANG=$g_lang"); if (setlocale(LC_ALL, $g_lang) === false) { throw new Exception('Setting locale failed.'); } class InfoBlob { public $foo; function InfoBlob() { $this->foo = "Foo"; } } echo ('Instantiating an infoBlob with a lowercase i<br>'); $foobar = new infoBlob(); echo ($foobar->foo); echo ('<br>Instantiating an InfoBlob with an uppercase I<br>'); $foobar = new InfoBlob(); echo ($foobar->foo);
Output for hhvm-3.0.1 - 3.2.0
Fatal error: Uncaught exception 'Exception' with message 'Setting locale failed.' in /in/MOO5Y:11 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.0.0 - 5.0.2, 5.0.5 - 5.6.0, php7@20140507 - 20140901
Fatal error: Uncaught exception 'Exception' with message 'Setting locale failed.' in /in/MOO5Y:11 Stack trace: #0 {main} thrown in /in/MOO5Y on line 11
Process exited with code 255.
Output for 5.0.3 - 5.0.4
Fatal error: Uncaught exception 'Exception' with message 'Setting locale failed.' in /in/MOO5Y:11 Stack trace: #0 /in/MOO5Y(11): unknown() #1 {main} thrown in /in/MOO5Y on line 11
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/MOO5Y on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/MOO5Y on line 11
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/MOO5Y on line 11
Process exited with code 255.