3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $profile = [ 'person' => [ 'name' => 'Jim DeLois', 'address' => [ 'street' => '400 Central Park West', 'citiy' => 'New York', 'state' => 'NY', 'zip' => 10025 ], 'pets' => [] ] ]; var_dump( json_decode( json_encode( $profile )));
Output for 7.0.0 - 7.2.0
object(stdClass)#3 (1) { ["person"]=> object(stdClass)#1 (3) { ["name"]=> string(10) "Jim DeLois" ["address"]=> object(stdClass)#2 (4) { ["street"]=> string(21) "400 Central Park West" ["citiy"]=> string(8) "New York" ["state"]=> string(2) "NY" ["zip"]=> int(10025) } ["pets"]=> array(0) { } } }
Output for 5.4.0 - 5.6.28
object(stdClass)#1 (1) { ["person"]=> object(stdClass)#2 (3) { ["name"]=> string(10) "Jim DeLois" ["address"]=> object(stdClass)#3 (4) { ["street"]=> string(21) "400 Central Park West" ["citiy"]=> string(8) "New York" ["state"]=> string(2) "NY" ["zip"]=> int(10025) } ["pets"]=> array(0) { } } }