3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tourAvaibilityDate = array ( 'tour_avaibility' => array ( 'tour_avaibility_location' => array ( 'Location_one' => 'Location_two', 'Location_seven' => 'Location_nine' ), 'tour_avaibility_date' => array ( '02/11/2020' => '02/17/2020', '02/21/2020' => '02/26/2020' ) ) ); $tours = $tourAvaibilityDate['tour_avaibility']; $start_locations = array_keys($tours['tour_avaibility_location']); $end_locations = array_values($tours['tour_avaibility_location']); $start_dates = array_keys($tours['tour_avaibility_date']); $end_dates = array_values($tours['tour_avaibility_date']); $c = count($start_locations); for ($i = 0; $i < $c; $i++) { echo $start_locations[$i] . ' - ' . $end_locations[$i] . "\n"; echo $start_dates[$i] . ' - ' . $end_dates[$i] . "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Location_one - Location_two 02/11/2020 - 02/17/2020 Location_seven - Location_nine 02/21/2020 - 02/26/2020

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:
25.83 ms | 405 KiB | 5 Q