3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "credit_card": { "cvc": "123", "expiry": { "month": "12", "year": "2019" }, "name": "Julian", "number": "5123450000000008", "token": null }, "amount": "10", "currency": "AUD", "gateway": { "line_of_business": "eWallet", "service": "default", "username": null }, "external_id": "my external id", "reference": "julian test", "remitter_name": null, "request_id": "1529561070", "statement_description": null, "security_id": null }'; $array = json_decode($json, true); function test_print($item, $key) { echo "$key holds $item\n"; } array_walk_recursive($array, 'test_print');
Output for 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.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
cvc holds 123 month holds 12 year holds 2019 name holds Julian number holds 5123450000000008 token holds amount holds 10 currency holds AUD line_of_business holds eWallet service holds default username holds external_id holds my external id reference holds julian test remitter_name holds request_id holds 1529561070 statement_description holds security_id holds

preferences:
143.95 ms | 403 KiB | 159 Q