3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = [str_repeat(mt_rand(), 30)]; echo strlen(json_encode($val)); echo "\n"; echo strlen(gzcompress(json_encode($val))); echo strlen(base64_encode(gzcompress(json_encode($val))));

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.0000.01519.39
7.1.70.0070.00017.13
7.1.60.0070.01719.40
7.1.50.0070.01416.91
7.1.00.0000.07722.38
7.0.200.0880.01115.09
7.0.140.0100.06721.95
7.0.90.0030.04320.04
7.0.80.0030.05320.05
7.0.70.0570.04720.09
7.0.60.0500.05020.20
7.0.50.0600.06720.30
7.0.40.0100.07320.13
7.0.30.0000.08319.95
7.0.20.0070.08720.04
7.0.10.0070.06320.08
7.0.00.0170.06320.14
5.6.280.0030.07021.02
5.6.240.0000.05020.87
5.6.230.0130.08020.84
5.6.220.0070.04720.79
5.6.210.0070.04720.91
5.6.200.0070.08021.23
5.6.190.0130.06021.12
5.6.180.0070.08021.28
5.6.170.0170.07721.12
5.6.160.0070.08021.10
5.6.150.0030.06021.20
5.6.140.0030.05021.25
5.6.130.0100.06321.25
5.6.120.0130.08721.20
5.6.110.0200.03721.26
5.6.100.0030.05721.14
5.6.90.0070.04321.20
5.6.80.0030.08020.63
5.6.70.0100.08320.55
5.6.60.0100.08020.62
5.6.50.0100.04720.57
5.6.40.0070.05320.48
5.6.30.0070.06020.46
5.6.20.0070.06720.57
5.6.10.0130.07020.46
5.6.00.0100.04720.53
5.5.380.0100.07320.51
5.5.370.0130.07720.62
5.5.360.0030.08720.50
5.5.350.0030.08720.58
5.5.340.0130.05320.91
5.5.330.0130.07021.08
5.5.320.0100.07720.93
5.5.310.0070.07021.05
5.5.300.0030.06020.99
5.5.290.0100.07021.08
5.5.280.0100.07321.03
5.5.270.0170.07321.00
5.5.260.0100.07721.04
5.5.250.0000.04720.88
5.5.240.0130.04720.32
5.5.230.0030.09020.46
5.5.220.0030.05720.42
5.5.210.0100.03720.46
5.5.200.0070.06720.31
5.5.190.0030.07020.38
5.5.180.0070.04720.26
5.5.160.0070.07720.38
5.5.150.0100.04720.15
5.5.140.0100.08020.35
5.5.130.0100.08020.36
5.5.120.0100.07020.34
5.5.110.0070.07020.27
5.5.100.0030.08020.28
5.5.90.0130.07320.23
5.5.80.0030.08720.23
5.5.70.0100.04320.32
5.5.60.0130.06720.19
5.5.50.0170.04720.25
5.5.40.0170.04320.30
5.5.30.0130.05720.30
5.5.20.0030.04320.31
5.5.10.0070.04720.21
5.5.00.0070.04320.21
5.4.450.0070.08319.39
5.4.440.0070.08019.45
5.4.430.0030.06719.52
5.4.420.0070.06019.50
5.4.410.0070.04719.29
5.4.400.0070.05319.21
5.4.390.0100.04719.13
5.4.380.0100.07319.13
5.4.370.0030.04719.28
5.4.360.0070.08318.99
5.4.350.0030.08019.24
5.4.340.0070.08019.25
5.4.320.0300.02318.96
5.4.310.0170.07019.18
5.4.300.0000.08719.12
5.4.290.0030.08718.91
5.4.280.0130.06019.17
5.4.270.0070.05319.38
5.4.260.0070.04719.28
5.4.250.0070.05319.29
5.4.240.0070.06318.93
5.4.230.0130.06719.12
5.4.220.0070.06019.10
5.4.210.0070.06019.05
5.4.200.0070.05018.93
5.4.190.0030.04718.96
5.4.180.0070.03719.12
5.4.170.0100.03319.18
5.4.160.0030.05719.10
5.4.150.0100.04018.95
5.4.140.0030.03716.52
5.4.130.0000.04016.25
5.4.120.0030.03316.42
5.4.110.0030.03716.52
5.4.100.0070.03316.50
5.4.90.0000.04016.55
5.4.80.0030.03716.45
5.4.70.0030.04716.41
5.4.60.0100.02716.40
5.4.50.0000.03716.35
5.4.40.0030.03716.63
5.4.30.0030.03316.36
5.4.20.0030.04016.37
5.4.10.0130.05016.56
5.4.00.0030.03315.71
5.3.290.0000.07314.63
5.3.280.0100.07014.54
5.3.270.0000.04014.54
5.3.260.0030.03714.43
5.3.250.0030.03714.61
5.3.240.0000.06314.45
5.3.230.0030.03714.57
5.3.220.0000.04014.54
5.3.210.0030.03714.40
5.3.200.0100.03014.58
5.3.190.0000.03714.43
5.3.180.0000.03714.47
5.3.170.0000.03314.40
5.3.160.0070.03314.47
5.3.150.0000.03314.39
5.3.140.0030.03014.41
5.3.130.0100.04714.48
5.3.120.0070.04014.40
5.3.110.0070.02714.54
5.3.100.0000.04014.06
5.3.90.0030.03713.98
5.3.80.0070.02713.77
5.3.70.0070.03714.00
5.3.60.0030.03713.77
5.3.50.0000.04313.91
5.3.40.0000.04013.89
5.3.30.0030.03013.90
5.3.20.0030.02713.65
5.3.10.0000.03713.64
5.3.00.0030.04013.49
5.2.170.0100.02310.99
5.2.160.0070.02311.21
5.2.150.0000.03310.96
5.2.140.0030.03311.12
5.2.130.0070.02311.16
5.2.120.0000.02711.12
5.2.110.0000.02711.09
5.2.100.0030.04311.14
5.2.90.0030.03010.95
5.2.80.0030.02710.96
5.2.70.0070.02310.88
5.2.60.0030.03311.03
5.2.50.0030.03011.06
5.2.40.0030.03011.00
5.2.30.0070.02710.93
5.2.20.0000.02710.96
5.2.10.0130.03310.88
5.2.00.0000.03010.76
5.1.60.0000.0379.82
5.1.50.0030.03310.04
5.1.40.0000.03010.00
5.1.30.0000.03010.39
5.1.20.0000.02710.30
5.1.10.0000.02710.05
5.1.00.0000.03310.07
5.0.50.0000.0378.38
5.0.40.0000.0208.25
5.0.30.0000.0338.27
5.0.20.0030.0178.28
5.0.10.0000.0478.15
5.0.00.0070.0638.21
4.4.90.0000.0137.61
4.4.80.0030.0137.61
4.4.70.0000.0177.61
4.4.60.0000.0137.61
4.4.50.0000.0177.61
4.4.40.0000.0237.61
4.4.30.0000.0137.61
4.4.20.0030.0207.61
4.4.10.0000.0177.61
4.4.00.0000.0307.61
4.3.110.0030.0107.61
4.3.100.0000.0137.61
4.3.90.0000.0337.61
4.3.80.0000.0437.61
4.3.70.0030.0307.61
4.3.60.0130.0277.61
4.3.50.0130.0277.61
4.3.40.0030.0507.61
4.3.30.0030.0337.61
4.3.20.0000.0377.61
4.3.10.0030.0337.61
4.3.00.0030.0337.61

preferences:
41.33 ms | 401 KiB | 5 Q