3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 50; $start = microtime(true); $code = ' $ret = ""; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; '; for($i = 0; $i < $count; $i++) { eval($code); } printf("#1, done in %f\n", microtime(true) - $start); $start = microtime(true); $f = function() { // return ++$y; $ret = ''; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; }; for($i = 0; $i < $count; $i++) { $f(); } printf("#2, 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.00.0100.02214.78
7.3.120.0030.02615.09
7.3.110.0030.03214.73
7.3.100.0100.01914.69
7.3.90.0100.01715.19
7.3.80.0040.02514.96
7.3.70.0090.02214.88
7.3.60.0170.01714.58
7.3.50.0000.02814.78
7.3.40.0030.02715.00
7.3.30.0070.01914.74
7.3.20.0030.02716.54
7.3.10.0030.02816.69
7.3.00.0040.02516.68
7.2.250.0100.02814.85
7.2.240.0070.03015.26
7.2.230.0070.02315.32
7.2.220.0120.01515.24
7.2.210.0030.02714.84
7.2.200.0100.02014.86
7.2.190.0030.02615.14
7.2.180.0070.02015.21
7.2.170.0070.02414.83
7.2.00.0070.02719.45
7.1.330.0060.02615.79
7.1.320.0030.02315.64
7.1.310.0030.02315.69
7.1.300.0040.02515.68
7.1.290.0030.02915.53
7.1.280.0000.03215.65
7.1.270.0000.02915.45
7.1.260.0070.02315.70
7.1.70.0040.01916.89
7.1.60.0030.04919.82
7.1.50.0130.04216.77
7.1.00.0000.09322.25
7.0.200.0000.02316.82
7.0.140.0030.09722.01
7.0.60.0030.08020.07
7.0.50.0070.10317.72
7.0.40.0070.09320.18
7.0.30.0170.06020.32
7.0.20.0300.06720.20
7.0.10.0000.07720.24
7.0.00.0070.10020.06
5.6.280.0030.10020.98
5.6.210.0030.11320.47
5.6.200.0030.11018.27
5.6.190.0100.10320.55
5.6.180.0200.09720.43
5.6.170.0270.09720.56
5.6.160.0070.07020.46
5.6.150.0000.06018.18
5.6.140.0070.10318.23
5.6.130.0170.09718.15
5.6.120.0070.06021.01
5.6.110.0000.06021.01
5.6.100.0170.09021.08
5.6.90.0100.11020.97
5.6.80.0070.05020.41
5.6.70.3430.04020.52
5.5.350.0170.10020.43
5.5.340.0070.06018.04
5.5.330.0170.09020.42
5.5.320.0300.09320.36
5.5.310.0270.09320.34
5.5.300.0070.10718.04
5.5.290.0170.05017.90
5.5.280.0070.07720.80
5.5.270.0100.08020.79
5.5.260.0030.07020.76
5.5.250.0070.07320.64
5.5.240.0230.09720.26
5.4.450.0870.07719.14
5.4.440.0670.08719.61
5.4.430.1070.07019.47
5.4.420.0570.09319.46
5.4.410.0130.07319.45
5.4.400.0300.08018.77
5.4.390.0230.08318.73
5.4.380.0300.07018.51
5.4.370.0130.07318.57
5.4.360.0200.06718.75
5.4.350.0090.08312.04
5.4.340.0070.05612.04
5.4.320.0060.04912.52
5.4.310.0080.05512.52
5.4.300.0050.05412.52
5.4.290.0090.05212.51
5.4.280.0050.05412.41
5.4.270.0040.05112.41
5.4.260.0070.05012.41
5.4.250.0070.07719.00
5.4.240.0100.07318.76
5.4.230.0170.06318.98
5.4.220.0030.07718.75
5.4.210.0070.07318.80
5.4.200.0030.07318.97
5.4.190.0100.07018.95
5.4.180.0130.06318.73
5.4.170.0030.07318.94
5.4.160.0070.07319.08
5.4.150.0070.07719.01
5.4.140.0100.06716.36
5.4.130.0130.07716.30
5.4.120.0100.07016.32
5.4.110.0070.10016.55
5.4.100.0030.07316.56
5.4.90.0130.08316.55
5.4.80.0030.07316.37
5.4.70.0130.06316.41
5.4.60.0070.07016.38
5.4.50.0170.05716.38
5.4.40.0130.06016.45
5.4.30.0070.06716.59
5.4.20.0030.07016.54
5.4.10.0000.07716.39
5.4.00.0070.06715.77
5.3.290.0100.05612.80
5.3.280.0100.07014.83
5.3.270.0130.06714.63
5.3.260.0030.07714.72
5.3.250.0170.06314.77
5.3.240.0000.07714.68
5.3.230.0130.06714.59
5.3.220.0070.08314.75
5.3.210.0030.08014.66
5.3.200.0100.08314.41
5.3.190.0070.10014.67
5.3.180.0030.07314.55
5.3.170.0100.07014.60
5.3.160.0170.06314.66
5.3.150.0030.09714.55
5.3.140.0070.07014.59
5.3.130.0030.10314.73
5.3.120.0070.07314.39
5.3.110.0100.06714.55
5.3.100.0130.06314.05
5.3.90.0030.07314.09
5.3.80.0030.07014.11
5.3.70.0070.07314.02
5.3.60.0030.07714.10
5.3.50.0030.07314.12
5.3.40.0100.07013.79
5.3.30.0130.06313.92
5.3.20.0100.06713.70
5.3.10.0070.08013.88
5.3.00.0070.09313.72
5.2.170.0030.04011.10
5.2.160.0000.04311.06
5.2.150.0030.04011.18
5.2.140.0030.04011.16
5.2.130.0070.03711.02
5.2.120.0000.04311.21
5.2.110.0070.03311.00
5.2.100.0030.04011.02
5.2.90.0070.04011.20
5.2.80.0130.03011.07
5.2.70.0030.04311.11
5.2.60.0070.03711.05
5.2.50.0000.06311.03
5.2.40.0070.03711.02
5.2.30.0100.03310.81
5.2.20.0000.04310.86
5.2.10.0070.04310.70
5.2.00.0070.04010.78
5.1.60.0070.0439.94
5.1.50.0070.0479.91
5.1.40.0100.04310.01
5.1.30.0000.04010.25
5.1.20.0070.03310.36
5.1.10.0000.0409.92
5.1.00.0000.03710.09
5.0.50.0070.0278.64
5.0.40.0030.0278.49
5.0.30.0030.0538.11
5.0.20.0000.0408.18
5.0.10.0030.0278.21
5.0.00.0030.0407.99
4.4.90.0000.0205.93
4.4.80.0000.0205.93
4.4.70.0030.0205.93
4.4.60.0000.0205.93
4.4.50.0000.0235.93
4.4.40.0030.0336.10
4.4.30.0000.0236.10
4.4.20.0070.0176.10
4.4.10.0030.0276.10
4.4.00.0070.0306.10
4.3.110.0000.0236.10
4.3.100.0000.0206.10
4.3.90.0000.0206.10
4.3.80.0030.0306.10
4.3.70.0000.0206.10
4.3.60.0070.0136.10
4.3.50.0000.0276.10
4.3.40.0000.0376.10
4.3.30.0070.0236.10
4.3.20.0000.0236.10
4.3.10.0000.0236.10
4.3.00.0170.0238.35

preferences:
33.42 ms | 401 KiB | 5 Q