3v4l.org

run code in 300+ PHP versions simultaneously
<?php $valid_strings = array("<p>","&nbsp;"); $test1 = '<p>asdasdasdasdasdasdasd</p>'; $test2 = '<p>&nbsp;&nbsp;&nbsp;&nbsp;</p>'; echo ContainsAnythingElseThan($test1,$valid_strings); function ContainsAnythingElseThan($the_string,$the_valid_strings_array) { return count(str_replace($the_string,$the_valid_strings_array,''))!=0; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: str_replace(): Argument #2 ($replace) must be of type string when argument #1 ($search) is a string in /in/aqoGE:17 Stack trace: #0 /in/aqoGE(17): str_replace('<p>asdasdasdasd...', Array, '') #1 /in/aqoGE(10): ContainsAnythingElseThan('<p>asdasdasdasd...', Array) #2 {main} thrown in /in/aqoGE 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:
50.7 ms | 401 KiB | 8 Q