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(5) { [0]=> string(25) "href="http://www.sape.ru"" [1]=> string(4) "href" [2]=> string(1) """ [3]=> string(18) "http://www.sape.ru" [4]=> string(1) """ } array(5) { [0]=> string(14) "src='logo.jpg'" [1]=> string(3) "src" [2]=> string(1) "'" [3]=> string(8) "logo.jpg" [4]=> string(1) "'" }

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.58 ms | 402 KiB | 8 Q