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.40.0040.01118.79
8.3.30.0130.00318.90
8.3.20.0000.00720.39
8.3.10.0040.00423.51
8.3.00.0040.00419.97
8.2.170.0110.00422.96
8.2.160.0090.00620.17
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00421.00
8.2.120.0040.00426.35
8.2.110.0040.00421.13
8.2.100.0120.00017.72
8.2.90.0050.00317.91
8.2.80.0040.00418.09
8.2.70.0050.00317.63
8.2.60.0060.00317.92
8.2.50.0040.00418.10
8.2.40.0070.00020.42
8.2.30.0070.00020.63
8.2.20.0030.00517.64
8.2.10.0080.00018.01
8.2.00.0000.00818.05
8.1.270.0070.01320.61
8.1.260.0040.00428.09
8.1.250.0060.00328.09
8.1.240.0090.00022.05
8.1.230.0070.00320.85
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.00817.23
8.1.190.0030.00717.22
8.1.180.0050.00318.10
8.1.170.0050.00318.53
8.1.160.0000.00822.07
8.1.150.0000.00718.65
8.1.140.0030.00519.50
8.1.130.0030.00317.52
8.1.120.0000.00717.26
8.1.110.0050.00217.36
8.1.100.0030.00517.28
8.1.90.0050.00317.36
8.1.80.0040.00417.36
8.1.70.0040.00417.24
8.1.60.0000.00717.44
8.1.50.0000.00817.49
8.1.40.0060.00317.48
8.1.30.0050.00317.50
8.1.20.0050.00217.59
8.1.10.0040.00417.43
8.1.00.0040.00417.45
8.0.300.0040.00419.88
8.0.290.0030.00616.73
8.0.280.0030.00318.27
8.0.270.0030.00317.11
8.0.260.0000.00617.18
8.0.250.0070.00016.97
8.0.240.0040.00416.86
8.0.230.0030.00416.88
8.0.220.0070.00016.90
8.0.210.0000.00716.89
8.0.200.0030.00316.91
8.0.190.0000.00716.94
8.0.180.0040.00416.97
8.0.170.0000.00716.84
8.0.160.0040.00316.94
8.0.150.0090.00016.84
8.0.140.0000.00716.86
8.0.130.0030.00313.38
8.0.120.0000.00816.90
8.0.110.0050.00316.91
8.0.100.0000.00716.96
8.0.90.0000.00716.97
8.0.80.0120.00416.84
8.0.70.0040.00416.87
8.0.60.0000.00716.74
8.0.50.0000.00716.69
8.0.30.0120.00816.95
8.0.20.0080.01117.40
8.0.10.0070.00016.91
8.0.00.0090.01016.65
7.4.330.0050.00016.84
7.4.320.0000.00716.54
7.4.300.0030.00316.56
7.4.290.0030.00316.58
7.4.280.0060.00316.50
7.4.270.0070.00016.50
7.4.260.0040.00416.44
7.4.250.0040.00416.41
7.4.240.0020.00516.46
7.4.230.0000.00716.46
7.4.220.0090.00616.46
7.4.210.0000.01416.57
7.4.200.0050.00316.50
7.4.160.0130.00316.45
7.4.150.0130.00317.40
7.4.140.0160.00617.86
7.4.130.0110.00716.55
7.4.120.0130.00816.50
7.4.110.0060.01616.42
7.4.100.0180.00316.42
7.4.90.0110.00616.55
7.4.80.0100.01019.39
7.4.70.0100.00916.58
7.4.60.0160.00016.37
7.4.50.0090.00916.66
7.4.40.0170.00016.21
7.4.30.0140.00316.45
7.4.10.0070.01014.72
7.4.00.0060.00814.83
7.3.330.0000.00613.02
7.3.320.0000.00513.12
7.3.310.0030.00316.41
7.3.300.0000.00816.27
7.3.290.0070.00716.23
7.3.280.0090.00916.31
7.3.270.0130.00617.40
7.3.260.0090.01216.56
7.3.250.0070.01016.33
7.3.240.0060.01116.31
7.3.230.0060.01216.39
7.3.210.0070.01016.34
7.3.200.0060.01316.18
7.3.190.0090.01216.62
7.3.180.0040.01216.51
7.3.170.0100.00716.27
7.3.160.0090.00616.29
7.3.130.0030.01314.54
7.3.120.0060.01114.68
7.3.110.0090.00915.06
7.3.100.0120.00414.73
7.3.90.0120.00314.78
7.3.80.0050.00514.71
7.3.70.0030.01014.91
7.3.60.0000.01014.73
7.3.50.0060.00614.91
7.3.40.0060.00614.83
7.3.30.0060.01014.58
7.3.20.0140.00716.77
7.3.10.0070.00716.34
7.3.00.0000.00916.68
7.2.330.0120.00616.30
7.2.320.0130.00616.67
7.2.310.0100.00616.34
7.2.300.0070.01016.24
7.2.290.0060.01016.56
7.2.260.0110.00614.98
7.2.250.0040.01414.83
7.2.240.0070.01014.83
7.2.230.0080.00614.76
7.2.220.0000.01514.79
7.2.210.0070.01014.95
7.2.200.0000.01714.88
7.2.190.0070.01014.86
7.2.180.0110.00414.82
7.2.170.0150.00014.91
7.2.160.0060.00614.68
7.2.150.0080.00816.80
7.2.140.0000.01416.79
7.2.130.0070.01016.50
7.2.120.0040.01416.58
7.2.110.0040.01216.88
7.2.100.0070.00716.83
7.2.90.0140.00016.87
7.2.80.0070.00716.85
7.2.70.0090.00616.67
7.2.60.0140.00016.68
7.2.50.0100.00616.82
7.2.40.0090.00616.70
7.2.30.0100.00716.84
7.2.20.0090.00316.89
7.2.10.0060.00616.68
7.2.00.0080.00518.03
7.1.330.0110.00415.55
7.1.320.0110.00015.41
7.1.310.0040.01115.87
7.1.300.0000.01615.69
7.1.290.0040.01215.77
7.1.280.0120.00315.68
7.1.270.0130.00715.77
7.1.260.0030.01015.71
7.1.250.0060.01015.58
7.1.240.0060.01015.66
7.1.230.0090.00615.66
7.1.220.0090.00615.51
7.1.210.0080.00415.59
7.1.200.0070.00815.77
7.1.190.0060.00915.34
7.1.180.0070.00715.69
7.1.170.0110.00015.68
7.1.160.0060.00915.77
7.1.150.0130.00315.60
7.1.140.0060.00615.75
7.1.130.0000.01215.64
7.1.120.0060.00915.73
7.1.110.0060.00915.77
7.1.100.0050.00716.90
7.1.90.0060.00615.60
7.1.80.0070.00715.77
7.1.70.0040.00516.32
7.1.60.0070.01017.48
7.1.50.0030.01016.34
7.1.40.0080.00815.48
7.1.30.0030.00715.55
7.1.20.0050.01015.74
7.1.10.0030.00615.49
7.1.00.0050.03719.02
7.0.330.0130.00315.30
7.0.320.0060.00315.34
7.0.310.0030.00615.05
7.0.300.0100.00315.31
7.0.290.0070.00715.28
7.0.280.0070.00715.27
7.0.270.0040.01115.23
7.0.260.0030.00915.30
7.0.250.0060.00615.38
7.0.240.0070.00715.32
7.0.230.0070.00415.40
7.0.220.0000.01215.42
7.0.210.0060.00615.20
7.0.200.0030.00916.06
7.0.190.0040.00415.19
7.0.180.0090.00015.20
7.0.170.0000.01715.44
7.0.160.0060.00815.11
7.0.150.0060.00315.37
7.0.140.0000.01015.30
7.0.130.0120.00315.39
7.0.120.0090.00615.02
7.0.110.0000.00915.14
7.0.100.0030.00715.40
7.0.90.0000.01415.38
7.0.80.0060.00615.31
7.0.70.0030.01015.14
7.0.60.0030.04017.70
7.0.50.0020.05216.51
7.0.40.0050.03316.68
7.0.30.0180.04016.67
7.0.20.0230.04316.79
7.0.10.0080.04416.79
7.0.00.0080.03816.71
5.6.400.0080.00613.79
5.6.390.0000.01513.93
5.6.380.0080.00813.96
5.6.370.0000.00814.07
5.6.360.0070.00714.18
5.6.350.0030.00614.25
5.6.340.0070.00714.07
5.6.330.0040.00814.37
5.6.320.0080.00514.52
5.6.310.0050.00514.34
5.6.300.0000.00914.34
5.6.290.0040.00413.91
5.6.280.0050.01817.50
5.6.270.0080.00614.15
5.6.260.0050.00514.38
5.6.250.0050.00514.36
5.6.240.0110.00414.04
5.6.230.0040.01514.20
5.6.220.0120.00313.85
5.6.210.0030.04417.33
5.6.200.0100.02016.26
5.6.190.0080.02017.25
5.6.180.0170.02517.42
5.6.170.0210.02317.29
5.6.160.0070.04617.14
5.6.150.0020.02616.33
5.6.140.0060.02416.01
5.6.130.0110.04316.13
5.6.120.0050.02817.54
5.6.110.0050.04517.65
5.6.100.0080.04217.42
5.6.90.0090.04217.57
5.6.80.0080.02517.12
5.6.70.0040.00814.09
5.6.60.0120.00013.91
5.6.50.0070.00314.06
5.6.40.0000.01313.96
5.6.30.0070.00714.14
5.6.20.0050.00314.29
5.6.10.0040.00814.13
5.6.00.0000.01513.96
5.5.380.0030.00513.95
5.5.370.0070.00714.27
5.5.360.0000.01313.66
5.5.350.0030.03717.36
5.5.340.0080.02615.95
5.5.330.0030.03117.26
5.5.320.0150.04217.04
5.5.310.0100.02517.28
5.5.300.0020.02515.97
5.5.290.0080.01916.09
5.5.280.0060.03017.50
5.5.270.0080.02617.55
5.5.260.0050.04017.34
5.5.250.0050.04417.30
5.5.240.0100.04017.15
5.5.230.0000.01313.71
5.5.220.0030.01013.98
5.5.210.0030.00713.93
5.5.200.0000.01713.91
5.5.190.0070.00314.02
5.5.180.0030.00713.80
5.5.170.0070.00714.05
5.5.160.0110.00313.88
5.5.150.0040.00414.15
5.5.140.0050.00313.79
5.5.130.0030.00914.06
5.5.120.0000.01214.14
5.5.110.0000.01313.87
5.5.100.0060.00314.18
5.5.90.0030.00713.91
5.5.80.0040.00813.97
5.5.70.0040.00413.83
5.5.60.0000.01314.16
5.5.50.0090.00614.13
5.5.40.0070.01013.92
5.5.30.0130.00714.01
5.5.20.0090.00613.80
5.5.10.0130.00714.09
5.5.00.0130.00313.87

preferences:
50.64 ms | 400 KiB | 5 Q