3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/(?:src|href)\=(?:\\\'|")([^\\\'"]+)(?:\\\'|")/'; $source = <<<SRC <a href="http://www.sape.ru">some text</a> <img src='logo.jpg' alt=''></a> SRC; $callback = function($matches) { var_dump($matches); return ''; }; preg_replace_callback($pattern, $callback, $source);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> string(25) "href="http://www.sape.ru"" [1]=> string(18) "http://www.sape.ru" } array(2) { [0]=> string(14) "src='logo.jpg'" [1]=> string(8) "logo.jpg" }

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:
44.91 ms | 401 KiB | 8 Q