3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "http://blog.everymansoftware.com/2011/11/development-setup-for-neo4j-and-php_05.html"; $fileHeaders = @get_headers($url); if( $fileHeaders[0] == "HTTP/1.1 200 OK" || $fileHeaders[0] == "HTTP/1.0 200 OK") { $content = strip_html_tags(file_url_contents($url)); } //To fetch the $url by using cURL function file_url_contents($url){ $crl = curl_init(); $timeout = 30; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } //file_url_contents ENDS //To remove all the hidden text not displayed on a webpage function strip_html_tags($str){ $str = preg_replace('/(<|>)\1{2}/is', '', $str); $str = preg_replace( array(// Remove invisible content '@<head[^>]*?>.*?</head>@siu', '@<style[^>]*?>.*?</style>@siu', '@<script[^>]*?.*?</script>@siu', '@<noscript[^>]*?.*?</noscript>@siu', ), "", //replace above with nothing $str ); $str = replaceWhitespace($str); $str = strip_tags($str); return $str; } //function strip_html_tags ENDS //To replace all types of whitespace with a single space function replaceWhitespace($str) { $result = $str; foreach (array( " ", " \t", " \r", " \n", "\t\t", "\t ", "\t\r", "\t\n", "\r\r", "\r ", "\r\t", "\r\n", "\n\n", "\n ", "\n\t", "\n\r", ) as $replacement) { $result = str_replace($replacement, $replacement[0], $result); } return $str !== $result ? replaceWhitespace($result) : $result; } ?>

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)
8.3.70.0030.01218.93
8.3.60.0110.01118.85
8.3.50.0080.01022.11
8.3.40.0110.00419.28
8.3.30.0120.00319.47
8.3.20.0070.00020.54
8.3.10.0000.00822.42
8.3.00.0040.00422.83
8.2.190.0110.00416.94
8.2.180.0070.01117.00
8.2.170.0140.00722.96
8.2.160.0130.00722.37
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00018.00
8.2.110.0000.00922.21
8.2.100.0090.00318.04
8.2.90.0000.00819.46
8.2.80.0030.00618.16
8.2.70.0000.01017.75
8.2.60.0030.00618.18
8.2.50.0000.00918.07
8.2.40.0040.00418.59
8.2.30.0050.00318.30
8.2.20.0050.00318.02
8.2.10.0030.00519.74
8.2.00.0090.00017.89
8.1.280.0110.00425.92
8.1.270.0080.00022.23
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0000.00923.98
8.1.230.0080.00319.22
8.1.220.0040.00417.80
8.1.210.0030.00518.77
8.1.200.0030.00617.60
8.1.190.0080.00417.66
8.1.180.0030.00618.10
8.1.170.0090.00018.75
8.1.160.0040.00422.16
8.1.150.0040.00418.95
8.1.140.0000.00717.61
8.1.130.0040.00417.98
8.1.120.0040.00417.65
8.1.110.0040.00417.65
8.1.100.0030.00517.63
8.1.90.0000.00817.61
8.1.80.0070.00017.63
8.1.70.0000.00817.63
8.1.60.0000.00917.75
8.1.50.0000.00817.70
8.1.40.0000.00817.73
8.1.30.0000.00817.81
8.1.20.0000.00817.75
8.1.10.0050.00317.80
8.1.00.0040.00417.80
8.0.300.0050.00218.77
8.0.290.0000.00717.41
8.0.280.0000.00718.67
8.0.270.0050.00317.50
8.0.260.0000.00818.62
8.0.250.0000.00717.16
8.0.240.0030.00617.17
8.0.230.0020.00517.20
8.0.220.0040.00317.23
8.0.210.0030.00317.14
8.0.200.0070.00017.32
8.0.190.0040.00417.27
8.0.180.0000.00717.12
8.0.170.0030.00517.28
8.0.160.0070.00017.02
8.0.150.0040.00417.18
8.0.140.0050.00217.08
8.0.130.0030.00313.61
8.0.120.0080.00017.14
8.0.110.0040.00417.18
8.0.100.0080.00017.12
8.0.90.0030.00517.26
8.0.80.0150.00617.26
8.0.70.0040.00417.07
8.0.60.0040.00417.11
8.0.50.0000.00817.20
8.0.30.0120.00817.30
8.0.20.0120.00817.40
8.0.10.0060.00317.34
8.0.00.0080.01416.93
7.4.330.0000.00515.38
7.4.320.0030.00316.81
7.4.300.0000.00616.76
7.4.290.0050.00316.63
7.4.280.0040.00416.88
7.4.270.0030.00316.86
7.4.260.0040.00416.59
7.4.250.0080.00016.78
7.4.240.0030.00416.83
7.4.230.0060.00216.98
7.4.220.0040.01416.82
7.4.210.0110.00716.89
7.4.200.0030.00516.61
7.4.190.0000.00716.68
7.4.160.0070.01016.80
7.4.150.0150.00617.40
7.4.140.0100.00917.86
7.4.130.0110.00816.83
7.4.120.0090.01116.84
7.4.110.0080.01116.84
7.4.100.0120.00916.86
7.4.90.0070.01316.79
7.4.80.0120.01219.39
7.4.70.0110.00716.68
7.4.60.0070.01116.70
7.4.50.0000.00516.63
7.4.40.0070.00722.77
7.4.30.0130.00516.82
7.4.00.0100.00315.27
7.3.330.0000.00613.41
7.3.320.0030.00313.60
7.3.310.0020.00516.62
7.3.300.0000.00716.59
7.3.290.0070.01016.62
7.3.280.0060.01016.52
7.3.270.0120.00617.40
7.3.260.0090.01516.66
7.3.250.0140.00316.74
7.3.240.0090.00916.63
7.3.230.0090.00916.83
7.3.210.0070.01316.66
7.3.200.0100.00719.39
7.3.190.0090.00916.60
7.3.180.0040.01316.61
7.3.170.0060.01516.66
7.3.160.0130.00316.69
7.3.120.0040.01215.11
7.2.330.0160.00917.03
7.2.320.0210.00617.05
7.2.310.0070.01017.00
7.2.300.0140.00616.95
7.2.290.0060.01017.02
7.2.00.0030.01019.54
7.1.100.0040.00818.48
7.1.70.0030.00817.29
7.1.60.0040.01117.54
7.1.50.0180.01835.32
7.1.00.0030.08022.88
7.0.200.0030.00917.23
7.0.140.0030.07322.52
7.0.60.0070.05720.30
7.0.50.0130.07318.13
7.0.40.0070.06020.56
7.0.30.0470.05320.52
7.0.20.0370.07720.56
7.0.10.0100.08320.46
7.0.00.0030.04720.54
5.6.280.0030.09021.49
5.6.210.0130.05320.95
5.6.200.0070.07018.53
5.6.190.0070.05721.07
5.6.180.3330.05021.11
5.6.170.0270.08020.76
5.6.160.0270.05320.85
5.6.150.0030.04018.62
5.6.140.0070.03718.73
5.6.130.0130.07718.56
5.6.120.0100.08021.52
5.6.110.0100.09021.36
5.6.100.0230.07021.50
5.6.90.0070.08021.52
5.6.80.0070.08020.66
5.6.70.0300.07020.91
5.5.350.0270.07020.73
5.5.340.0070.06018.30
5.5.330.0130.07020.87
5.5.320.0270.03720.68
5.5.310.0300.04020.67
5.5.300.0000.05018.47
5.5.290.0070.04718.34
5.5.280.0070.05321.41
5.5.270.0130.07721.21
5.5.260.0070.05721.29
5.5.250.0070.07321.02
5.5.240.0330.04320.49
5.4.450.0170.04720.05
5.4.440.0200.05019.98
5.4.430.0330.06319.98
5.4.420.0330.07019.97
5.4.410.0370.06319.89
5.4.400.0300.07319.74
5.4.390.0330.07019.73
5.4.380.0270.07719.70
5.4.370.0270.04019.59
5.4.360.0330.06319.66
5.4.350.0330.07019.69
5.4.340.0230.08319.65
5.4.320.0200.04719.77
5.4.310.0270.04019.69
5.4.300.0300.07319.64
5.4.290.0330.07019.73
5.4.280.0300.06019.73
5.4.270.0270.06019.59
5.4.260.0370.06319.61
5.4.250.0370.06719.73
5.4.240.0370.03019.71
5.4.230.0200.04719.57
5.4.220.0300.05719.71
5.4.210.0300.03319.65
5.4.200.0200.05019.64
5.4.190.0330.07019.57
5.4.180.0230.04019.64
5.4.170.0370.06319.61
5.4.160.0370.04319.80
5.4.150.0270.05719.73
5.4.140.0270.04016.98
5.4.130.0230.04017.06
5.4.120.0300.06717.01
5.4.110.0300.04017.16
5.4.100.0330.06717.20
5.4.90.0370.04017.02
5.4.80.0300.04716.92
5.4.70.0300.03016.91
5.4.60.0270.03717.19
5.4.50.0400.05716.97
5.4.40.0270.07717.17
5.4.30.0270.03317.16
5.4.20.0370.06317.00
5.4.10.0230.03716.93
5.4.00.0230.06716.45
5.3.290.0400.03315.00
5.3.280.0430.06714.91
5.3.270.0300.03015.13
5.3.260.0200.06014.96
5.3.250.0330.05715.07
5.3.240.0270.04015.05
5.3.230.0330.03315.07
5.3.220.0400.05315.03
5.3.210.0330.08014.87
5.3.200.0330.07015.02
5.3.190.0300.03714.87
5.3.180.0370.03714.98
5.3.170.0300.06015.07
5.3.160.0300.03714.99
5.3.150.0300.05314.94
5.3.140.0270.03714.79
5.3.130.0300.07014.86
5.3.120.0300.05015.05
5.3.110.0230.06315.01
5.3.100.0230.05714.56
5.3.90.0230.04314.50
5.3.80.0370.06014.36
5.3.70.0400.06314.46
5.3.60.0330.05714.31
5.3.50.0330.05714.37
5.3.40.0370.04714.39
5.3.30.0270.05314.23
5.3.20.0300.06714.06
5.3.10.0200.04014.11
5.3.00.0230.04314.14
5.2.170.0270.06012.32
5.2.160.0270.05712.32
5.2.150.0370.03012.32
5.2.140.0200.03712.32
5.2.130.0200.03012.32
5.2.120.0170.03012.32
5.2.110.0300.05012.32
5.2.100.0230.03712.32
5.2.90.0230.05012.32
5.2.80.0270.04712.32
5.2.70.0330.04712.32
5.2.60.0200.03312.32
5.2.50.0270.04712.32
5.2.40.0200.04712.32
5.2.30.0230.03012.32
5.2.20.0230.03012.32
5.2.10.0270.05012.32
5.2.00.0200.03712.32
5.1.60.0230.02012.32
5.1.50.0230.06012.32
5.1.40.0230.03012.32
5.1.30.0130.04312.32
5.1.20.0230.02712.32
5.1.10.0230.03312.32
5.1.00.0170.03012.32
5.0.50.0100.02012.32
5.0.40.0030.03712.32
5.0.30.0000.03312.32
5.0.20.0100.03712.32
5.0.10.0100.02012.32
5.0.00.0170.05712.32
4.4.90.0100.03312.32
4.4.80.0070.02312.32
4.4.70.0130.02012.32
4.4.60.0130.03012.32
4.4.50.0070.02712.32
4.4.40.0100.04012.32
4.4.30.0100.02012.32
4.4.20.0070.01712.32
4.4.10.0070.02012.32
4.4.00.0070.02712.32
4.3.110.0100.01712.32
4.3.100.0100.01012.32
4.3.90.0100.03012.32
4.3.80.0100.05312.32
4.3.70.0030.01712.32
4.3.60.0170.03012.32
4.3.50.0130.01712.32
4.3.40.0130.04312.32
4.3.30.0030.03312.32
4.3.20.0030.01712.32
4.3.10.0030.02712.32
4.3.00.0000.03312.32

preferences:
47.86 ms | 401 KiB | 5 Q