3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $bt ="http://www.xdytt.com/wp-content/uploads/2014/07/0e1f7d6029a030b3.torrenthttp://www.xdytt.com/wp-content/uploads/2014/07/8af4e5816cc01962.torrenthttp://www.xdytt.com/wp-content/uploads/2014/07/0e1f7d6029a030b3.torrenthttp://www.xdytt.com/wp-content/uploads/2014/07/8af4e5816cc01962.torrenthttp://www.xdytt.com/wp-content/uploads/2014/07/0e1f7d6029a030b3.torrenthttp://www.xdytt.com/wp-content/uploads/2014/07/8af4e5816cc01962.torrent"; $text = ""; $preg = "/(http.*?\/[0-9]{2}\/(.*?)\.torrent)/i"; preg_replace_callback($preg, function($m) use(&$text) { $text .= "<a href=\"{$m[1]}\">{$m[2]}</a>\r\n"; }, $bt); echo $text;
based on k4eDF
Output for 5.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
<a href="http://www.xdytt.com/wp-content/uploads/2014/07/0e1f7d6029a030b3.torrent">0e1f7d6029a030b3</a> <a href="http://www.xdytt.com/wp-content/uploads/2014/07/8af4e5816cc01962.torrent">8af4e5816cc01962</a> <a href="http://www.xdytt.com/wp-content/uploads/2014/07/0e1f7d6029a030b3.torrent">0e1f7d6029a030b3</a> <a href="http://www.xdytt.com/wp-content/uploads/2014/07/8af4e5816cc01962.torrent">8af4e5816cc01962</a> <a href="http://www.xdytt.com/wp-content/uploads/2014/07/0e1f7d6029a030b3.torrent">0e1f7d6029a030b3</a> <a href="http://www.xdytt.com/wp-content/uploads/2014/07/8af4e5816cc01962.torrent">8af4e5816cc01962</a>
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/bPCdF on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/bPCdF on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/bPCdF on line 6
Process exited with code 255.