3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_employees_1 = array ( "Bob" => "37", "Jane" => 22, "Tom" => 58, "Amanda" => 41 ); $my_employees_2=$my_employees_1; asort($my_employees_2); $my_employees_3 =$my_employees_1; ksort($my_employees_3); foreach($employee_age2 as $a => $v); { print ("<p>Employee $a is $v years old</p>"); } // foreach($employee_age3 as $a => $v); { print ("<p>Employee $a is $v years old</p>"); }// print the elements of my_employees_3 ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $employee_age2 in /in/kQAnj on line 8 Warning: foreach() argument must be of type array|object, null given in /in/kQAnj on line 8 Warning: Undefined variable $a in /in/kQAnj on line 9 Warning: Undefined variable $v in /in/kQAnj on line 9 <p>Employee is years old</p> Warning: Undefined variable $employee_age3 in /in/kQAnj on line 11 Warning: foreach() argument must be of type array|object, null given in /in/kQAnj on line 11 Warning: Undefined variable $a in /in/kQAnj on line 12 Warning: Undefined variable $v in /in/kQAnj on line 12 <p>Employee is years old</p>

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