3v4l.org

run code in 300+ PHP versions simultaneously
<?php $places = ['Places'=>[]]; $book1 = new stdClass; $book1->PlaceId = 837; $book1->Name = "United Arab Emirates"; $book1->Type = "Country"; $book2 = new stdClass; $book2->PlaceId = 838; $book2->Name = "Afganistant"; $book2->Type = "Country"; $book3 = new stdClass; $book3->PlaceId = 839; $book3->Name = "Canada"; $book3->Type = "Country"; $places['Places'][] = $book1; $places['Places'][] = $book2; $places['Places'][] = $book3; //print_r($places); $key = array_search(839, array_column($places['Places'], 'PlaceId')); print_r($places['Places'][$key]); ?>
Output for git.master, git.master_jit, rfc.property-hooks
stdClass Object ( [PlaceId] => 839 [Name] => Canada [Type] => Country )

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.05 ms | 405 KiB | 5 Q