3v4l.org

run code in 300+ PHP versions simultaneously
<?php $target = [1,2,3]; $y1 = [1,2,3]; $y2 = [0,1,2,3]; $y3 = [0,1,2,3,4]; $y4 = [5,1,2,3,4]; $y5 = [2,1,2,3]; $n1 = [1,2]; $n2 = [1,3,2]; function test($test) { global $target; return strpos(implode($test, ''), implode($target, '')) !== false; } var_dump(test($y1)); var_dump(test($y2)); var_dump(test($y3)); var_dump(test($y4)); var_dump(test($y5)); echo "\n"; var_dump(test($n1)); var_dump(test($n2));
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /in/Eo6uO:17 Stack trace: #0 /in/Eo6uO(17): implode(Array, '') #1 /in/Eo6uO(20): test(Array) #2 {main} thrown in /in/Eo6uO on line 17
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:
37.52 ms | 401 KiB | 8 Q