3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); $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.3.120.0030.01014.81
7.3.110.0110.00314.82
7.3.100.0100.00314.71
7.3.90.0030.00614.90
7.3.80.0000.01614.84
7.3.70.0040.01114.94
7.3.60.0090.00614.48
7.3.50.0040.00814.86
7.3.40.0000.01114.67
7.3.30.0090.00614.83
7.3.20.0100.00316.37
7.3.10.0060.00916.36
7.3.00.0040.01416.79
7.2.240.0030.00714.93
7.2.230.0000.01514.85
7.2.220.0070.00715.18
7.2.210.0060.00914.81
7.2.200.0090.00314.95
7.2.190.0130.00314.98
7.2.180.0000.01814.64
7.2.170.0060.00914.95
7.2.160.0080.00814.98
7.2.150.0040.01116.74
7.2.140.0060.00616.89
7.2.130.0060.00917.07
7.2.120.0100.00716.88
7.2.110.0070.01016.89
7.2.100.0070.01016.75
7.2.90.0070.01416.93
7.2.80.0110.01116.88
7.2.70.0140.01116.76
7.2.60.0060.00916.69
7.2.50.0100.00616.95
7.2.40.0080.00316.54
7.2.30.0090.00617.00
7.2.20.0060.00316.65
7.2.10.0090.00917.05
7.2.00.0000.01316.80
7.1.330.0040.00815.82
7.1.320.0060.01015.67
7.1.310.0000.01515.61
7.1.300.0030.01015.72
7.1.290.0070.00715.72
7.1.280.0090.00615.74
7.1.270.0000.01415.58
7.1.260.0080.00815.95
7.1.250.0060.00615.98
7.1.70.0030.00617.00
7.1.60.0120.00319.40
7.1.50.0070.01416.98
7.1.00.0000.07022.43
7.0.200.0070.00316.41
7.0.140.0030.07722.00
7.0.120.0000.07722.00
7.0.60.0100.07719.96
7.0.50.0000.08017.82
7.0.40.0000.06017.81
7.0.30.0100.04717.79
7.0.20.0030.04317.66
7.0.10.0170.07017.78
7.0.00.0100.04317.66
5.6.280.0070.06721.09
5.6.210.0200.06720.59
5.6.200.0130.07718.08
5.6.190.0100.07718.15
5.6.180.0200.07018.18
5.6.170.0230.03318.21
5.6.160.0000.04318.21
5.6.150.0030.07718.19
5.6.140.0030.04718.21
5.6.130.0100.04318.17
5.6.120.0400.04718.20
5.6.110.0070.07318.21
5.6.100.0100.04318.13
5.6.90.0030.08718.06
5.6.80.0070.04317.59
5.6.70.0200.04717.59
5.6.60.0070.04017.58
5.6.50.0100.05717.61
5.6.40.0130.07717.54
5.6.30.0070.07017.57
5.6.20.0030.07017.48
5.6.10.0100.07317.52
5.6.00.0000.04717.55
5.5.350.0070.08020.49
5.5.340.0070.05018.01
5.5.330.0000.08318.02
5.5.320.0100.06017.98
5.5.310.0030.04017.91
5.5.300.0070.05717.94
5.5.290.0070.04017.95
5.5.280.0100.04717.94
5.5.270.0000.06317.91
5.5.260.0130.06717.95
5.5.250.0130.03317.79
5.5.240.0130.04017.40
5.5.230.0070.08017.26
5.5.220.0100.06017.32
5.5.210.0030.08017.34
5.5.200.0030.07717.27
5.5.190.0030.07717.36
5.5.180.0030.06317.36
5.5.160.0100.04717.32
5.5.150.0100.07717.35
5.5.140.0070.05317.23
5.5.130.0170.06717.32
5.5.120.0030.05317.36
5.5.110.0100.07017.35
5.5.100.0130.05317.23
5.5.90.0030.04317.25
5.5.80.0070.06317.19
5.5.70.0000.04717.19
5.5.60.0070.04717.13
5.5.50.0070.07017.22
5.5.40.0170.06317.24
5.5.30.0130.06317.20
5.5.20.0070.08017.26
5.5.10.0100.04717.22
5.5.00.0030.04017.20
5.4.450.0030.04719.38
5.4.440.0030.08319.45
5.4.430.0070.07019.33
5.4.420.0030.05319.14
5.4.410.0070.06319.24
5.4.400.0130.04018.98
5.4.390.0030.06719.03
5.4.380.0130.04719.02
5.4.370.0300.02719.12
5.4.360.0030.08019.11
5.4.350.0200.06719.05
5.4.340.0070.05719.05
5.4.320.0130.07019.05
5.4.310.0130.07319.01
5.4.300.0100.07318.96
5.4.290.0070.06718.82
5.4.280.0170.06318.98
5.4.270.0070.08018.97
5.4.260.0070.03719.12
5.4.250.0070.08019.11
5.4.240.0100.04018.88
5.4.230.0100.08018.94
5.4.220.0000.06318.88
5.4.210.0100.05019.20
5.4.200.0070.06018.97
5.4.190.0030.07719.08
5.4.180.0100.05719.08
5.4.170.0030.08019.02
5.4.160.0070.04718.80
5.4.150.0030.08318.99
5.4.140.0170.05716.20
5.4.130.0030.04316.27
5.4.120.0100.07316.25
5.4.110.0070.06316.52
5.4.100.0070.05016.17
5.4.90.0030.05716.25
5.4.80.0070.07316.26
5.4.70.0170.06316.26
5.4.60.0070.06316.21
5.4.50.0030.07316.25
5.4.40.0070.07316.28
5.4.30.0100.06716.36
5.4.20.0100.04716.23
5.4.10.0030.07016.34
5.4.00.0170.05015.70
5.3.290.0200.06714.66
5.3.280.0100.07314.68
5.3.270.0130.07014.56
5.3.260.0070.06014.57
5.3.250.0070.03714.54
5.3.240.0000.08314.58
5.3.230.0070.04314.42
5.3.220.0030.06714.64
5.3.210.0000.06714.54
5.3.200.0230.06014.39
5.3.190.0070.07314.48
5.3.180.0070.08014.53
5.3.170.0070.07714.50
5.3.160.0070.06014.55
5.3.150.0030.05014.50
5.3.140.0130.07014.51
5.3.130.0030.07014.52
5.3.120.0100.04714.52
5.3.110.0070.08014.50
5.3.100.0070.06713.98
5.3.90.0070.07313.95
5.3.80.0070.06313.78
5.3.70.0130.06713.92
5.3.60.0000.05713.94
5.3.50.0170.06713.93
5.3.40.0100.07013.86
5.3.30.0100.05713.68
5.3.20.0170.05013.61
5.3.10.0100.05013.59
5.3.00.0100.04013.62
5.2.170.0100.03311.09
5.2.160.0070.06011.29
5.2.150.0030.06311.12
5.2.140.0000.05011.10
5.2.130.0030.06311.04
5.2.120.0100.04011.00
5.2.110.0000.03711.08
5.2.100.0070.06310.88
5.2.90.0070.06010.88
5.2.80.0030.04311.04
5.2.70.0000.03311.09
5.2.60.0070.06010.87
5.2.50.0030.04710.80
5.2.40.0030.04010.96
5.2.30.0070.06010.96
5.2.20.0100.04010.97
5.2.10.0100.06010.93
5.2.00.0070.06310.74
5.1.60.0070.05010.03
5.1.50.0130.04310.07
5.1.40.0070.0339.93
5.1.30.0030.04310.47
5.1.20.0030.03710.20
5.1.10.0030.04010.10
5.1.00.0030.03310.21
5.0.50.0030.0409.01
5.0.40.0000.0239.01
5.0.30.0070.0439.01
5.0.20.0000.0409.01
5.0.10.0070.0239.01
5.0.00.0030.0379.01
4.4.90.0030.0279.01
4.4.80.0030.0339.01
4.4.70.0000.0339.01
4.4.60.0000.0309.01
4.4.50.0000.0239.01
4.4.40.0100.0409.01
4.4.30.0070.0279.01
4.4.20.0030.0339.01
4.4.10.0000.0409.01
4.4.00.0030.0379.01
4.3.110.0000.0209.01
4.3.100.0000.0239.01
4.3.90.0030.0279.01
4.3.80.0070.0239.01
4.3.70.0030.0379.01
4.3.60.0000.0339.01
4.3.50.0030.0379.01
4.3.40.0000.0409.01
4.3.30.0030.0209.01
4.3.20.0000.0209.01
4.3.10.0030.0139.01
4.3.00.0000.0279.01

preferences:
43.19 ms | 400 KiB | 5 Q