3v4l.org

run code in 300+ PHP versions simultaneously
<?php function explodeYoutubeId($newstext, $divopt){ $search_text = array( "'^(http[s]*://www.youtube.com/watch\?[.]*v='", ); $replace_text = array( "", ); $newtext = preg_replace($search_text,$replace_text,$newstext); $newtext = '<div '.$divopt.'><p>'.$newtext.'</p></div>'; return $newtext; } echo explodeYoutubeId('https://www.youtube.com/watch?feature=player_embedded&v=M7lc1UVf-VE#!'); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function explodeYoutubeId(), 1 passed in /in/N8gQF on line 15 and exactly 2 expected in /in/N8gQF:2 Stack trace: #0 /in/N8gQF(15): explodeYoutubeId('https://www.you...') #1 {main} thrown in /in/N8gQF on line 2
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.66 ms | 401 KiB | 8 Q