3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "hello:20,test:40,abc:25"; function transform_input($input) { return array_map(function ($value) { list($title, $length) = explode(':', $value); return [ 'title' => $title, 'length' => $length ]; }, explode(',', $input)); } $array = transform_input($input); for($i=0; $i < count($array); $i++) { ?> <th><?=$array[$i]["length"]?></th> <th><?=$array[$i]["title"]?></th> <?php } ?>
Output for git.master, git.master_jit, rfc.property-hooks
<th>20</th> <th>hello</th> <th>40</th> <th>test</th> <th>25</th> <th>abc</th>

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:
115.77 ms | 405 KiB | 5 Q