3v4l.org

run code in 300+ PHP versions simultaneously
<?php $md5=md5(''); for($i=0;$i<10000;$i++){ $t=microtime(true);preg_match("#$md5#i",'ff'); $a[]=microtime(true)-$t; } // Remove the first and last iterations array_shift($a); array_pop($a); // Print the average cost of each function call printf("Average preg_match on md5() = %.6f seconds\n",array_sum($a)/count($a)); for($i=0;$i<10000;$i++){ $t=microtime(true); filter_var('0x'.$md5,FILTER_VALIDATE_INT,FILTER_FLAG_ALLOW_HEX); $b[]=microtime(true)-$t; } // Remove the first and last iterations array_shift($b); array_pop($b); // Print the average cost of each function call printf("Average filter_var on md5() = %.6f seconds\n",array_sum($b)/count($b));

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.2.00.0090.00919.77
7.1.70.0030.01317.36
7.1.60.0030.03319.32
7.1.50.0030.01517.21
7.1.00.0000.04322.55
7.0.200.0030.01916.91
7.0.140.0070.07722.21
7.0.80.0600.09020.66
7.0.70.0470.05020.66
7.0.60.0770.08020.56
7.0.50.0730.07720.95
7.0.40.0200.07320.10
7.0.30.0100.08720.18
7.0.20.0200.08320.13
7.0.10.0070.08320.09
7.0.00.0070.08720.12
5.6.280.0000.10023.61
5.6.230.0170.09323.34
5.6.220.0100.10023.31
5.6.210.0070.07323.58
5.6.200.0230.07024.01
5.6.190.0100.10323.79
5.6.180.0130.09323.88
5.6.170.0030.10323.86
5.6.160.0130.08023.95
5.6.150.0200.09723.94
5.6.140.0130.09723.97
5.6.130.0000.07323.86
5.6.120.0030.10023.93
5.6.110.0100.10723.92
5.6.100.0130.10323.90
5.6.90.0000.08323.75
5.6.80.0030.06723.24
5.6.70.0100.09723.32
5.6.60.0070.07723.28
5.6.50.0030.06023.23
5.6.40.0200.08023.08
5.6.30.0170.09023.22
5.6.20.0070.06723.36
5.6.10.0130.09723.36
5.6.00.0130.09323.22
5.5.370.0030.06023.34
5.5.360.0000.09023.19
5.5.350.0030.10023.17
5.5.340.0170.12023.74
5.5.330.0130.09323.74
5.5.320.0100.07323.61
5.5.310.0100.10323.75
5.5.300.0200.09323.66
5.5.290.0030.10323.72
5.5.280.0130.10023.63
5.5.270.0100.07723.73
5.5.260.0130.10023.67
5.5.250.0170.08723.45
5.5.240.0130.08723.11
5.5.230.0200.08723.07
5.5.220.0070.06722.85
5.5.210.0030.10023.09
5.5.200.0130.10022.95
5.5.190.0100.08723.06
5.5.180.0130.10022.90
5.5.160.0070.06323.11
5.5.150.0100.09322.81
5.5.140.0070.05722.98
5.5.130.0100.09322.91
5.5.120.0400.07722.91
5.5.110.0030.08022.95
5.5.100.0100.12023.03
5.5.90.0130.08322.84
5.5.80.0130.06722.84
5.5.70.0100.09722.84
5.5.60.0100.08022.95
5.5.50.0200.09722.95
5.5.40.0170.07722.77
5.5.30.0000.09322.79
5.5.20.0100.10022.79
5.5.10.0070.11022.91
5.5.00.0170.09022.88
5.4.450.0200.09022.18
5.4.440.0200.07322.04
5.4.430.0100.09022.14
5.4.420.0300.07022.14
5.4.410.0030.10021.92
5.4.400.0100.09021.72
5.4.390.0230.08721.80
5.4.380.0130.08321.88
5.4.370.0100.08721.70
5.4.360.0030.05321.55
5.4.350.0030.06321.89
5.4.340.0100.10021.55
5.4.320.0100.09721.88
5.4.310.0200.09721.88
5.4.300.0070.07721.72
5.4.290.0130.09321.80
5.4.280.0070.10021.69
5.4.270.0100.06721.88
5.4.260.0030.09721.66
5.4.250.0070.05721.76
5.4.240.0030.06321.71
5.4.230.0030.05321.83
5.4.220.0100.08321.77
5.4.210.0070.09021.88
5.4.200.0130.09321.79
5.4.190.0070.07321.87
5.4.180.0130.07721.54
5.4.170.0070.09721.71
5.4.160.0100.07321.86
5.4.150.0070.09021.84
5.4.140.0070.09319.04
5.4.130.0130.08319.17
5.4.120.0000.11319.15
5.4.110.0100.07719.03
5.4.100.0000.08018.98
5.4.90.0070.07319.07
5.4.80.0070.05019.01
5.4.70.0130.09319.23
5.4.60.0030.07719.05
5.4.50.0100.08319.13
5.4.40.0070.07019.13
5.4.30.0070.08019.01
5.4.20.0130.09019.03
5.4.10.0100.09719.22
5.4.00.0100.05718.63
5.3.290.0200.04317.29
5.3.280.0030.10317.11
5.3.270.0070.09317.29
5.3.260.0170.09017.12
5.3.250.0070.10017.26
5.3.240.0230.07717.22
5.3.230.0000.07317.23
5.3.220.0170.09017.14
5.3.210.0100.05317.15
5.3.200.0130.09017.25
5.3.190.0130.09317.25
5.3.180.0030.08017.10
5.3.170.0000.10317.14
5.3.160.0100.09317.14
5.3.150.0030.07717.08
5.3.140.0070.05717.22
5.3.130.0100.07317.09
5.3.120.0100.09317.23
5.3.110.0070.08317.23
5.3.100.0100.09716.50
5.3.90.0230.04716.70
5.3.80.0070.10316.60
5.3.70.0230.07316.46
5.3.60.0070.07716.56
5.3.50.0100.07716.42
5.3.40.0100.08316.56
5.3.30.0130.05016.71
5.3.20.0070.08716.34
5.3.10.0070.10016.27
5.3.00.0100.11016.09
5.2.170.0130.07713.91
5.2.160.0070.09013.45
5.2.150.0000.09313.58
5.2.140.0100.05313.34
5.2.130.0030.04713.46
5.2.120.0100.06013.61
5.2.110.0130.04313.18
5.2.100.0100.07013.45
5.2.90.0030.05313.15
5.2.80.0070.09013.36
5.2.70.0100.07713.77
5.2.60.0170.07313.69
5.2.50.0130.08313.31
5.2.40.0000.09013.71
5.2.30.0070.08713.31
5.2.20.0070.05013.29
5.2.10.0070.06713.21
5.2.00.0030.08313.15
5.1.60.0070.05712.46
5.1.50.0000.04312.46
5.1.40.0070.06712.46
5.1.30.0100.07012.46
5.1.20.0070.06312.46
5.1.10.0070.05712.46
5.1.00.0070.03312.46
5.0.50.0070.06712.46
5.0.40.0030.03712.46
5.0.30.0100.08312.46
5.0.20.0070.06712.46
5.0.10.0070.07312.46
5.0.00.0000.08712.46
4.4.90.0000.04012.46
4.4.80.0000.05712.46
4.4.70.0030.05712.46
4.4.60.0030.04012.46
4.4.50.0000.07012.46
4.4.40.0100.08312.46
4.4.30.0000.04012.46
4.4.20.0000.06312.46
4.4.10.0100.07712.46
4.4.00.0070.08012.46
4.3.110.0030.06012.46
4.3.100.0030.06712.46
4.3.90.0070.07712.46
4.3.80.0070.06712.46
4.3.70.0070.07312.46
4.3.60.0000.07712.46
4.3.50.0030.05312.46
4.3.40.0030.09312.46
4.3.30.0070.07312.46
4.3.20.0070.07312.46
4.3.10.0070.04012.46
4.3.00.0070.06312.46

preferences:
33.68 ms | 401 KiB | 5 Q