3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imgSrc = "image.jpg"; if (exif_imagetype($imgSrc) == IMAGETYPE_GIF) { $filetype = 'The picture is GIF'; } if (exif_imagetype($imgSrc) == IMAGETYPE_JPEG) { $filetype = 'The picture is JPEG'; } if (exif_imagetype($imgSrc) == IMAGETYPE_PNG) { $filetype = 'The picture is PNG'; } echo $filetype;

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.60.0070.00718.29
8.3.50.0120.00722.03
8.3.40.0090.00618.73
8.3.30.0100.01018.80
8.3.20.0000.00720.34
8.3.10.0040.00421.85
8.3.00.0000.00819.13
8.2.180.0140.00716.63
8.2.170.0130.00322.96
8.2.160.0130.00020.27
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.38
8.2.110.0060.00319.31
8.2.100.0030.00917.72
8.2.90.0040.00418.97
8.2.80.0050.00318.05
8.2.70.0000.00817.50
8.2.60.0080.00317.79
8.2.50.0040.00418.07
8.2.40.0040.00419.95
8.2.30.0050.00319.44
8.2.20.0000.00717.64
8.2.10.0060.00319.75
8.2.00.0030.00619.71
8.1.280.0030.01425.92
8.1.270.0080.00020.32
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00423.91
8.1.230.0040.00720.89
8.1.220.0040.00418.77
8.1.210.0040.00419.13
8.1.200.0060.00317.22
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0040.00418.65
8.1.160.0000.00818.88
8.1.150.0030.00518.71
8.1.140.0040.00417.46
8.1.130.0030.00317.68
8.1.120.0000.00717.43
8.1.110.0000.00717.37
8.1.100.0080.00017.41
8.1.90.0040.00417.36
8.1.80.0040.00417.23
8.1.70.0070.00017.45
8.1.60.0060.00317.36
8.1.50.0040.00417.49
8.1.40.0030.00617.42
8.1.30.0030.00617.73
8.1.20.0000.00817.55
8.1.10.0000.00717.52
8.1.00.0080.00017.48
8.0.300.0100.00019.97
8.0.290.0070.00017.18
8.0.280.0070.00018.38
8.0.270.0070.00017.20
8.0.260.0000.00816.89
8.0.250.0030.00316.81
8.0.240.0030.00316.95
8.0.230.0000.00716.84
8.0.220.0000.00716.96
8.0.210.0070.00016.86
8.0.200.0000.00616.91
8.0.190.0060.00316.93
8.0.180.0030.00616.91
8.0.170.0000.00816.82
8.0.160.0070.00016.79
8.0.150.0000.00716.69
8.0.140.0040.00316.88
8.0.130.0060.00013.41
8.0.120.0050.00316.82
8.0.110.0030.00616.90
8.0.100.0070.00016.75
8.0.90.0050.00216.88
8.0.80.0030.01216.91
8.0.70.0070.00016.97
8.0.60.0000.00716.79
8.0.50.0070.00016.94
8.0.30.0120.00317.03
8.0.20.0130.00617.40
8.0.10.0000.00716.97
8.0.00.0140.00316.81
7.4.330.0000.00515.14
7.4.320.0070.00016.41
7.4.300.0000.00616.62
7.4.290.0040.00416.52
7.4.280.0040.00416.51
7.4.270.0060.00016.61
7.4.260.0050.00216.49
7.4.250.0040.00416.56
7.4.240.0020.00516.54
7.4.230.0000.00716.32
7.4.220.0060.01316.55
7.4.210.0150.00016.41
7.4.200.0040.00416.49
7.4.160.0130.01016.64
7.4.150.0030.01417.40
7.4.140.0120.01117.86
7.4.130.0090.01216.65
7.4.120.0080.00916.54
7.4.110.0070.01016.32
7.4.100.0110.01416.52
7.4.90.0090.00916.52
7.4.80.0100.01319.39
7.4.70.0030.01316.34
7.4.60.0100.00716.53
7.4.50.0000.00416.59
7.4.40.0060.00916.58
7.4.30.0030.01916.63
7.4.00.0000.01515.02
7.3.330.0000.00513.23
7.3.320.0000.00513.17
7.3.310.0040.00416.39
7.3.300.0050.00216.16
7.3.290.0030.01316.27
7.3.280.0110.00816.24
7.3.270.0100.00717.40
7.3.260.0140.00716.21
7.3.250.0080.00916.34
7.3.240.0130.01116.28
7.3.230.0130.00416.45
7.3.210.0070.01016.42
7.3.200.0110.00616.30
7.3.190.0090.00816.54
7.3.180.0060.01016.50
7.3.170.0110.00816.49
7.3.160.0060.01016.29
7.3.10.0070.00716.64
7.3.00.0060.01016.61
7.2.330.0070.01116.60
7.2.320.0120.00916.56
7.2.310.0090.00916.56
7.2.300.0080.00816.54
7.2.290.0170.00416.49
7.2.130.0090.00616.74
7.2.120.0080.00016.74
7.2.110.0070.01016.83
7.2.100.0100.00316.50
7.2.90.0070.00416.94
7.2.80.0000.01016.49
7.2.70.0000.01316.59
7.2.60.0030.01116.65
7.2.50.0130.00016.51
7.2.40.0040.00816.44
7.2.30.0000.01316.88
7.2.20.0070.00716.67
7.2.10.0070.00316.48
7.2.00.0040.01018.12
7.1.250.0080.00015.61
7.1.200.0030.00915.65
7.1.100.0000.00817.96
7.1.70.0000.00916.79
7.1.60.0100.01419.36
7.1.50.0090.00316.89
7.1.00.0100.07322.30
7.0.200.0070.00714.64
7.0.60.0230.08020.02
7.0.50.0030.08017.89
7.0.40.0070.07720.09
7.0.30.0330.05320.04
7.0.20.0430.05720.21
7.0.10.0030.06720.16
7.0.00.0100.05020.03
5.6.280.0070.06320.89
5.6.210.0130.07320.48
5.6.200.0070.08018.19
5.6.190.0130.08020.56
5.6.180.2570.04320.60
5.6.170.0370.06320.41
5.6.160.0070.07318.11
5.6.150.0100.07718.17
5.6.140.0030.08318.12
5.6.130.0030.08318.17
5.6.120.0200.07720.96
5.6.110.0130.08320.94
5.6.100.0000.04321.11
5.6.90.0100.08321.01
5.6.80.0070.05020.28
5.5.350.0100.03320.39
5.5.340.0100.05317.96
5.5.330.0070.05720.25
5.5.320.0200.04320.27
5.5.310.0300.08020.50
5.5.300.0030.04717.91
5.5.290.0100.06317.98
5.5.280.0070.08320.72
5.5.270.0170.06020.72
5.5.260.0070.08720.85
5.5.250.0100.04020.42
5.5.240.0200.06320.23
5.4.450.0330.06319.55
5.4.440.0600.06019.41
5.4.430.0100.05319.50
5.4.420.0000.06319.52
5.4.410.0100.07319.32
5.4.400.0000.07719.18
5.4.390.0070.05719.05
5.4.380.0100.05319.26
5.4.370.0230.04319.18
5.4.360.0130.05019.25
5.4.350.0130.05018.97
5.4.340.0170.04318.98
5.4.320.0070.05719.07
5.4.310.0130.04718.95
5.4.300.0030.05719.05
5.4.290.0100.05019.05
5.4.280.0170.05319.04
5.4.270.0170.04719.07
5.4.260.0070.05319.14
5.4.250.0030.06018.94
5.4.240.0030.06719.14
5.4.230.0070.05319.14
5.4.220.0130.05018.94
5.4.210.0070.05719.24
5.4.200.0100.04716.81
5.4.190.0130.05318.89
5.4.180.0170.04319.15
5.4.170.0070.06018.96
5.4.160.0170.04318.99
5.4.150.0070.05719.12
5.4.140.0070.05316.18
5.4.130.0030.05316.12
5.4.120.0100.04716.14
5.4.110.0070.05016.43
5.4.100.0070.05316.37
5.4.90.0100.05016.53
5.4.80.0130.04316.50
5.4.70.0170.04316.38
5.4.60.0070.05016.31
5.4.50.0070.05016.50
5.4.40.0130.05016.19
5.4.30.0170.04016.50
5.4.20.0070.05316.52
5.4.10.0170.05316.31
5.4.00.0070.05015.70
5.3.290.0100.06014.69
5.3.280.0070.05314.49
5.3.270.0130.05014.44
5.3.260.0070.05714.61
5.3.250.0070.05314.44
5.3.240.0130.04714.45
5.3.230.0100.06314.52
5.3.220.0070.06314.59
5.3.210.0200.04314.58
5.3.200.0070.05714.57
5.3.190.0070.05314.46
5.3.180.0030.05714.41
5.3.170.0070.05314.35
5.3.160.0000.05714.40
5.3.150.0130.07014.34
5.3.140.0070.07314.56
5.3.130.0100.05714.39
5.3.120.0030.05714.46
5.3.110.0170.05014.39
5.3.100.0100.04713.93
5.3.90.0070.05013.90
5.3.80.0030.05713.86
5.3.70.0030.05713.95
5.3.60.0170.05013.98
5.3.50.0070.05313.78
5.3.40.0100.04713.82
5.3.30.0170.04313.74
5.3.20.0130.04313.72
5.3.10.0070.05013.50
5.3.00.0030.05313.64
5.2.170.0100.04011.00
5.2.160.0170.03011.06
5.2.150.0070.04311.14
5.2.140.0030.04310.98
5.2.130.0030.04311.00
5.2.120.0030.04310.99
5.2.110.0070.04011.10
5.2.100.0030.04310.94
5.2.90.0030.04311.09
5.2.80.0100.04010.98
5.2.70.0130.03310.95
5.2.60.0070.04311.06
5.2.50.0130.03310.93
5.2.40.0130.03310.83
5.2.30.0030.04310.81
5.2.20.0100.03710.92
5.2.10.0130.03310.94
5.2.00.0100.03710.71
5.1.60.0100.0279.91
5.1.50.0100.03010.03
5.1.40.0070.0339.89
5.1.30.0130.03310.38
5.1.20.0070.03710.30
5.1.10.0070.03310.00
5.1.00.0100.0309.99
5.0.50.0030.0308.59
5.0.40.0030.0278.28
5.0.30.0030.0508.21
5.0.20.0070.0238.30
5.0.10.0000.0308.16
5.0.00.0000.0408.07
4.4.90.0030.0205.77
4.4.80.0000.0235.86
4.4.70.0000.0235.77
4.4.60.0030.0205.79
4.4.50.0030.0205.82
4.4.40.0030.0335.75
4.4.30.0030.0205.75
4.4.20.0000.0235.88
4.4.10.0000.0275.96
4.4.00.0000.0375.88
4.3.110.0000.0235.69
4.3.100.0030.0205.72
4.3.90.0000.0235.78
4.3.80.0000.0375.76
4.3.70.0000.0235.81
4.3.60.0000.0235.80
4.3.50.0000.0235.80
4.3.40.0000.0335.74
4.3.30.0000.0234.41
4.3.20.0000.0234.58
4.3.10.0000.0234.51
4.3.00.0070.0276.87

preferences:
52.04 ms | 401 KiB | 5 Q