3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class bob{ public __construct(){ $args= array(1,2,3,4); } public $args; public $something = 2; } $b = new bob(); echo json_encode ($b); ?>
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected '__construct' (T_STRING), expecting variable (T_VARIABLE) in /in/Bnv7D on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/Bnv7D on line 4
Process exited with code 255.