3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * PHP GD * create a simple image with GD library * */ //setting the image header in order to proper display the image header("Content-Type: image/png"); //try to create an image $im = @imagecreatefromstring(file_get_contents("https://s-media-cache-ak0.pinimg.com/736x/ed/35/da/ed35da7a6dc2ed26670c73df4207eb22.jpg")) or die("Cannot Initialize new GD image stream"); //set the color for the text $text_color = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($img, 255, 255, 255); //adf the string to the image imagestring($im, 5, 0, 0, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", $text_color); imagestring($im, 5, 0, 20,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", $text_color); imageline($im,0,200,300,202,$white); //outputs the image as png imagepng($im); //frees any memory associated with the image 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)
8.3.70.0120.00916.63
8.3.60.0140.00716.63
8.3.50.0070.01122.04
8.3.40.0070.00718.66
8.3.30.0130.00318.44
8.3.20.0070.00020.21
8.3.10.0030.00623.57
8.3.00.0000.00819.85
8.2.190.0090.00616.75
8.2.180.0130.00618.54
8.2.170.0130.00622.96
8.2.160.0090.00519.22
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0030.00521.00
8.2.120.0050.00326.35
8.2.110.0000.00920.41
8.2.100.0000.01217.84
8.2.90.0040.00419.05
8.2.80.0050.00317.97
8.2.70.0030.00717.50
8.2.60.0050.00318.03
8.2.50.0030.00518.07
8.2.40.0080.00019.40
8.2.30.0050.00220.65
8.2.20.0000.01017.64
8.2.10.0040.00418.07
8.2.00.0040.00417.96
8.1.280.0110.00425.92
8.1.270.0150.00620.64
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0000.01121.78
8.1.230.0090.00320.96
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0030.00617.25
8.1.190.0000.00817.25
8.1.180.0050.00218.10
8.1.170.0080.00018.65
8.1.160.0040.00420.70
8.1.150.0040.00418.89
8.1.140.0040.00419.59
8.1.130.0000.00717.57
8.1.120.0070.00017.50
8.1.110.0030.00317.46
8.1.100.0000.00817.38
8.1.90.0040.00417.48
8.1.80.0070.00017.41
8.1.70.0000.00717.44
8.1.60.0000.00717.50
8.1.50.0030.00517.48
8.1.40.0030.00717.47
8.1.30.0060.00317.46
8.1.20.0050.00217.52
8.1.10.0080.00017.45
8.1.00.0000.00817.44
8.0.300.0060.00318.77
8.0.290.0030.00516.88
8.0.280.0000.00718.46
8.0.270.0040.00417.33
8.0.260.0000.00717.19
8.0.250.0000.00717.01
8.0.240.0030.00517.04
8.0.230.0030.00317.00
8.0.220.0040.00416.91
8.0.210.0000.00716.98
8.0.200.0000.00716.92
8.0.190.0040.00417.06
8.0.180.0070.00016.94
8.0.170.0040.00417.04
8.0.160.0000.00716.87
8.0.150.0030.00716.84
8.0.140.0030.00316.94
8.0.130.0000.00613.39
8.0.120.0040.00416.93
8.0.110.0030.00516.89
8.0.100.0040.00416.94
8.0.90.0040.00416.86
8.0.80.0080.00817.02
8.0.70.0050.00316.94
8.0.60.0000.00716.79
8.0.50.0000.00816.85
8.0.30.0110.00617.19
8.0.20.0100.00817.40
8.0.10.0040.00417.11
8.0.00.0100.00816.79
7.4.330.0000.00616.79
7.4.320.0030.00316.42
7.4.300.0000.00616.55
7.4.290.0030.00316.49
7.4.280.0030.00616.57
7.4.270.0070.00016.40
7.4.260.0030.00316.45
7.4.250.0040.00416.32
7.4.240.0030.00516.43
7.4.230.0030.00316.66
7.4.220.0060.00916.60
7.4.210.0070.00716.61
7.4.200.0030.00316.58
7.4.160.0130.00316.45
7.4.150.0120.00617.40
7.4.140.0110.01417.86
7.4.130.0090.00816.73
7.4.120.0080.00916.59
7.4.110.0120.00616.45
7.4.100.0060.01016.55
7.4.90.0140.00416.40
7.4.80.0080.00919.39
7.4.70.0140.00716.24
7.4.60.0080.00816.55
7.4.50.0030.01216.51
7.4.40.0110.00716.62
7.4.30.0030.01416.55
7.4.00.0030.01314.98
7.3.330.0000.00613.14
7.3.320.0050.00013.18
7.3.310.0030.00316.10
7.3.300.0050.00216.19
7.3.290.0090.00716.33
7.3.280.0090.00716.29
7.3.270.0120.00917.40
7.3.260.0120.01516.54
7.3.250.0100.01016.51
7.3.240.0050.01116.37
7.3.230.0090.00816.39
7.3.210.0060.01016.25
7.3.200.0100.01016.46
7.3.190.0090.01216.36
7.3.180.0130.00316.52
7.3.170.0040.01316.62
7.3.160.0100.00616.30
7.3.120.0060.01014.97
7.3.110.0000.00914.80
7.3.100.0030.01015.04
7.3.90.0050.00514.88
7.3.80.0040.01115.02
7.3.70.0040.01114.84
7.3.60.0060.00614.59
7.3.50.0030.01114.70
7.3.40.0030.00914.63
7.3.30.0060.00614.88
7.3.20.0100.00316.51
7.3.10.0050.00816.47
7.3.00.0050.01016.52
7.2.330.0090.00916.32
7.2.320.0140.00316.24
7.2.310.0120.00416.35
7.2.300.0000.02016.64
7.2.290.0120.00616.70
7.2.240.0030.01015.01
7.2.230.0030.00515.05
7.2.220.0030.00914.82
7.2.210.0070.00714.73
7.2.200.0070.00714.68
7.2.190.0060.01014.92
7.2.180.0080.00514.63
7.2.170.0090.00614.89
7.2.160.0100.00714.68
7.2.150.0030.01016.72
7.2.140.0130.00016.67
7.2.130.0080.00816.72
7.2.120.0040.01216.75
7.2.110.0050.01016.95
7.2.100.0020.01316.77
7.2.90.0090.00616.85
7.2.80.0040.01216.93
7.2.70.0040.01216.59
7.2.60.0060.00816.72
7.2.50.0120.00316.87
7.2.40.0050.01016.64
7.2.30.0100.00516.58
7.2.20.0050.01016.98
7.2.10.0080.00916.80
7.2.00.0040.00817.62
7.1.330.0050.00515.62
7.1.320.0000.01415.90
7.1.310.0000.01315.46
7.1.300.0070.00715.62
7.1.290.0090.00315.43
7.1.280.0030.01015.74
7.1.270.0030.00915.48
7.1.260.0100.00715.57
7.1.250.0020.01115.76
7.1.200.0030.00915.48
7.1.100.0050.00818.00
7.1.70.0040.00417.00
7.1.60.0090.01319.13
7.1.50.0090.01316.92
7.1.00.0130.06722.35
7.0.200.0000.00916.86
7.0.60.0100.08319.98
7.0.50.0030.04317.87
7.0.40.0070.07720.30
7.0.30.0200.07020.18
7.0.20.0400.05720.33
7.0.10.0070.07320.15
7.0.00.0030.07320.13
5.6.280.0000.03321.12
5.6.210.0100.06320.50
5.6.200.0130.03018.17
5.6.190.0070.09020.43
5.6.180.0300.04720.46
5.6.170.0170.08020.54
5.6.160.0030.05720.40
5.6.150.0030.04018.15
5.6.140.0000.04318.21
5.6.130.0070.04718.11
5.6.120.0030.05320.91
5.6.110.0170.07321.09
5.6.100.0170.06021.06
5.6.90.0030.06720.98
5.6.80.0000.06020.36
5.5.350.0170.06320.38
5.5.340.0070.04017.98
5.5.330.0030.08320.25
5.5.320.0170.08320.28
5.5.310.0170.04020.27
5.5.300.0000.04317.96
5.5.290.0000.04317.98
5.5.280.0170.04020.68
5.5.270.0170.07320.86
5.5.260.0170.07020.76
5.5.250.0230.06320.58
5.5.240.0130.08020.26

preferences:
28.82 ms | 401 KiB | 5 Q