3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 50; $start = microtime(true); $y = 0; // for($i = 0; $i < $count; $i++) // { $code = ' $ret = ""; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; '; eval($code); // } printf("#1, result is %d, done in %f\n", $y, microtime(true) - $start); $start = microtime(true); $y = 0; // for($i = 0; $i < $count; $i++) // { $f = function() { // return ++$y; $ret = ''; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; }; $f(); // } printf("#2, result is %d, done in %f\n", $y, microtime(true) - $start); $fName = create_function('', $code); $fName(); printf("#3, done in %f\n", microtime(true) - $start); ?>

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.0090.00915.33
7.4.00.0070.01415.32
7.3.130.0130.00615.32
7.3.120.0030.01615.32
7.3.110.0100.00715.32
7.3.100.0100.00315.32
7.3.90.0060.00915.32
7.3.80.0000.01515.32
7.3.70.0030.00715.32
7.3.60.0090.00315.32
7.3.50.0000.01215.32
7.3.40.0040.01515.32
7.3.30.0070.01115.32
7.3.20.0100.00616.77
7.3.10.0100.00616.78
7.3.00.0070.00716.73
7.2.260.0100.01015.32
7.2.250.0040.01415.38
7.2.240.0130.00315.32
7.2.230.0000.01615.32
7.2.220.0070.01115.32
7.2.210.0030.00915.45
7.2.200.0040.01115.32
7.2.190.0170.00015.32
7.2.180.0000.01415.32
7.2.170.0080.01215.32
7.2.160.0100.00715.34
7.2.150.0060.01217.00
7.2.140.0030.01316.96
7.2.130.0030.01017.02
7.2.120.0000.01417.07
7.2.110.0100.00317.03
7.2.100.0040.01117.05
7.2.90.0090.00917.07
7.2.80.0030.01217.03
7.2.70.0080.00817.05
7.2.60.0070.01116.83
7.2.50.0040.01116.84
7.2.40.0060.01017.08
7.2.30.0100.00716.81
7.2.20.0110.00417.00
7.2.10.0100.00716.84
7.2.00.0070.00817.98
7.1.330.0060.01015.98
7.1.320.0040.00815.68
7.1.310.0040.01116.03
7.1.300.0000.01415.79
7.1.290.0070.00715.96
7.1.280.0060.00915.60
7.1.270.0030.01015.91
7.1.260.0030.01015.53
7.1.250.0000.01515.87
7.1.240.0040.01415.87
7.1.230.0070.01015.43
7.1.220.0030.01015.49
7.1.210.0030.01315.70
7.1.200.0060.00615.77
7.1.190.0100.00315.58
7.1.180.0000.01215.89
7.1.170.0080.00815.91
7.1.160.0070.00715.55
7.1.150.0060.00815.68
7.1.140.0120.00415.94
7.1.130.0060.00615.85
7.1.120.0040.01115.68
7.1.110.0070.00715.86
7.1.100.0070.01116.00
7.1.90.0100.00715.83
7.1.80.0040.01415.74
7.1.70.0050.00816.31
7.1.60.0120.00317.51
7.1.50.0070.00816.41
7.1.40.0000.01615.61
7.1.30.0040.00715.92
7.1.20.0100.00615.84
7.1.10.0040.00715.74
7.1.00.0100.03019.09
7.0.330.0030.00715.54
7.0.320.0040.01415.43
7.0.310.0000.01115.42
7.0.300.0070.00315.43
7.0.290.0000.01315.41
7.0.280.0000.01515.49
7.0.270.0090.00615.51
7.0.260.0030.00915.45
7.0.250.0060.00615.68
7.0.240.0090.00615.59
7.0.230.0060.01015.40
7.0.220.0040.00815.43
7.0.210.0060.00315.47
7.0.200.0050.01016.03
7.0.190.0030.00815.39
7.0.180.0100.00615.55
7.0.170.0090.00315.46
7.0.160.0040.00815.61
7.0.150.0000.01415.32
7.0.140.0000.04818.78
7.0.130.0070.01115.44
7.0.120.0030.01415.41
7.0.110.0000.01515.32
7.0.100.0150.04217.76
7.0.90.0070.04717.64
7.0.80.0100.04917.80
7.0.70.0100.03117.64
7.0.60.0050.04717.69
7.0.50.0180.03718.01
7.0.40.0070.04717.71
7.0.30.0050.04917.65
7.0.20.0050.04917.71
7.0.10.0080.04317.71
7.0.00.0100.04317.70
5.6.400.0030.01115.32
5.6.390.0070.00715.32
5.6.380.0030.00915.32
5.6.370.0000.01315.32
5.6.360.0000.01715.32
5.6.350.0160.00315.32
5.6.340.0060.01015.32
5.6.330.0120.00315.32
5.6.320.0070.00715.32
5.6.310.0030.00615.32
5.6.300.0060.00715.32
5.6.290.0000.01215.32
5.6.280.0030.04318.16
5.6.270.0070.01015.32
5.6.260.0040.01115.32
5.6.250.0100.04217.91
5.6.240.0020.03518.00
5.6.230.0120.04317.99
5.6.220.0030.04317.90
5.6.210.0100.03818.04
5.6.200.0080.04718.13
5.6.190.0070.03118.18
5.6.180.0070.04618.19
5.6.170.0110.04118.22
5.6.160.0070.04518.19
5.6.150.0070.04818.25
5.6.140.0080.04718.25
5.6.130.0070.03718.20
5.6.120.0070.04018.15
5.6.110.0150.03718.20
5.6.100.0080.03818.17
5.6.90.0100.03118.22
5.6.80.0090.03317.84
5.6.70.0110.04017.83
5.6.60.0080.04517.89
5.6.50.0130.03017.94
5.6.40.0100.04017.91
5.6.30.0070.04117.93
5.6.20.0080.04217.85
5.6.10.0060.03517.85
5.6.00.0060.03817.81
5.5.380.0100.04317.84
5.5.370.0020.03417.88
5.5.360.0090.04117.93
5.5.350.0070.04017.87
5.5.340.0080.04117.98
5.5.330.0050.04118.12
5.5.320.0030.03118.11
5.5.310.0020.04518.06
5.5.300.0070.04118.03
5.5.290.0030.05118.12
5.5.280.0100.04418.12
5.5.270.0110.03217.97
5.5.260.0150.04018.07
5.5.250.0120.03917.94
5.5.240.0050.04117.80
5.5.230.0070.03517.77
5.5.220.0060.04617.74
5.5.210.0080.04217.67
5.5.200.0100.03617.74
5.5.190.0030.04517.66
5.5.180.0070.04817.74
5.5.170.0040.00815.32
5.5.160.0060.04317.78
5.5.150.0050.04417.66
5.5.140.0060.03617.77
5.5.130.0080.04117.75
5.5.120.0080.04617.79
5.5.110.0060.04417.80
5.5.100.0140.03917.75
5.5.90.0080.03017.71
5.5.80.0100.03717.73
5.5.70.0070.04517.71
5.5.60.0050.02917.74
5.5.50.0050.04217.68
5.5.40.0070.03517.71
5.5.30.0070.04417.66
5.5.20.0080.04517.71
5.5.10.0080.04217.65
5.5.00.0100.03317.72
5.4.450.0120.04317.30
5.4.440.0040.05217.35
5.4.430.0140.03717.27
5.4.420.0060.04117.38
5.4.410.0120.02217.28
5.4.400.0090.03217.11
5.4.390.0070.04217.18
5.4.380.0070.02817.21
5.4.370.0090.04417.11
5.4.360.0150.04017.18
5.4.350.0120.03717.19
5.4.340.0090.04117.12
5.4.330.0140.00415.32
5.4.320.0080.04617.23
5.4.310.0060.04217.13
5.4.300.0080.04217.24
5.4.290.0090.04017.18
5.4.280.0120.03917.20
5.4.270.0120.04117.10
5.4.260.0110.03917.10
5.4.250.0100.04117.27
5.4.240.0120.03817.18
5.4.230.0090.04317.22
5.4.220.0060.04617.22
5.4.210.0080.04417.07
5.4.200.0150.02217.26
5.4.190.0040.03917.18
5.4.180.0110.03617.09
5.4.170.0120.04217.17
5.4.160.0050.03817.16
5.4.150.0100.04617.22
5.4.140.0080.04315.90
5.4.130.0120.04215.84
5.4.120.0080.03915.83
5.4.110.0070.03915.85
5.4.100.0050.03515.83
5.4.90.0070.02315.90
5.4.80.0070.02515.86
5.4.70.0050.02715.82
5.4.60.0020.03015.88
5.4.50.0050.02215.88
5.4.40.0090.02115.84
5.4.30.0060.02215.90
5.4.20.0070.03715.90
5.4.10.0130.03715.84
5.4.00.0150.03915.56
5.3.290.0110.04115.06
5.3.280.0020.04315.03
5.3.270.0090.03715.04
5.3.260.0100.04315.04
5.3.250.0050.04414.99
5.3.240.0130.03514.97
5.3.230.0090.02514.94
5.3.220.0140.03514.92
5.3.210.0110.03214.95
5.3.200.0070.03514.92
5.3.190.0060.02414.95
5.3.180.0040.02814.94
5.3.170.0080.02414.95
5.3.160.0080.02414.92
5.3.150.0070.02414.99
5.3.140.0040.02415.00
5.3.130.0090.02114.96
5.3.120.0090.02114.95
5.3.110.0060.02614.96
5.3.100.0060.02714.76
5.3.90.0030.03614.73
5.3.80.0070.02214.62
5.3.70.0080.01914.67
5.3.60.0070.03014.72
5.3.50.0060.02414.71
5.3.40.0100.02814.66
5.3.30.0060.02314.64
5.3.20.0110.01814.47
5.3.10.0070.02114.55
5.3.00.0020.02614.54
5.2.170.0030.02711.14
5.2.160.0000.04311.14
5.2.150.0030.03010.99
5.2.140.0100.04311.14
5.2.130.0030.02711.09
5.2.120.0030.02711.02
5.2.110.0000.03011.15
5.2.100.0000.03010.95
5.2.90.0030.02711.02
5.2.80.0000.03010.94
5.2.70.0000.03011.12
5.2.60.0000.03010.90
5.2.50.0000.04011.04
5.2.40.0000.03010.86
5.2.30.0000.03010.92
5.2.20.0100.03010.96
5.2.10.0000.03010.78
5.2.00.0000.03010.62
5.1.60.0070.02010.05
5.1.50.0000.02710.00
5.1.40.0000.02710.00
5.1.30.0000.03010.20
5.1.20.0000.02710.27
5.1.10.0000.03010.12
5.1.00.0030.02310.11
5.0.50.0030.0178.55
5.0.40.0030.0208.24
5.0.30.0000.0338.25
5.0.20.0000.0208.29
5.0.10.0000.0208.28
5.0.00.0070.0278.23
4.4.90.0000.0177.95
4.4.80.0000.0307.95
4.4.70.0000.0207.95
4.4.60.0030.0137.95
4.4.50.0030.0137.95
4.4.40.0000.0277.95
4.4.30.0030.0137.95
4.4.20.0030.0177.95
4.4.10.0000.0177.95
4.4.00.0030.0207.95
4.3.110.0030.0137.95
4.3.100.0030.0137.95
4.3.90.0030.0137.95
4.3.80.0030.0237.95
4.3.70.0030.0207.95
4.3.60.0000.0307.95
4.3.50.0000.0237.95
4.3.40.0000.0237.95
4.3.30.0000.0177.95
4.3.20.0000.0177.95
4.3.10.0000.0177.95
4.3.00.0000.0137.95

preferences:
63.15 ms | 401 KiB | 5 Q