3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Exception, Awesome; namespace Awesome/Stuff; class bad_class extends Awesome{ const camelCase = 'abc'; $awesome = 'unvisible', $_great = 'fabulous'; function Do_something_snaked_cased(){ // This is one really frigging long line. I wonder if PHP-CS-Fixer will trim this really frigging long line? It says no hard limit so I think it won't. if( isset ($abc) || TRUE ) { // do stuff } } final static public function woop() {} function _invisible( $stuff = [] , $other_stuff ) { switch($stuff) { case 0: echo 'stuff'; break; } } } ?>
Output for 5.4.0 - 5.4.35
Warning: The use statement with non-compound name 'Exception' has no effect in /in/KXRJX on line 3 Warning: The use statement with non-compound name 'Awesome' has no effect in /in/KXRJX on line 3 Parse error: syntax error, unexpected '/', expecting \\ (T_NS_SEPARATOR) or ';' or '{' in /in/KXRJX on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Warning: The use statement with non-compound name 'Exception' has no effect in /in/KXRJX on line 3 Warning: The use statement with non-compound name 'Awesome' has no effect in /in/KXRJX on line 3 Parse error: syntax error, unexpected '/', expecting T_NS_SEPARATOR or ';' or '{' in /in/KXRJX on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/KXRJX on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/KXRJX on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_CONSTANT_ENCAPSED_STRING' or `'('' in /in/KXRJX on line 3
Process exited with code 255.

preferences:
229.29 ms | 1399 KiB | 125 Q