3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ ['tutor_name' => 'John Doe', 'course_day' => 'Monday'], ['tutor_name' => 'John Doe', 'course_day' => 'Tuesday'] ]; function translate_to_cz ($day) { switch ($day) { case "Monday": $day_cz = "Pondělí"; break; case "Tuesday": $day_cz = "Úterý"; break; } return $day_cz; } foreach ($data as &$value) { $value['course_day_cz'] = translate_to_cz($value['course_day']); } print_r($data);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [tutor_name] => John Doe [course_day] => Monday [course_day_cz] => Pondělí ) [1] => Array ( [tutor_name] => John Doe [course_day] => Tuesday [course_day_cz] => Úterý ) )

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:
35.87 ms | 406 KiB | 5 Q