3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = rand(1000,9999); $_SESSION["code"] = $code; $im = imagecreatetruecolor(50, 30); imagesavealpha($im, true); $bg = imagecolorallocatealpha($im, 0, 0, 0, 127); //background color blue $fg = imagecolorallocate($im, 0, 0, 0);//text color white imagefill($im, 0, 0, $bg); imagestring($im, 8, 8, 8, $code, $fg); header("Cache-Control: no-cache, must-revalidate"); header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?>

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.0090.00914.67
7.3.120.0080.01114.68
7.3.110.0030.01414.98
7.3.100.0060.00714.91
7.3.90.0030.01114.83
7.3.80.0050.00714.83
7.3.70.0070.00814.64
7.3.60.0030.01014.73
7.3.50.0020.01314.76
7.3.40.0050.00714.97
7.3.30.0100.00314.69
7.3.20.0020.01216.61
7.3.10.0060.00716.69
7.3.00.0070.00816.53
7.2.250.0100.01014.91
7.2.240.0090.01215.04
7.2.230.0070.00915.00
7.2.220.0040.01115.05
7.2.210.0050.00815.19
7.2.200.0090.00614.89
7.2.190.0090.00615.06
7.2.180.0050.00714.83
7.2.170.0050.00815.02
7.2.00.0000.01019.20
7.1.330.0090.00515.69
7.1.320.0050.00815.68
7.1.310.0060.00915.73
7.1.300.0060.00815.62
7.1.290.0020.01315.82
7.1.280.0040.01015.83
7.1.270.0040.01115.71
7.1.260.0050.00715.72
7.1.70.0040.00717.07
7.1.60.0110.01119.17
7.1.50.0070.01616.93
7.1.00.0000.08022.36
7.0.200.0030.00716.50
7.0.140.0070.07022.12
7.0.100.0230.04720.16
7.0.90.0300.08319.92
7.0.80.0070.09019.93
7.0.70.0300.08019.90
7.0.60.0230.05320.08
7.0.50.0030.08720.16
7.0.40.0170.07320.11
7.0.30.0130.04320.08
7.0.20.0030.08020.10
7.0.10.0070.05320.12
7.0.00.0030.05020.04
5.6.280.0070.06721.03
5.6.250.0100.08020.64
5.6.240.0070.08020.57
5.6.230.0130.08020.50
5.6.220.0030.05720.51
5.6.210.0070.07720.50
5.6.200.0100.08021.01
5.6.190.0100.04721.11
5.6.180.0000.05721.04
5.6.170.0030.05021.11
5.6.160.0100.07721.11
5.6.150.0070.06021.11
5.6.140.0070.08021.00
5.6.130.0100.08021.00
5.6.120.0130.07720.94
5.6.110.0070.07720.98
5.6.100.0200.07321.16
5.6.90.0000.05721.08
5.6.80.0030.08020.48
5.6.70.0030.08020.39
5.6.60.0130.05020.33
5.6.50.0070.06020.49
5.6.40.0100.07720.30
5.6.30.0130.06320.30
5.6.20.0100.06720.41
5.6.10.0130.07720.41
5.6.00.0070.08020.38
5.5.380.0030.07320.35
5.5.370.0100.06320.51
5.5.360.0070.08320.34
5.5.350.0070.08720.47
5.5.340.0030.07320.75
5.5.330.0130.07320.82
5.5.320.0030.04720.86
5.5.310.0170.07020.80
5.5.300.0070.07320.93
5.5.290.0100.06020.76
5.5.280.0100.07720.80
5.5.270.0070.08720.87
5.5.260.0130.07720.79
5.5.250.0170.06320.62
5.5.240.0070.07720.21
5.5.230.0030.08020.24
5.5.220.0100.04720.29
5.5.210.0030.04720.25
5.5.200.0070.08020.13
5.5.190.0100.07320.16
5.5.180.0100.07720.12
5.5.160.0000.08020.18
5.5.150.0130.07320.15
5.5.140.0170.07020.25
5.5.130.0130.07320.24
5.5.120.0070.08320.07
5.5.110.0170.07020.21
5.5.100.0030.08020.07
5.5.90.0170.07720.16
5.5.80.0070.04720.07
5.5.70.0030.08320.04
5.5.60.0200.06020.13
5.5.50.0030.06320.00
5.5.40.0130.06320.15
5.5.30.0130.06319.91
5.5.20.0070.08320.04
5.5.10.0070.06320.01
5.5.00.0170.06320.05
5.4.450.0000.05019.56
5.4.440.0070.07719.27
5.4.430.0030.05319.48
5.4.420.0070.06019.35
5.4.410.0030.04719.31
5.4.400.0130.06719.08
5.4.390.0100.07319.14
5.4.380.0030.06719.03
5.4.370.0030.07019.23
5.4.360.0100.06719.04
5.4.350.0000.08018.95
5.4.340.0100.05719.12
5.4.320.0030.05019.04
5.4.310.0100.07718.90
5.4.300.0130.07019.13
5.4.290.0100.07718.79
5.4.280.0130.07318.88
5.4.270.0100.07018.90
5.4.260.0100.05718.99
5.4.250.0000.06019.02
5.4.240.0100.07019.13
5.4.230.0170.05318.89
5.4.220.0130.04019.18
5.4.210.0070.07019.11
5.4.200.0000.08019.12
5.4.190.0030.08018.96
5.4.180.0070.07319.04
5.4.170.0030.06318.94
5.4.160.0100.04719.13
5.4.150.0030.06019.07
5.4.140.0000.07716.24
5.4.130.0070.07016.24
5.4.120.0000.05016.31
5.4.110.0100.04016.21
5.4.100.0170.06716.45
5.4.90.0100.04316.27
5.4.80.0170.07016.34
5.4.70.0130.06316.32
5.4.60.0030.05316.20
5.4.50.0030.07716.28
5.4.40.0070.07716.26
5.4.30.0130.05716.23
5.4.20.0100.05316.27
5.4.10.0070.07316.41
5.4.00.0070.05715.69
5.3.290.0100.05314.65
5.3.280.0030.08014.41
5.3.270.0070.04014.45
5.3.260.0000.07714.45
5.3.250.0070.06314.45
5.3.240.0000.05314.54
5.3.230.0000.05714.60
5.3.220.0130.07014.43
5.3.210.0030.04014.55
5.3.200.0100.05014.53
5.3.190.0070.07314.55
5.3.180.0130.03714.56
5.3.170.0030.07714.53
5.3.160.0000.05714.54
5.3.150.0070.08014.50
5.3.140.0030.06014.38
5.3.130.0070.04014.48
5.3.120.0130.04714.41
5.3.110.0100.07014.53
5.3.100.0100.07313.86
5.3.90.0100.07013.98
5.3.80.0030.04314.04
5.3.70.0100.07013.98
5.3.60.0030.05313.98
5.3.50.0030.06313.80
5.3.40.0070.06713.80
5.3.30.0100.05713.90
5.3.20.0070.07013.60
5.3.10.0030.07013.64
5.3.00.0100.07313.60
5.2.170.0100.06011.17
5.2.160.0100.04010.98
5.2.150.0000.06311.13
5.2.140.0030.03711.10
5.2.130.0100.06011.09
5.2.120.0030.03311.15
5.2.110.0070.06011.09
5.2.100.0030.06711.09
5.2.90.0070.06311.12
5.2.80.0030.06310.89
5.2.70.0130.05710.94
5.2.60.0030.05711.01
5.2.50.0030.03310.98
5.2.40.0070.04011.00
5.2.30.0030.05311.05
5.2.20.0030.06310.95
5.2.10.0100.05310.89
5.2.00.0030.04310.57
5.1.60.0030.04710.03
5.1.50.0030.04310.03
5.1.40.0000.0579.97
5.1.30.0030.06010.29
5.1.20.0030.06010.41
5.1.10.0070.06010.10
5.1.00.0070.05710.11
5.0.50.0070.0408.80
5.0.40.0030.0238.80
5.0.30.0070.0508.80
5.0.20.0000.0308.80
5.0.10.0100.0378.80
5.0.00.0030.0638.80
4.4.90.0100.0278.80
4.4.80.0000.0378.80
4.4.70.0030.0338.80
4.4.60.0070.0278.80
4.4.50.0100.0208.80
4.4.40.0030.0578.80
4.4.30.0070.0278.80
4.4.20.0030.0308.80
4.4.10.0000.0408.80
4.4.00.0070.0478.80
4.3.110.0100.0278.80
4.3.100.0030.0178.80
4.3.90.0070.0308.80
4.3.80.0030.0438.80
4.3.70.0000.0308.80
4.3.60.0000.0178.80
4.3.50.0000.0378.80
4.3.40.0000.0538.80
4.3.30.0030.0378.80
4.3.20.0030.0338.80
4.3.10.0030.0338.80
4.3.00.0030.0408.80

preferences:
38.9 ms | 401 KiB | 5 Q