3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filedata = array('Abid-01-80', 'Sakib-02-76'); $lineArray = array(); $numTotal = 0; foreach ($filedata as $line) { $values = explode('-', $line); $numTotal += $values[2]; $lineArray[$values[0]] = array('id' => $values[1], 'num' => $values[2]); } echo "Total: $numTotal\n"; var_dump($lineArray);
Output for git.master, git.master_jit, rfc.property-hooks
Total: 156 array(2) { ["Abid"]=> array(2) { ["id"]=> string(2) "01" ["num"]=> string(2) "80" } ["Sakib"]=> array(2) { ["id"]=> string(2) "02" ["num"]=> string(2) "76" } }

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:
46.93 ms | 401 KiB | 8 Q