3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allHotels = array('Rows' => array ( 0 => array ( 'HotelId' => 94852, 'OfferId' => 858080496, 'OfferIdStr' => '858080496', 'Price' => 2762, ), 1 => array ( 'HotelId' => 94852, 'OfferId' => 858080497, 'OfferIdStr' => '858080497', 'Price' => 3000, ), 2 => array ( 'HotelId' => 93369, 'OfferId' => 858080501, 'OfferIdStr' => '858080501', 'Price' => 2500, ) )); $seenHotels = array(); foreach ($allHotels['Rows'] as $key => $hotel) { if (in_array($hotel['HotelId'], $seenHotels)) { unset($allHotels['Rows'][$key]); } else { $seenHotels[] = $hotel['HotelId']; } } print_r($allHotels);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [Rows] => Array ( [0] => Array ( [HotelId] => 94852 [OfferId] => 858080496 [OfferIdStr] => 858080496 [Price] => 2762 ) [2] => Array ( [HotelId] => 93369 [OfferId] => 858080501 [OfferIdStr] => 858080501 [Price] => 2500 ) ) )

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:
130.74 ms | 407 KiB | 5 Q