3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $a->id = 17; $a->res_id = 10; $a->cat_id = 3; $b = new stdClass(); $b->id = 18; $b->res_id = 10; $b->cat_id = 4; $c = new stdClass(); $c->id = 52; $c->res_id = 19; $c->cat_id = 1; $d = new stdClass(); $d->id = 53; $d->res_id = 19; $d->cat_id = 3; $e = new stdClass(); $e->id = 54; $e->res_id = 19; $e->cat_id = 4; $array = Array ( $a, $b, $c, $d, $e ); $result = array_map(function($x){ return $x->cat_id; }, $array); print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 3 [1] => 4 [2] => 1 [3] => 3 [4] => 4 )

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:
61.22 ms | 401 KiB | 8 Q