3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => [ 'id' => 123-456-000-000, 'name' => 'john' ], 1 => [ 'id' => 123-456-789-014, 'name' => 'james' ] ]; $arr1 = [ 0 => [ 'id' => 123-456-000-000, 'address' => 'Japan' ], 1 => [ 'id' => 123-456-789-014, 'address' => 'Spain' ] ]; foreach ($arr1 as $key => $inner) { $arr1[$key]["address"] = $inner["address"]; } print_r(arr1);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "arr1" in /in/N781T:32 Stack trace: #0 {main} thrown in /in/N781T on line 32
Process exited with code 255.

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