3v4l.org

run code in 300+ PHP versions simultaneously
<?php function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } mt_srand(make_seed()); $size=512; $image = imagecreatetruecolor($size,$size); $black = imagecolorallocate ($image, 0,0,0 ); $white = imagecolorallocate ($image, 255,255,255 ); for ($x = 0; $x<$size; $x++) { for ($y = 0; $y<$size; $y++) { imagesetpixel($image,$x,$y,mt_rand(0,1)?$black:$white); } } header ('Content-Type: image/png'); imagepng($image); ?>

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.00.0100.00716.56
7.2.130.0110.00916.89
7.2.120.0090.00916.54
7.2.110.0140.00016.71
7.2.100.0070.01016.63
7.2.90.0100.00716.61
7.2.80.0120.00316.87
7.2.70.0160.00016.57
7.2.60.0110.00416.74
7.2.50.0070.00716.85
7.2.40.0130.00316.79
7.2.30.0030.01016.55
7.2.20.0140.00716.82
7.2.10.0090.00617.05
7.2.00.0060.00617.78
7.1.250.0160.00315.44
7.1.240.0100.00715.48
7.1.230.0070.00715.54
7.1.220.0090.00915.73
7.1.210.0060.00615.66
7.1.200.0100.00715.51
7.1.190.0030.01315.73
7.1.180.0180.00415.50
7.1.170.0090.00915.55
7.1.160.0070.00715.43
7.1.150.0150.00315.70
7.1.140.0080.00815.46
7.1.130.0100.01015.43
7.1.120.0090.00915.66
7.1.110.0160.00315.50
7.1.100.0090.00915.51
7.1.90.0170.00715.87
7.1.80.0130.00615.52
7.1.70.0070.00716.45
7.1.60.0090.01017.50
7.1.50.0200.00725.16
7.1.40.0120.00315.41
7.1.30.0100.00315.75
7.1.20.0100.00715.44
7.1.10.0130.00315.70
7.1.00.0110.03718.96
7.0.330.0130.00015.31
7.0.320.0110.00715.21
7.0.310.0070.01015.14
7.0.300.0060.01015.32
7.0.290.0090.00315.43
7.0.280.0040.01215.16
7.0.270.0140.00315.25
7.0.260.0040.00415.38
7.0.250.0150.00315.49
7.0.240.0100.00715.38
7.0.230.0130.01015.21
7.0.220.0110.00815.43
7.0.210.0160.00015.43
7.0.200.0090.00616.07
7.0.190.0110.00815.34
7.0.180.0090.00615.38
7.0.170.0060.00615.14
7.0.160.0130.00715.00
7.0.150.0030.00915.18
7.0.140.0060.04018.71
7.0.130.0120.00615.41
7.0.120.0060.03818.75
7.0.110.0100.03918.77
7.0.100.0110.03718.50
7.0.90.0090.03718.73
7.0.80.0080.03718.74
7.0.70.0080.03818.70
7.0.60.0080.03618.67
7.0.50.0050.04018.87
7.0.40.0020.03617.60
7.0.30.0030.04117.73
7.0.20.0050.04117.63
7.0.10.0060.04117.68
7.0.00.0090.03817.75
5.6.380.0000.01514.28
5.6.370.0100.00714.45
5.6.360.0000.01414.27
5.6.350.0060.00314.25
5.6.340.0090.00414.61
5.6.330.0090.00314.31
5.6.320.0040.01213.76
5.6.310.0040.00814.06
5.6.300.0000.00814.19
5.6.290.0000.01014.52
5.6.280.0030.04017.74
5.6.270.0030.00914.17
5.6.260.0020.04117.61
5.6.250.0080.03717.51
5.6.240.0060.04217.60
5.6.230.0030.04117.58
5.6.220.0080.03317.40
5.6.210.0100.03317.55
5.6.200.0030.03717.39
5.6.190.0080.03817.44
5.6.180.0020.04017.43
5.6.170.0080.03617.57
5.6.160.0050.04117.48
5.6.150.0050.04017.49
5.6.140.0100.04017.42
5.6.130.0090.03317.70
5.6.120.0080.03817.38
5.6.110.0050.04217.63
5.6.100.0030.04017.57
5.6.90.0090.03417.44
5.6.80.0080.03517.12
5.6.70.0070.03717.18
5.6.60.0050.04017.12
5.6.50.0040.04117.22
5.6.40.0070.03117.03
5.6.30.0090.03617.31
5.6.20.0060.03617.19
5.6.10.0080.03517.24
5.6.00.0050.03917.10
5.5.380.0030.03814.29
5.5.370.0020.04214.41
5.5.360.0020.04114.23
5.5.350.0060.03514.38
5.5.340.0040.03914.38
5.5.330.0040.04114.62
5.5.320.0060.03514.36
5.5.310.0070.03814.42
5.5.300.0080.03714.28
5.5.290.0070.03814.38
5.5.280.0020.04214.44
5.5.270.0040.04114.43
5.5.260.0030.04114.41
5.5.250.0050.03514.58
5.5.240.0070.03514.33
5.5.230.0050.04014.17
5.5.220.0050.03514.09
5.5.210.0060.03214.06
5.5.200.0010.04614.29
5.5.190.0070.03414.13
5.5.180.0030.04014.14
5.5.170.0100.00310.87
5.5.160.0040.03414.30
5.5.150.0050.03814.32
5.5.140.0050.03614.07
5.5.130.0030.03814.23
5.5.120.0050.03714.43
5.5.110.0010.03913.98
5.5.100.0040.03714.31
5.5.90.0050.03114.06
5.5.80.0060.03614.33
5.5.70.0000.04214.10
5.5.60.0050.03713.99
5.5.50.0020.03714.28
5.5.40.0010.03614.30
5.5.30.0050.03713.99
5.5.20.0040.03913.91
5.5.10.0050.03814.23
5.5.00.0060.03614.12
5.4.450.0070.03815.34
5.4.440.0040.04015.30
5.4.430.0070.03715.36
5.4.420.0030.03815.29
5.4.410.0060.03815.23
5.4.400.0070.03715.01
5.4.390.0040.03915.05
5.4.380.0030.03914.94
5.4.370.0060.03515.20
5.4.360.0040.03715.20
5.4.350.0030.04015.04
5.4.340.0060.03915.14
5.4.330.0040.00811.17
5.4.320.0060.03915.05
5.4.310.0080.03514.92
5.4.300.0100.02215.01
5.4.290.0020.04015.18
5.4.280.0060.03815.16
5.4.270.0090.03415.23
5.4.260.0080.03114.84
5.4.250.0060.03515.03
5.4.240.0040.03815.13
5.4.230.0070.03215.06
5.4.220.0030.03915.15
5.4.210.0050.03514.89
5.4.200.0060.03615.11
5.4.190.0050.03714.99
5.4.180.0020.03715.02
5.4.170.0080.03515.14
5.4.160.0040.03615.05
5.4.150.0070.03614.99
5.4.140.0040.03613.75
5.4.130.0030.03713.70
5.4.120.0020.03713.77
5.4.110.0000.03713.67
5.4.100.0040.03513.80
5.4.90.0030.03613.93
5.4.80.0020.03713.79
5.4.70.0000.03613.86
5.4.60.0020.03713.74
5.4.50.0050.03313.69
5.4.40.0070.03213.86
5.4.30.0030.03513.68
5.4.20.0030.03613.79
5.4.10.0030.03713.73
5.4.00.0060.03113.41

preferences:
38.32 ms | 401 KiB | 5 Q