3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class myClass { } $obj = new myClass; $obj->color = function( $flower ){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$flower]; }; for ($flower = "rose"; $flower != "daisy"; $flower = "violet"){ if ($flower == "rose" || $flower == "violet"){ echo "{$flower}s are ",($obj->color)($flower),"\n"; } if ($flower == "violet"){ $flower = 'daisy'; } }
based on GFWXs
Output for 7.0.0 - 7.0.2
roses are red violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are blue violets are
Process exited with code 137.
Output for 5.5.0 - 5.6.17
Parse error: syntax error, unexpected '(', expecting ',' or ';' in /in/n5mJ6 on line 16
Process exited with code 255.