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() = %.9f 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() = %.9f 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.4.10.0100.02015.37
7.4.00.0100.01715.65
7.3.130.0030.02615.60
7.3.120.0060.02215.90
7.3.110.0100.02015.57
7.3.100.0030.02115.53
7.3.90.0070.01715.51
7.3.80.0040.01815.43
7.3.70.0030.02115.52
7.3.60.0090.01515.66
7.3.50.0000.02215.73
7.3.40.0040.01815.39
7.3.30.0030.02015.68
7.3.20.0090.01616.92
7.3.10.0040.02116.89
7.3.00.0030.01716.63
7.2.260.0100.02215.88
7.2.250.0060.02615.93
7.2.240.0000.02415.96
7.2.230.0070.01816.06
7.2.220.0040.01915.91
7.2.210.0030.02015.88
7.2.200.0030.02115.86
7.2.190.0100.01315.80
7.2.180.0030.02015.63
7.2.170.0070.01815.85
7.2.160.0060.01915.80
7.2.150.0060.01617.28
7.2.140.0060.01916.85
7.2.130.0030.02217.00
7.2.120.0030.02016.93
7.2.110.0070.01316.97
7.2.100.0060.01517.16
7.2.90.0030.01317.13
7.2.80.0070.01517.00
7.2.70.0130.01317.00
7.2.60.0000.01717.10
7.2.50.0090.01517.13
7.2.40.0000.02317.16
7.2.30.0040.02117.32
7.2.20.0030.02117.07
7.2.10.0070.01417.18
7.2.00.0080.01518.24
7.1.330.0030.02216.15
7.1.320.0030.02316.17
7.1.310.0070.02115.82
7.1.300.0060.01815.96
7.1.290.0110.01815.77
7.1.280.0030.02316.09
7.1.270.0070.02616.06
7.1.260.0070.02116.06
7.1.250.0030.02016.19
7.1.240.0090.01516.13
7.1.230.0040.02216.07
7.1.220.0060.01316.21
7.1.210.0030.01915.76
7.1.200.0060.01915.92
7.1.190.0000.02616.16
7.1.180.0070.01815.79
7.1.170.0030.02415.96
7.1.160.0060.02215.98
7.1.150.0120.01615.98
7.1.140.0060.01916.13
7.1.130.0070.01715.96
7.1.120.0030.02615.84
7.1.110.0000.02416.20
7.1.100.0070.01615.97
7.1.90.0100.01616.07
7.1.80.0030.02315.87
7.1.70.0030.02216.67
7.1.60.0100.02117.62
7.1.50.0060.02216.55
7.1.40.0030.01915.96
7.1.30.0040.02115.93
7.1.20.0100.01315.79
7.1.10.0100.01715.85
7.1.00.0050.03719.23
7.0.330.0070.01415.73
7.0.320.0070.01715.65
7.0.310.0030.02415.44
7.0.300.0100.01715.63
7.0.290.0000.02715.56
7.0.280.0100.01615.55
7.0.270.0030.02015.32
7.0.260.0060.01915.71
7.0.250.0000.02015.62
7.0.240.0030.02015.67
7.0.230.0060.01915.66
7.0.220.0030.01915.84
7.0.210.0000.01915.76
7.0.200.0020.01916.29
7.0.190.0000.02915.82
7.0.180.0000.02915.65
7.0.170.0070.01315.64
7.0.160.0030.02315.69
7.0.150.0000.02515.75
7.0.140.0020.05418.82
7.0.130.0100.01715.49
7.0.120.0000.02615.55
7.0.110.0070.05418.23
7.0.100.0120.05018.10
7.0.90.0030.06318.07
7.0.80.0110.05118.04
7.0.70.0050.05918.15
7.0.60.0050.05817.87
7.0.50.0050.03818.09
7.0.40.0050.04616.59
7.0.30.0020.04616.77
7.0.20.0090.02916.72
7.0.10.0080.03316.79
7.0.00.0050.03016.55
5.6.400.0070.03017.41
5.6.390.0100.02417.32
5.6.380.0000.03817.04
5.6.370.0040.03217.62
5.6.360.0070.03017.69
5.6.350.0070.02817.27
5.6.340.0130.02617.29
5.6.330.0120.02517.26
5.6.320.0030.03417.63
5.6.310.0100.02817.54
5.6.300.0030.02717.02
5.6.290.0000.03817.39
5.6.280.0070.06520.74
5.6.270.0030.03417.23
5.6.260.0110.06120.43
5.6.250.0100.06320.53
5.6.240.0080.06120.37
5.6.230.0100.06520.42
5.6.220.0020.06220.33
5.6.210.0070.05520.43
5.6.200.0030.05420.40
5.6.190.0120.05020.41
5.6.180.0070.04220.45
5.6.170.0050.04020.32
5.6.160.0030.04620.38
5.6.150.0070.04320.27
5.6.140.0120.04320.28
5.6.130.0070.04720.19
5.6.120.0090.04120.38
5.6.110.0100.06820.30
5.6.100.0030.04320.35
5.6.90.0120.05220.54
5.6.80.0070.03820.04
5.6.70.0080.05620.01
5.6.60.0080.04620.17
5.6.50.0050.04320.23
5.6.40.0050.04019.92
5.6.30.0050.04020.13
5.6.20.0030.06220.19
5.6.10.0100.03320.12
5.6.00.0030.04620.08
5.5.380.0080.06918.87
5.5.370.0070.06618.93
5.5.360.0050.06418.77
5.5.350.0080.06718.89
5.5.340.0100.06519.17
5.5.330.0070.05619.17
5.5.320.0000.04519.03
5.5.310.0030.04819.23
5.5.300.0100.04719.03
5.5.290.0030.05419.06
5.5.280.0070.03919.18
5.5.270.0020.07419.15
5.5.260.0070.04219.10
5.5.250.0040.04318.80
5.5.240.0050.05718.66
5.5.230.0050.04818.65
5.5.220.0050.04418.83
5.5.210.0100.03318.78
5.5.200.0090.03618.63
5.5.190.0070.03818.77
5.5.180.0080.03918.59
5.5.170.0000.03217.38
5.5.160.0030.03918.45
5.5.150.0050.04818.73
5.5.140.0050.04018.78
5.5.130.0080.05218.78
5.5.120.0120.06018.58
5.5.110.0080.06218.73
5.5.100.0030.06218.56
5.5.90.0070.05318.67
5.5.80.0120.06018.61
5.5.70.0000.04618.57
5.5.60.0080.05218.71
5.5.50.0100.06418.69
5.5.40.0050.03718.63
5.5.30.0060.05918.59
5.5.20.0070.03718.64
5.5.10.0110.05418.52
5.5.00.0080.05618.57
5.4.450.0070.03717.90
5.4.440.0130.06117.95
5.4.430.0060.03718.00
5.4.420.0100.05218.08
5.4.410.0110.03717.86
5.4.400.0100.04917.74
5.4.390.0030.04317.76
5.4.380.0050.04017.91
5.4.370.0050.04717.95
5.4.360.0080.03717.86
5.4.350.0020.04317.80
5.4.340.0050.03617.87
5.4.330.0060.02913.84
5.4.320.0050.04417.84
5.4.310.0080.03517.88
5.4.300.0030.04517.88
5.4.290.0030.04917.79
5.4.280.0050.06417.80
5.4.270.0070.06017.78
5.4.260.0120.05017.88
5.4.250.0030.04017.78
5.4.240.0000.04817.78
5.4.230.0070.05417.90
5.4.220.0050.04117.83
5.4.210.0070.06017.79
5.4.200.0060.05417.74
5.4.190.0050.03917.92
5.4.180.0050.05217.88
5.4.170.0050.05817.69
5.4.160.0100.05917.91
5.4.150.0050.07017.93
5.4.140.0120.05916.42
5.4.130.0110.06016.56
5.4.120.0080.05416.54
5.4.110.0050.06416.59
5.4.100.0080.06116.43
5.4.90.0100.05716.59
5.4.80.0020.06416.48
5.4.70.0030.05316.47
5.4.60.0050.05216.50
5.4.50.0050.06316.52
5.4.40.0050.06116.57
5.4.30.0030.06116.40
5.4.20.0070.06316.67
5.4.10.0080.05616.50
5.4.00.0070.05816.29
5.3.290.0070.04615.19
5.3.280.0050.04015.28
5.3.270.0070.04815.34
5.3.260.0030.06815.22
5.3.250.0070.06415.32
5.3.240.0020.06515.06
5.3.230.0080.06415.11
5.3.220.0030.06915.16
5.3.210.0120.06415.11
5.3.200.0120.06615.23
5.3.190.0050.06715.20
5.3.180.0100.06615.25
5.3.170.0070.06615.36
5.3.160.0120.05815.21
5.3.150.0100.06115.30
5.3.140.0110.05915.22
5.3.130.0020.06915.14
5.3.120.0050.06115.16
5.3.110.0000.07015.14
5.3.100.0120.05914.89
5.3.90.0000.06614.84
5.3.80.0080.06714.69
5.3.70.0100.06714.76
5.3.60.0050.05514.82
5.3.50.0070.06814.74
5.3.40.0120.05814.76
5.3.30.0060.06414.70
5.3.20.0060.06414.54
5.3.10.0070.06414.50
5.3.00.0030.06514.41
5.2.170.0100.08313.61
5.2.160.0030.08713.45
5.2.150.0000.08013.44
5.2.140.0070.08713.37
5.2.130.0130.07313.42
5.2.120.0100.08313.34
5.2.110.0030.09013.41
5.2.100.0030.08713.29
5.2.90.0000.05313.15
5.2.80.0100.08013.32
5.2.70.0000.09313.48
5.2.60.0030.07713.29
5.2.50.0000.05713.32
5.2.40.0100.04313.21
5.2.30.0130.03713.20
5.2.20.0070.07013.22
5.2.10.0030.07713.46
5.2.00.0030.08712.99
5.1.60.0170.05711.71
5.1.50.0030.07311.60
5.1.40.0070.07011.80
5.1.30.0100.06311.97
5.1.20.0070.07312.18
5.1.10.0070.06711.77
5.1.00.0030.04711.78
5.0.50.0070.06710.39
5.0.40.0100.06010.11
5.0.30.0030.08310.07
5.0.20.0030.06710.07
5.0.10.0070.06710.07
5.0.00.0000.09010.11
4.4.90.0000.05310.07
4.4.80.0000.06710.07
4.4.70.0000.06710.07
4.4.60.0000.04710.07
4.4.50.0000.05310.07
4.4.40.0070.08310.07
4.4.30.0030.07010.07
4.4.20.0000.07010.07
4.4.10.0000.06310.07
4.4.00.0070.07310.07
4.3.110.0030.06310.07
4.3.100.0030.06310.07
4.3.90.0070.08310.07
4.3.80.0100.08710.07
4.3.70.0000.08010.07
4.3.60.0000.06710.07
4.3.50.0030.07710.07
4.3.40.0000.08310.07
4.3.30.0100.06310.07
4.3.20.0000.07310.07
4.3.10.0000.07310.07
4.3.00.0030.07010.07

preferences:
48.65 ms | 401 KiB | 5 Q