3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=[ ['Name','Email','Phone Number'], ['Mick','mick@mick.com','01234 324234'], ['james','james@james.com',''], ['reg','reg@reg.com','10293 467289'] ]; foreach($array as &$item){ if(strlen($item[2])) $item[1].=" + $item[2]"; unset($item[2]); } $array[0]=['Name','Info']; var_export($array); unset($item); // var_export($item); // ($item = NULL)
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => 'Name', 1 => 'Info', ), 1 => array ( 0 => 'Mick', 1 => 'mick@mick.com + 01234 324234', ), 2 => array ( 0 => 'james', 1 => 'james@james.com', ), 3 => array ( 0 => 'reg', 1 => 'reg@reg.com + 10293 467289', ), )

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:
64 ms | 406 KiB | 5 Q