3v4l.org

run code in 300+ PHP versions simultaneously
<?php var $search = array( '/&#36;/', "/\r/", // Non-legal carriage return "/[\n\t]+/", // Newlines and tabs '/[ ]{2,}/', // Runs of spaces, pre-handling '/<script[^>]*>.*?<\/script>/i', // <script>s -- which strip_tags supposedly has problems with '/<style[^>]*>.*?<\/style>/i', // <style>s -- which strip_tags supposedly has problems with //'/<!-- .* -->/', // Comments -- which strip_tags might have problem a with '/<h[123][^>]*>(.*?)<\/h[123]>/i', // H1 - H3 '/<h[456][^>]*>(.*?)<\/h[456]>/ie', // H4 - H6 '/<p[^>]*>/i', // <P> '/<br[^>]*>/i', // <br> '/<b[^>]*>(.*?)<\/b>/i', // <b> '/<strong[^>]*>(.*?)<\/strong>/i', // <strong> '/<i[^>]*>(.*?)<\/i>/i', // <i> '/<em[^>]*>(.*?)<\/em>/i', // <em> '/(<ul[^>]*>|<\/ul>)/i', // <ul> and </ul> '/(<ol[^>]*>|<\/ol>)/i', // <ol> and </ol> '/<li[^>]*>(.*?)<\/li>/i', // <li> and </li> '/<li[^>]*>/i', // <li> // '/<a [^>]*href="(.*?)([^"]+)"[^>]*><\/a>/ie', '/<a [^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/ie', // <a href=""> '/<hr[^>]*>/i', // <hr> '/(<table[^>]*>|<\/table>)/i', // <table> and </table> '/(<tr[^>]*>|<\/tr>)/i', // <tr> and </tr> '/<td[^>]*>(.*?)<\/td>/i', // <td> and </td> '/<th[^>]*>(.*?)<\/th>/i', // <th> and </th> '/&(nbsp|#160);/i', // Non-breaking space '/&(quot|rdquo|ldquo|#8220|#8221|#147|#148);/i', // Double quotes '/&(apos|rsquo|lsquo|#8216|#8217);/i', // Single quotes '/&gt;/i', // Greater-than '/&lt;/i', // Less-than '/&(amp|#38);/i', // Ampersand '/&(copy|#169);/i', // Copyright '/&(trade|#8482|#153);/i', // Trademark '/&(reg|#174);/i', // Registered '/&(mdash|#151|#8212);/i', // mdash '/&(ndash|minus|#8211|#8722);/i', // ndash '/&(bull|#149|#8226);/i', // Bullet '/&(pound|#163);/i', // Pound sign '/&(euro|#8364);/i', // Euro sign //'/&[^&;]+;/i', // Unknown/unhandled entities '/&[a-z0-9#]{1,10};/i', // Unknown/unhandled entities '/[ ]{2,}/' // Runs of spaces, post-handling ); /** * List of pattern replacements corresponding to patterns searched. * * @var array $replace * @access public * @see $search */ var $replace = array( '$', '', // Non-legal carriage return ' ', // Newlines and tabs ' ', // Runs of spaces, pre-handling '', // <script>s -- which strip_tags supposedly has problems with '', // <style>s -- which strip_tags supposedly has problems with //'', // Comments -- which strip_tags might have problem a with "\n\n\\1\n\n", // H1 - H3 "ucwords(\"\n\n\\1\n\n\")", // H4 - H6 "\n\n\t", // <P> "\n", // <br> "\\1", // <b> "\\1", // <strong> '_\\1_', // <i> '_\\1_', // <em> "\n\n", // <ul> and </ul> "\n\n", // <ol> and </ol> "\t* \\1\n", // <li> and </li> "\n\t* ", // <li> '$this->_build_link_list("\\1", "\\2")', // <a href=""> "\n-------------------------\n", // <hr> "\n\n", // <table> and </table> "\n", // <tr> and </tr> "\t\t\\1\n", // <td> and </td> "\t\t\\1\n", // <th> and </th> ' ', // Non-breaking space '"', // Double quotes "'", // Single quotes '>', '<', '&', '(c)', '(tm)', '(R)', '--', '-', '*', '▒', 'EUR', // Euro sign. . ? '', // Unknown/unhandled entities ' ' // Runs of spaces, post-handling ); var_dump(preg_replace($search, $replace, "&36;"));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.290.0110.03712.48
5.4.280.0070.03812.37
5.4.270.0090.03412.38
5.4.260.0100.04612.37
5.4.250.0130.06812.37
5.4.240.0090.03712.38
5.4.230.0040.04212.37
5.4.220.0070.03812.37
5.4.210.0040.03912.37
5.4.200.0090.04312.36
5.4.190.0060.03712.36
5.4.180.0040.04012.36
5.4.170.0150.03812.37
5.4.160.0090.04712.36
5.4.150.0110.04312.36
5.4.140.0070.05112.05
5.4.130.0090.03612.04
5.4.120.0130.04512.00
5.4.110.0110.04112.00
5.4.100.0090.03512.00
5.4.90.0090.03612.00
5.4.80.0040.04412.00
5.4.70.0070.04511.99
5.4.60.0060.04311.99
5.4.50.0070.03911.99
5.4.40.0090.04711.98
5.4.30.0080.04611.97
5.4.20.0090.04211.97
5.4.10.0070.04011.98
5.4.00.0040.03711.47
5.3.280.0080.04512.71
5.3.270.0070.05912.72
5.3.260.0080.04012.72
5.3.250.0180.08812.72
5.3.240.0170.06712.72
5.3.230.0090.04812.71
5.3.220.0080.04912.68
5.3.210.0030.04412.68
5.3.200.0070.04612.68
5.3.190.0050.04212.68
5.3.180.0060.04012.67
5.3.170.0070.03612.67
5.3.160.0060.03712.68
5.3.150.0060.04512.68
5.3.140.0100.04912.66
5.3.130.0050.04412.66
5.3.120.0070.04412.66
5.3.110.0030.04712.66
5.3.100.0050.03812.12
5.3.90.0040.03812.08
5.3.80.0040.03912.08
5.3.70.0080.03412.07
5.3.60.0090.04512.06
5.3.50.0070.03912.00
5.3.40.0160.04712.00
5.3.30.0120.04811.95
5.3.20.0110.04611.73
5.3.10.0080.04911.70
5.3.00.0060.03611.68

preferences:
149.74 ms | 1394 KiB | 7 Q