3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dealers = [ ['id' => 1526, 'count' => 2], ['id' => 1518, 'count' => 5], ['id' => 1511, 'count' => 2], ['id' => 1410, 'count' => 3], ]; $counts = array_column($dealers, 'count'); $indexes = array_keys($counts, min($counts)); var_export($indexes ? $dealers[$indexes[array_rand($indexes)]] : null);
Output for git.master_jit
array ( 'id' => 1526, 'count' => 2, )
Output for git.master
array ( 'id' => 1511, 'count' => 2, )

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:
49.95 ms | 406 KiB | 5 Q