3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (PHP_VERSION != '5.3.6') { die("Incorrect version"); } function a($url) { preg_match('!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i', $url, $out); } function b($url) { $out = parse_url($url); } $i = 100000; $start = microtime(true); while (--$i) { a('example.com'); a('example.com/index.php'); a('example.com?foo=bar'); a('/index.php'); a('/index.php?foo=bar'); a('?foo=bar'); } echo microtime(true) - $start . "\n"; $i = 100000; $start = microtime(true); while (--$i) { b('example.com'); b('example.com/index.php'); b('example.com?foo=bar'); b('/index.php'); b('/index.php?foo=bar'); b('?foo=bar'); } echo microtime(true) - $start . "\n";

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)
7.1.70.0000.00916.84
7.1.60.0100.00319.34
7.1.50.0040.01816.59
7.1.00.0100.06722.46
7.0.200.0000.00716.64
7.0.140.0000.04022.11
7.0.60.0130.06720.09
7.0.50.0030.05017.85
7.0.40.0130.08720.08
7.0.30.0300.07320.22
7.0.20.0230.04720.23
7.0.10.0070.06020.24
7.0.00.0130.08020.11
5.6.280.0070.06721.11
5.6.210.0100.07320.77
5.6.200.0000.08718.19
5.6.190.0000.05720.42
5.6.180.0030.08320.63
5.6.170.0330.08020.56
5.6.160.0070.09020.55
5.6.150.0070.08018.16
5.6.140.0030.04318.12
5.6.130.0030.06318.13
5.6.120.0100.07721.15
5.6.110.0100.05721.14
5.6.100.0030.08020.96
5.6.90.0070.06720.98
5.6.80.0070.08320.52
5.5.350.0370.06720.39
5.5.340.0030.08317.96
5.5.330.0100.08320.13
5.5.320.0300.04020.20
5.5.310.0200.04320.34
5.5.300.0030.04318.02
5.5.290.0100.07717.98
5.5.280.0130.05720.89
5.5.270.0130.07720.76
5.5.260.0130.07720.86
5.5.250.0030.08320.60
5.5.240.0030.07020.14
5.4.450.0670.06719.61
5.4.440.0730.06719.65
5.4.430.0200.04719.52
5.4.420.0130.05019.38
5.4.410.0100.05319.31
5.4.400.0170.04319.39
5.4.390.0230.06019.11
5.4.380.0170.06018.74
5.4.370.0100.06018.79
5.4.360.0230.04718.47
5.4.350.0130.03313.72
5.4.340.0130.03313.78
5.4.320.0200.04014.29
5.4.310.0130.05014.27
5.4.300.0170.04014.33
5.4.290.0170.04714.24
5.4.280.0230.04314.18
5.4.270.0130.04014.09
5.4.260.0030.04714.16
5.4.250.0130.03714.19
5.4.240.0030.04314.27
5.4.230.0170.03714.09
5.4.220.0070.04014.27
5.4.210.0100.04014.17
5.4.200.0200.04314.13
5.4.190.0200.02314.10
5.4.180.0070.04014.08
5.4.170.0100.03714.09
5.4.160.0130.03314.18
5.4.150.0030.04014.18
5.4.140.0000.04714.05
5.4.130.0100.03713.82
5.4.120.0100.04313.82
5.4.110.0130.03713.79
5.4.100.0100.04013.81
5.4.90.0130.03714.00
5.4.80.0030.04313.78
5.4.70.0130.04013.85
5.4.60.0100.04013.75
5.4.50.0030.04313.75
5.4.40.0170.03313.76
5.4.30.0100.04013.81
5.4.20.0170.03313.97
5.4.10.0030.04313.70
5.4.00.0100.04013.48
5.3.290.0130.03714.77
5.3.280.0230.03014.52
5.3.270.0130.04014.67
5.3.260.0200.03314.57
5.3.250.0200.03314.55
5.3.240.0100.04714.59
5.3.230.0170.04014.53
5.3.220.0230.02714.56
5.3.210.0100.04314.61
5.3.200.0100.03714.67
5.3.190.0230.03014.61
5.3.180.0100.04714.59
5.3.170.0170.03714.59
5.3.160.0170.04014.50
5.3.150.0130.04314.72
5.3.140.0170.04314.48
5.3.130.0100.04714.54
5.3.120.0070.04714.65
5.3.110.0200.04714.48
5.3.100.0170.05014.14
5.3.90.0300.04014.16
5.3.80.0230.04714.05
5.3.70.0100.04714.18
5.3.60.0031.71014.05
5.3.50.0130.04313.96
5.3.40.0170.04313.87
5.3.30.0070.04713.96
5.3.20.0030.04713.67
5.3.10.0100.04013.70
5.3.00.0170.03313.60
5.2.170.0100.03711.11
5.2.160.0100.03011.27
5.2.150.0100.03011.10
5.2.140.0100.03011.07
5.2.130.0070.03711.15
5.2.120.0130.04011.18
5.2.110.0200.03011.11
5.2.100.0170.03711.27
5.2.90.0130.02711.08
5.2.80.0100.02711.04
5.2.70.0170.02311.13
5.2.60.0170.02311.03
5.2.50.0070.03010.98
5.2.40.0100.02711.05
5.2.30.0030.03710.96
5.2.20.0100.03710.91
5.2.10.0070.04310.94
5.2.00.0070.04310.80
5.1.60.0170.02710.04
5.1.50.0130.02710.07
5.1.40.0130.02010.02
5.1.30.0170.02310.52
5.1.20.0170.02310.33
5.1.10.0070.02710.16
5.1.00.0070.02710.21
5.0.50.0000.0238.62
5.0.40.0100.0178.39
5.0.30.0000.0378.20
5.0.20.0170.0178.34
5.0.10.0030.0278.32
5.0.00.0070.0308.14
4.4.90.0070.0135.85
4.4.80.0030.0175.83
4.4.70.0130.0135.84
4.4.60.0100.0175.83
4.4.50.0000.0275.93
4.4.40.0100.0305.90
4.4.30.0070.0205.88
4.4.20.0030.0235.91
4.4.10.0030.0205.98
4.4.00.0030.0275.98
4.3.110.0000.0235.77
4.3.100.0030.0175.75
4.3.90.0030.0175.76
4.3.80.0030.0275.80
4.3.70.0000.0205.88
4.3.60.0000.0175.84
4.3.50.0030.0175.86
4.3.40.0000.0275.71
4.3.30.0000.0234.63
4.3.20.0000.0204.49
4.3.10.0070.0134.46
4.3.00.0130.0207.29

preferences:
43.58 ms | 400 KiB | 5 Q