3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [1, 5, 10, 15, 22, 28]; $array2 = [1, 8, 12, 16, 25, 30]; $array3 = [10, 15, 20, 21, 22]; findVal([$array1, $array2, $array3], 15); function findVal($arrays = [], $needle) { foreach ($arrays as $key => $array) { foreach ($array as $value) { if ($value == $needle) { foreach ($GLOBALS as $arrayName => $value) { if ($value === $array) { echo 'value ' . $needle . ' found in : ' . $arrayName . "\r\n"; } } } } } }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Optional parameter $arrays declared before required parameter $needle is implicitly treated as a required parameter in /in/bCU2Z on line 8 value 15 found in : array1 value 15 found in : array3

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:
43.45 ms | 1535 KiB | 4 Q