3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userdb = array( array( 'uid' => '100', 'name' => 'Sandra Shush', 'pic_square' => 'abc.jpg', 'alias' => "SShush" ), array( 'uid' => '5465', 'name' => 'Stefanie Mcmohn', 'pic_square' => 'Michael.jpg', 'alias' => "Stef" ), array( 'uid' => '40489', 'name' => 'Michael', 'pic_square' => 'xyz.jpg', 'alias' => "Mike" ) ); $search = "Mike"; Foreach($userdb as $key => $arr){ If(preg_grep("/" . $search ."/", $arr)){ $res[] = $userdb[$key]; } } Var_dump($res);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> array(4) { ["uid"]=> string(5) "40489" ["name"]=> string(7) "Michael" ["pic_square"]=> string(7) "xyz.jpg" ["alias"]=> string(4) "Mike" } }

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