3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = array( [0] => array( [country] => 'USA', [day] => '02', [month] => 'February', [mon] => '02', [year] => '2012'), [1] => array( [country] => 'Canada', [day] => '10', [month] => 'February', [mon] => '02', [year] => '2012') ); foreach($my_array as $array){ foreach($array as $c[country]){ if($c[country] == "USA"){ $my_array = $array[day]." ".$array[month]." ".$array[year]." (".$array[country].")"; break; } } } echo $my_array;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "country" in /in/229sY:4 Stack trace: #0 {main} thrown in /in/229sY on line 4
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:
32.86 ms | 401 KiB | 8 Q