3v4l.org

run code in 300+ PHP versions simultaneously
<?php $places = array((object)array('PlaceId' => 837, 'Name' => 'United Arab Emirates', 'Type' => 'Country'), (object)array('PlaceId' => 838, 'Name' => 'Afghanistan', 'Type' => 'Country'), (object)array('PlaceId' => 839, 'Name' => 'Antigua and Barbuda', 'Type' => 'Country') ); if (($k = array_search(837, array_column($places, 'PlaceId'))) !== false) { print_r($places[$k]); } else { echo "Not found!"; }
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.15, 8.5.0 - 8.5.1
stdClass Object ( [PlaceId] => 837 [Name] => United Arab Emirates [Type] => Country )

preferences:
205.59 ms | 408 KiB | 5 Q