3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generatecaptcha(){ $randomcontent = str_split("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"); $content = null; for($i=0; $i<5; $i++){ $content = $content.$randomcontent[rand(0,60)]; } $image = ImageCreate(46, 17);//width and height imagecolorallocate($image, 0, 0, 0);//get background color for image image, r, g, b $font_color = imagecolorallocate($image, 255, 255, 255); imagestring($image, 10, 0, 0, $content, $font_color);//convert string to image-- image, font-size, x,y, string, font-color return imagejpeg($image); } generatecaptcha(); ?>

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.10.0110.00716.59
7.3.00.0080.01016.45
7.2.130.0100.00616.70
7.2.120.0100.00616.83
7.2.110.0090.00516.65
7.2.100.0100.00416.74
7.2.90.0100.00516.49
7.2.80.0060.01216.81
7.2.70.0070.01016.77
7.2.60.0130.00916.82
7.2.50.0120.00616.70
7.2.40.0120.00916.67
7.2.30.0070.01016.88
7.2.20.0080.00816.74
7.2.10.0090.00716.89
7.2.00.0100.00717.57
7.1.250.0120.00415.45
7.1.70.0000.01117.13
7.1.60.0130.00919.46
7.1.50.0030.00716.92
7.1.00.0000.07722.51
7.0.200.0000.00816.47
7.0.140.0130.06722.00
7.0.60.0070.07719.85
7.0.50.0100.07017.86
7.0.40.0070.04720.11
7.0.30.0600.07020.09
7.0.20.0270.08320.24
7.0.10.0100.08320.08
7.0.00.0100.08720.33
5.6.280.0000.07721.04
5.6.210.0000.04320.59
5.6.200.0070.08018.22
5.6.190.0100.03720.61
5.6.180.4370.03720.64
5.6.170.0200.05020.39
5.6.160.0070.05020.56
5.6.150.0100.04318.27
5.6.140.0070.08018.18
5.6.130.0070.04718.18
5.6.120.0070.05020.69
5.6.110.0100.07720.99
5.6.100.0170.07320.89
5.6.90.0030.07721.13
5.6.80.0130.06720.54
5.5.350.0200.05720.44
5.5.340.0000.04017.98
5.5.330.0070.05720.47
5.5.320.0470.07320.38
5.5.310.0370.06720.42
5.5.300.0070.05317.94
5.5.290.0070.06317.91
5.5.280.0100.07720.77
5.5.270.0070.06720.85
5.5.260.0070.08320.77
5.5.250.0100.08320.69
5.5.240.0100.08320.36
5.4.450.0200.04319.56
5.4.440.0630.03319.39
5.4.430.0170.05319.19
5.4.420.0230.04319.54
5.4.410.0230.02719.28
5.4.400.0200.03719.09
5.4.390.0300.04019.22
5.4.380.0400.05018.76
5.4.370.0830.05018.57
5.4.360.0530.05318.85
5.4.350.0630.07018.78
5.4.340.0470.06318.47
5.4.320.0060.03612.51
5.4.310.0030.04012.51
5.4.300.0060.03612.52
5.4.290.0070.03812.51
5.4.280.0070.03512.41
5.4.270.0050.03812.41
5.4.260.0060.04012.41
5.4.250.0060.03912.41
5.4.240.0060.03712.41
5.4.230.0100.04212.40
5.4.220.0080.03512.41
5.4.210.0050.03612.40
5.4.200.0070.03712.40
5.4.190.0080.03512.40
5.4.180.0070.03512.40
5.4.170.0060.04612.40
5.4.160.0080.03412.40
5.4.150.0080.03412.40
5.4.140.0090.03412.08
5.4.130.0060.03512.07
5.4.120.0060.03412.03
5.4.110.0070.03512.02
5.4.100.0080.03412.02
5.4.90.0060.04312.02
5.4.80.0050.04012.03
5.4.70.0070.03812.02
5.4.60.0060.03712.02
5.4.50.0080.03212.02
5.4.40.0060.03412.01
5.4.30.0060.03512.00
5.4.20.0100.03112.00
5.4.10.0040.03512.00
5.4.00.0050.03711.50
5.3.290.0070.04012.80
5.3.280.0080.03712.71
5.3.270.0050.04012.72
5.3.260.0060.03912.72
5.3.250.0080.03512.72
5.3.240.0080.03512.71
5.3.230.0050.03912.70
5.3.220.0040.03912.68
5.3.210.0070.03912.68
5.3.200.0070.03612.68
5.3.190.0030.04012.68
5.3.180.0080.03412.67
5.3.170.0110.03112.67
5.3.160.0080.03512.68
5.3.150.0040.03812.67
5.3.140.0040.03812.66
5.3.130.0050.04112.66
5.3.120.0090.04312.66
5.3.110.0040.04012.66
5.3.100.0060.03712.13
5.3.90.0050.04412.11
5.3.80.0050.03712.10
5.3.70.0070.03512.10
5.3.60.0070.03512.09
5.3.50.0060.03512.04
5.3.40.0090.03412.03
5.3.30.0050.03512.00
5.3.20.0070.03411.77
5.3.10.0040.03711.74
5.3.00.0030.03811.72
5.2.170.0030.0319.23
5.2.160.0030.0309.23
5.2.150.0060.0289.23
5.2.140.0050.0299.22
5.2.130.0070.0309.18
5.2.120.0070.0289.19
5.2.110.0060.0289.19
5.2.100.0020.0329.19
5.2.90.0030.0309.19
5.2.80.0030.0329.18
5.2.70.0040.0319.18
5.2.60.0030.0339.13
5.2.50.0070.0279.11
5.2.40.0070.0289.08
5.2.30.0050.0329.06
5.2.20.0040.0299.05
5.2.10.0040.0288.95
5.2.00.0060.0278.81
5.1.60.0040.0248.10
5.1.50.0050.0248.09
5.1.40.0030.0258.07
5.1.30.0020.0278.42
5.1.20.0060.0238.45
5.1.10.0100.0278.18
5.1.00.0030.0278.17
5.0.50.0020.0216.66
5.0.40.0030.0196.52
5.0.30.0030.0316.32
5.0.20.0030.0196.29
5.0.10.0020.0216.28
5.0.00.0030.0306.27
4.4.90.0010.0174.78
4.4.80.0020.0154.76
4.4.70.0040.0134.75
4.4.60.0010.0164.76
4.4.50.0020.0154.77
4.4.40.0020.0274.71
4.4.30.0040.0184.76
4.4.20.0020.0204.84
4.4.10.0020.0184.85
4.4.00.0020.0254.76
4.3.110.0020.0214.67
4.3.100.0050.0184.66
4.3.90.0030.0164.63
4.3.80.0020.0244.58
4.3.70.0030.0154.63
4.3.60.0020.0184.63
4.3.50.0030.0154.63
4.3.40.0050.0224.54
4.3.30.0030.0153.31
4.3.20.0030.0153.29
4.3.10.0040.0143.25
4.3.00.0030.01318.41

preferences:
38.75 ms | 401 KiB | 5 Q