3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_content = '<p class="post_content">[iframe width="256" height="175" src="http://www.youtube.com/embed/ICx3AfSlc-w" frameborder="0" allowfullscreen]</p> https://www.youtube.com/watch?v=dZpc936_Hgo http://youtu.be/lvOFck4dn_8 http://vimeo.com/65484727 http://www.metacafe.com/watch/10599819/are_katy_perry_and_john_mayer_back_together http://www.dailymotion.com/video/xzdijh_hire-data-entry-expert_news <div class="post_source_linkbar"> <img class="post_source_logo" src="http://economyincrisis.org/wp-content/uploads/2011/08/EICtext5.png"><img class="post_source_icon" title="Economy In Crisis" src="http://www.google.com/s2/favicons?domain=http%3A%2F%2Feconomyincrisis.org%2F">Source</div>'; preg_match(array( '/(https?:|)\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/i', '/(https?:|)\/\/vimeo\.com\/(\d+)', '/(https?:|)\/\/www\.metacafe\.com\/watch\/(\d+)\/(\w+)', '/(https?:|)\/\/www\.dailymotion\.com\/video\/(\w+)' ), $_content, $media); /* https://www.youtube.com/watch?v=dZpc936_Hgo http://youtu.be/lvOFck4dn_8 http://vimeo.com/65484727 http://www.metacafe.com/watch/10599819/are_katy_perry_and_john_mayer_back_together http://www.dailymotion.com/video/xzdijh_hire-data-entry-expert_news */ var_dump($media);
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught TypeError: preg_match(): Argument #1 ($pattern) must be of type string, array given in /in/3WYDT:11 Stack trace: #0 /in/3WYDT(11): preg_match(Array, '<p class="post_...', NULL) #1 {main} thrown in /in/3WYDT on line 11
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Fatal error: Uncaught TypeError: preg_match(): Argument #1 ($pattern) must be of type string, array given in /in/3WYDT:16 Stack trace: #0 /in/3WYDT(16): preg_match(Array, '<p class="post_...', NULL) #1 {main} thrown in /in/3WYDT on line 16
Process exited with code 255.
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.20, 7.1.5 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: preg_match() expects parameter 1 to be string, array given in /in/3WYDT on line 16 NULL
Output for 7.0.0 - 7.0.6, 7.1.0
Warning: preg_match() expects parameter 1 to be string, array given in /in/3WYDT on line 12 NULL

preferences:
177.81 ms | 401 KiB | 227 Q