3v4l.org

run code in 300+ PHP versions simultaneously
<?php $header = array(array('Name','Position','Salary')); $data = array( array('John','Manager','30000'), array('Cindy','Associate','50000'), array('Paul','Staff','20000'), array('Mandy','Staff','100000') ); array_walk($data, function(&$value, &$key) use ($header) {$value = array_combine($header[0],$value);}); print_r($data);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/ofele on line 10 Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/ofele on line 10 Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/ofele on line 10 Warning: {closure}(): Argument #2 ($key) must be passed by reference, value given in /in/ofele on line 10 Array ( [0] => Array ( [Name] => John [Position] => Manager [Salary] => 30000 ) [1] => Array ( [Name] => Cindy [Position] => Associate [Salary] => 50000 ) [2] => Array ( [Name] => Paul [Position] => Staff [Salary] => 20000 ) [3] => Array ( [Name] => Mandy [Position] => Staff [Salary] => 100000 ) )

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:
12.76 ms | 408 KiB | 5 Q