3v4l.org

run code in 300+ PHP versions simultaneously
<?php $plotsOpenSpace2 = '111 222 333'; $plotsShell2 = '555 222 444'; $plotsOther2 = '000 999 666'; $entries = array($plotsOpenSpace2, $plotsShell2, $plotsOther2); $test = array(111, 222, 465, 555, 666, 777); foreach ($entries as $key => $entry) { $matches = array_intersect($test, $entry); if (count($matches) > 0) { $i ++; echo 'test'; } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: array_intersect(): Argument #2 must be of type array, string given in /in/HqCqa:11 Stack trace: #0 /in/HqCqa(11): array_intersect(Array, '111 222 333') #1 {main} thrown in /in/HqCqa on line 11
Process exited with code 255.

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