3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace php { class test { public function __construct() { echo "cool"; } } class RussianРусский { public function __construct() { echo "Unicode :("; } } } namespace { $obj = new \Php\test(); // ok $obj = new \php\tEst(); // ok $obj = new \Php\RussianРусский(); // ok $obj = new \Php\RussianРуССкий(); // WTF, unicode... }
based on QXjdW
Output for 7.0.0 - 7.2.6
coolcoolUnicode :( Fatal error: Uncaught Error: Class 'Php\RussianРуССкий' not found in /in/ia0pc:20 Stack trace: #0 {main} thrown in /in/ia0pc on line 20
Process exited with code 255.
Output for 5.3.0 - 5.6.28
coolcoolUnicode :( Fatal error: Class 'Php\RussianРуССкий' not found in /in/ia0pc on line 20
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/ia0pc on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/ia0pc on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ia0pc on line 2
Process exited with code 255.