3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = ' [ { "ID":"109", "PROPERTY_70":{ "194":"Текст 1" } }, { "ID":"110", "PROPERTY_70":{ "118":"Текст 2" } } ]'; foreach (json_decode($json, true) as $item) { // 1 echo array_values($item['PROPERTY_70'])[0] . PHP_EOL; // 2 echo end($item['PROPERTY_70']) . PHP_EOL; // 3 echo array_shift($item['PROPERTY_70']) . PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
Текст 1 Текст 1 Текст 1 Текст 2 Текст 2 Текст 2

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
125.37 ms | 405 KiB | 5 Q