3v4l.org

run code in 300+ PHP versions simultaneously
<?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 "-----------------------------------";
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
a:2:{i:0;s:3:"art";i:1;s:7:"emotion";} art object(stdClass)#1 (1) { ["total"]=> int(1) } -----------------------------------
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 a:2:{i:0;s:3:"art";i:1;s:7:"emotion";} art object(stdClass)#1 (1) { ["total"]=> int(1) } -----------------------------------

preferences:
160.94 ms | 402 KiB | 171 Q