3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack3 = '<span class=\'descr\'>test, test2, test3</span> <span class=\'descr\'>test</span> <span class=\'descr\'>test4 test5</span>'; preg_match_all('#^<span class=\'descr\'>(.*?)</span>$#m', $haystack3, $matches3); $data3 = explode(',', $matches3[1]); $data3 = array_filter(array_unique(array_map('trim', $data3))); natsort($data3); echo '<b>' . join(', ' , $data3 ) . '</b>'; echo "<br>\n"; echo '<font color="blue">' . '<b>' . count( $data3 ) . '</b>' . '</font>' . " tags were found." . '<br>'; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /in/A91Yj:7 Stack trace: #0 /in/A91Yj(7): explode(',', Array) #1 {main} thrown in /in/A91Yj 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:
24.29 ms | 405 KiB | 5 Q