3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tags = "-10 ayanami_rei"; preg_match_all('/-\d+/', $tags, $matches); var_dump($matches[0]); if ($matches[0]){ $loop = substr($matches[0],1,strlen($matches[0])); $tags = str_replace("{$matches[0]} ","",$tags); $loop = ($loop >=11 ? 10 : $loop); } else { $loop = 1; } for ($i = 1; $i <= $loop; $i++) { echo $tags; }
Output for git.master, git.master_jit
array(1) { [0]=> string(3) "-10" } Fatal error: Uncaught TypeError: strlen(): Argument #1 ($str) must be of type string, array given in /in/T5CSc:7 Stack trace: #0 {main} thrown in /in/T5CSc on line 7
Process exited with code 255.
Output for rfc.property-hooks
array(1) { [0]=> string(3) "-10" } Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /in/T5CSc:7 Stack trace: #0 {main} thrown in /in/T5CSc on line 7
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:
51.95 ms | 401 KiB | 8 Q