3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $j1 = '{ "title": "Example Schema", "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "age": { "description": "Age in years", "type": "integer", "minimum": 0 } }, "required": ["firstName", "lastName"] }'; $d1 = json_decode($j1); print_r($d1);
based on OcqAa
Output for 5.2.0 - 7.2.0
stdClass Object ( [title] => Example Schema [type] => object [properties] => stdClass Object ( [firstName] => stdClass Object ( [type] => string ) [lastName] => stdClass Object ( [type] => string ) [age] => stdClass Object ( [description] => Age in years [type] => integer [minimum] => 0 ) ) [required] => Array ( [0] => firstName [1] => lastName ) )
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/Ho9as on line 21
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/Ho9as on line 21
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/Ho9as on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/Ho9as on line 21