3v4l.org

run code in 300+ PHP versions simultaneously
<?php $base = json_decode( '{ "Username": { "125678": { "date": "123456", "status": "paid", "amount": 1000, "system": "ABX" }, "1201": { "date": "123456", "status": "paid", "amount": 1000, "system": "ABX" }, "1345": { "date": "123456", "status": "paid", "amount": 1000, "system": "ADB" } } }', true); foreach ($base as $username => $userobjects) { echo "<h1>User: " . $username . "</h1>"; foreach ($userobjects as $objectkey => $objectvalue) { echo "<h2>Object id=" . $objectkey . ":</h2>"; echo "<pre>" . print_r($objectvalue, true) . "</pre>"; } }
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<h1>User: Username</h1><h2>Object id=125678:</h2><pre>Array ( [date] => 123456 [status] => paid [amount] => 1000 [system] => ABX ) </pre><h2>Object id=1201:</h2><pre>Array ( [date] => 123456 [status] => paid [amount] => 1000 [system] => ABX ) </pre><h2>Object id=1345:</h2><pre>Array ( [date] => 123456 [status] => paid [amount] => 1000 [system] => ADB ) </pre>

preferences:
147.24 ms | 403 KiB | 121 Q