3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataStr = '[ { "id": "bitcoin", "name": "Bitcoin", "symbol": "BTC", "rank": "1", "price_usd": "7598.02", "price_btc": "1.0", "24h_volume_usd": "5106040000.0", "market_cap_usd": "128754238591", "available_supply": "16945762.0", "total_supply": "16945762.0", "max_supply": "21000000.0", "percent_change_1h": "0.01", "percent_change_24h": "-5.69", "percent_change_7d": "-14.2", "last_updated": "1522317867", "price_eur": "6162.0702002", "24h_volume_eur": "4141049500.4", "market_cap_eur": "104420975040" }, { "id": "ethereum", "name": "Ethereum", "symbol": "ETH", "rank": "2", "price_usd": "415.793", "price_btc": "0.0552943", "24h_volume_usd": "1521500000.0", "market_cap_usd": "40949398071.0", "available_supply": "98485059.0", "total_supply": "98485059.0", "max_supply": null, "percent_change_1h": "-1.02", "percent_change_24h": "-9.97", "percent_change_7d": "-24.69", "last_updated": "1522317854", "price_eur": "337.21228093", "24h_volume_eur": "1233951715.0", "market_cap_eur": "33210371330.0" } ]'; $data = json_decode($dataStr, true); foreach($data as $val){ echo "\n".$val['24h_volume_eur']; }
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 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.19, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7
4141049500.4 1233951715.0
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 4141049500.4 1233951715.0

preferences:
117.95 ms | 402 KiB | 289 Q