3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tags = array("art", "emotion"); $serialized = serialize($tags); $deserialized = unserialize($serialized); echo $serialized. "\n"; echo $deserialized[0]. "\n"; $json = '{ "success": { "total": 1 }, "contents": { "quotes": [ { "quote": "The artist is a receptacle for the emotions that come from all over the place: from the sky, from the earth, from a scrap of paper, from a passing shape, from a spiders web.", "length": "174", "author": "Pablo Picasso", "tags": [ "art", "artist", "emotion" ], "category": "art", "date": "2017-04-12", "permalink": "https://theysaidso.com/quote/MO7LGV07dZujWjUR2_WCXQeF/pablo-picasso-the-artist-is-a-receptacle-for-the-emotions-that-come-from-all-ove", "title": "Art quote of the day ", "background": "https://theysaidso.com/img/qod/fractal_arabesque_loops.jpg", "id": "MO7LGV07dZujWjUR2_WCXQeF" } ], "copyright": "2017-19 theysaidso.com" } }'; //echo $json."\n"; $jsonObject = json_decode($json); echo var_dump($jsonObject->{"success"}); echo "-----------------------------------";
based on kuLmD
Output for 7.0.0 - 7.3.0rc3
a:2:{i:0;s:3:"art";i:1;s:7:"emotion";} art object(stdClass)#1 (1) { ["total"]=> int(1) } -----------------------------------
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3
a:2:{i:0;s:3:"art";i:1;s:7:"emotion";} art object(stdClass)#2 (1) { ["total"]=> int(1) } -----------------------------------