3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getLengthOfMissingArray($arrayOfArrays) { if(! is_array($arrayOfArrays)) { return 0; } $values = array_map(function($array) { return count($array); }, $arrayOfArrays); if(count($values) == 0) { return 0; } for($i = min($values); $i <= max($values); $i++) { if($key = array_search($i, $values) === false) { return $i; } } return 0; } echo getLengthOfMissingArray([[35,37],[27,4,46,38],[29,37,45,31,33,33],[],[20,8,47,15,48,10,10],[24],[31,32,31,24,21]]);
Output for git.master, git.master_jit, rfc.property-hooks
3

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