3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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($my_employees_2 as $a => $v); { print ("<p>Employee $a is $v years old</p>"); } // foreach($my_employees_3 as $a => $v); { print ("<p>Employee $a is $v years old</p>"); }// print the elements of my_employees_3 ?>
based on kQAnj
Output for 4.3.0 - 7.2.0
<p>Employee Tom is 58 years old</p><p>Employee Tom is 58 years old</p>