3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = [ [ 'a' => 'blah', 'b' => 'bleh', ], [ 'a' => 'blah', 'b' => 'bleh', ], [ 'a' => 'blah', 'b' => 'bleh', ], ]; //lets change all the 'bleh' values to the matrix version. foreach($ar as &$record){ foreach($record as $key => $val){ if($val === 'bleh'){ $record[$key] = 'THERE IS NO SPOON'; } } } var_dump($ar);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(2) { ["a"]=> string(4) "blah" ["b"]=> string(17) "THERE IS NO SPOON" } [1]=> array(2) { ["a"]=> string(4) "blah" ["b"]=> string(17) "THERE IS NO SPOON" } [2]=> &array(2) { ["a"]=> string(4) "blah" ["b"]=> string(17) "THERE IS NO SPOON" } }

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:
19.6 ms | 402 KiB | 8 Q