3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stuff = '{ "input": { "is_tall": [ "BOOLEAN", false ], "profile": { "fav_color": [ "STRING", true ], "sport": [ "STRING", true ] }, "awesome": "BOOLEAN" } }'; $what = json_decode($stuff); //var_dump($what); echo "is is_tall an array???<br>"; echo is_array($what->'is_tall')."<br><br>"; echo "is profile an array???<br>"; echo is_array($what['profile'])."<br><br>";
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected ''is_tall'' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/mdVj4 on line 27
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '{' or '$' in /in/mdVj4 on line 27
Process exited with code 255.

preferences:
183.41 ms | 1395 KiB | 67 Q