3v4l.org

run code in 300+ PHP versions simultaneously
<?php $finfo = new finfo(FILEINFO_MIME_TYPE); $postMimeType = $finfo->buffer(file_get_contents('http://4.bp.blogspot.com/-JOqxgp-ZWe0/U3BtyEQlEiI/AAAAAAAAOfg/Doq6Q2MwIKA/s1600/google-logo-874x288.png')); // If the URL has the file extension included, this will find it $fileExtension = pathinfo('http://4.bp.blogspot.com/-JOqxgp-ZWe0/U3BtyEQlEiI/AAAAAAAAOfg/Doq6Q2MwIKA/s1600/google-logo-874x288.png', PATHINFO_EXTENSION); // Otherwise, get file extension from the MIME type // This is necessary for image thumbnails to display correctly in the WordPress dashboard media section if ($fileExtension === '') { $fileExtension = basename($postMimeType); $filename = $filename . '.' . $fileExtension; } var_dump($fileExtension);

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.0120.00319.08
8.3.30.0120.00319.34
8.3.20.0040.00420.57
8.3.10.0040.00422.20
8.3.00.0000.00818.04
8.2.170.0150.00622.96
8.2.160.0100.00320.47
8.2.150.0000.00824.18
8.2.140.0070.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00421.09
8.2.110.0000.00919.42
8.2.100.0060.00618.09
8.2.90.0000.00818.00
8.2.80.0000.00818.94
8.2.70.0060.00317.63
8.2.60.0050.00317.88
8.2.50.0050.00317.63
8.2.40.0030.00620.07
8.2.30.0080.00018.12
8.2.20.0040.00417.93
8.2.10.0000.00718.18
8.2.00.0040.00417.81
8.1.270.0160.00324.21
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.01419.46
8.1.230.0110.00019.28
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0000.00917.23
8.1.180.0000.00818.10
8.1.170.0000.00818.63
8.1.160.0040.00422.12
8.1.150.0000.00719.07
8.1.140.0090.00017.64
8.1.130.0050.00317.99
8.1.120.0070.00017.44
8.1.110.0030.00517.55
8.1.100.0070.00017.41
8.1.90.0070.00017.42
8.1.80.0000.00717.55
8.1.70.0000.00717.49
8.1.60.0060.00317.76
8.1.50.0040.00417.53
8.1.40.0050.00317.50
8.1.30.0040.00417.77
8.1.20.0030.00617.63
8.1.10.0000.00817.61
8.1.00.0000.00917.68
8.0.300.0070.00019.91
8.0.290.0040.00417.00
8.0.280.0040.00418.63
8.0.270.0000.00717.47
8.0.260.0030.00317.45
8.0.250.0000.00717.19
8.0.240.0000.00717.14
8.0.230.0070.00017.11
8.0.220.0000.00816.94
8.0.210.0000.00717.07
8.0.200.0000.00717.04
8.0.190.0040.00417.04
8.0.180.0000.00817.10
8.0.170.0040.00417.11
8.0.160.0030.00317.20
8.0.150.0030.00616.95
8.0.140.0000.00717.00
8.0.130.0030.00313.63
8.0.120.0050.00317.22
8.0.110.0080.00017.11
8.0.100.0040.00417.23
8.0.90.0000.00817.20
8.0.80.0130.00717.14
8.0.70.0070.00017.04
8.0.60.0050.00317.05
8.0.50.0040.00417.13
8.0.30.0130.00817.37
8.0.20.0130.00717.50
8.0.10.0040.00417.32
8.0.00.0090.01217.03
7.4.330.0050.00015.42
7.4.320.0000.00716.68
7.4.300.0000.00616.77
7.4.290.0040.00716.67
7.4.280.0000.00716.75
7.4.270.0020.00516.82
7.4.260.0040.00416.71
7.4.250.0000.00816.81
7.4.240.0000.00816.82
7.4.230.0000.00716.73
7.4.220.0090.00916.87
7.4.210.0110.00416.93
7.4.200.0000.00716.64
7.4.160.0030.01316.69
7.4.150.0150.01117.40
7.4.140.0110.00817.86
7.4.130.0080.00916.79
7.4.120.0120.00716.84
7.4.110.0070.01016.77
7.4.100.0100.01016.82
7.4.90.0140.00716.61
7.4.80.0080.01619.39
7.4.70.0180.00316.90
7.4.60.0130.00616.77
7.4.50.0000.00416.55
7.4.40.0100.00716.60
7.4.30.0060.01016.84
7.4.10.0080.01215.22
7.4.00.0080.01215.21
7.3.330.0000.00513.39
7.3.320.0030.00313.35
7.3.310.0030.00316.55
7.3.300.0040.00416.57
7.3.290.0130.00316.53
7.3.280.0090.01016.51
7.3.270.0130.00617.40
7.3.260.0090.01216.66
7.3.250.0150.00416.57
7.3.240.0060.01316.84
7.3.230.0120.00616.39
7.3.210.0100.01016.86
7.3.200.0120.00619.39
7.3.190.0130.01016.91
7.3.180.0090.00916.61
7.3.170.0060.01216.91
7.3.160.0130.00316.66
7.3.130.0030.01715.04
7.3.120.0100.00915.08
7.3.110.0100.00715.07
7.3.100.0060.00614.57
7.3.90.0090.00315.05
7.3.80.0040.01114.86
7.3.70.0060.00614.89
7.3.60.0080.00414.67
7.3.50.0080.00815.02
7.3.40.0070.00715.04
7.3.30.0000.01414.66
7.3.20.0100.00316.82
7.3.10.0060.00716.82
7.3.00.0090.00416.61
7.2.330.0060.01216.87
7.2.320.0160.00316.85
7.2.310.0070.01016.96
7.2.300.0040.01616.62
7.2.290.0100.00916.92
7.2.260.0080.01015.20
7.2.250.0080.01115.43
7.2.240.0060.00915.20
7.2.230.0060.00915.04
7.2.220.0100.00315.24
7.2.210.0090.00615.15
7.2.200.0040.00814.97
7.2.190.0030.01314.79
7.2.180.0000.01015.27
7.2.170.0100.00714.84
7.2.160.0100.00615.18
7.2.150.0100.00316.56
7.2.140.0110.00416.80
7.2.130.0050.00617.12
7.2.120.0080.00616.79
7.2.110.0120.00317.13
7.2.100.0070.00616.91
7.2.90.0090.00717.08
7.2.80.0070.00817.05
7.2.70.0090.00617.09
7.2.60.0090.00616.98
7.2.50.0070.00817.19
7.2.40.0090.00316.96
7.2.30.0050.01117.10
7.2.20.0060.00717.07
7.2.10.0030.01116.80
7.2.00.0110.00717.99
7.1.330.0090.00316.17
7.1.320.0120.00315.69
7.1.310.0090.00616.00
7.1.300.0040.01115.95
7.1.290.0080.00416.03
7.1.280.0090.00915.80
7.1.270.0090.00915.88
7.1.260.0130.00016.02
7.1.250.0050.00716.01
7.1.240.0090.00315.89
7.1.230.0060.00615.82
7.1.220.0000.00815.70
7.1.210.0060.01315.93
7.1.200.0090.00515.98
7.1.190.0000.01315.78
7.1.180.0030.01016.00
7.1.170.0080.00416.08
7.1.160.0000.01216.04
7.1.150.0070.00715.79
7.1.140.0060.00315.86
7.1.130.0070.00715.95
7.1.120.0040.00716.12
7.1.110.0070.00716.16
7.1.100.0060.00717.01
7.1.90.0070.00315.73
7.1.80.0090.00615.80
7.1.70.0040.00716.64
7.1.60.0090.00917.71
7.1.50.0050.00916.32
7.1.40.0080.00815.60
7.1.30.0030.00716.02
7.1.20.0030.00915.85
7.1.10.0080.00816.11
7.1.00.0050.03919.36
7.0.330.0030.01215.27
7.0.320.0110.00415.42
7.0.310.0080.00315.48
7.0.300.0070.00715.63
7.0.290.0000.00815.36
7.0.280.0100.00715.63
7.0.270.0000.01515.24
7.0.260.0030.00915.54
7.0.250.0070.00715.74
7.0.240.0070.00715.64
7.0.230.0070.00715.63
7.0.220.0110.00415.45
7.0.210.0030.01015.42
7.0.200.0050.00516.24
7.0.190.0100.00615.71
7.0.180.0060.00615.33
7.0.170.0070.00715.41
7.0.160.0040.01115.63
7.0.150.0070.00715.38
7.0.140.0100.03818.97
7.0.130.0000.00915.29
7.0.120.0000.01615.46
7.0.110.0100.00315.63
7.0.100.0110.00815.70
7.0.90.0110.00715.19
7.0.80.0100.00315.64
7.0.70.0040.01115.19
7.0.60.0100.04317.99
7.0.50.0050.02316.88
7.0.40.0070.02716.95
7.0.30.0170.03316.98
7.0.20.0170.03017.08
7.0.10.0050.02517.11
7.0.00.0070.02517.18
5.6.400.0070.01014.77
5.6.390.0080.00814.84
5.6.380.0030.01014.43
5.6.370.0090.00014.35
5.6.360.0030.01014.72
5.6.350.0130.00314.69
5.6.340.0100.00314.73
5.6.330.0000.00914.68
5.6.320.0080.00814.26
5.6.310.0030.00914.84
5.6.300.0030.00614.74
5.6.290.0060.00914.72
5.6.280.0030.04218.04
5.6.270.0100.00614.66
5.6.260.0040.01514.42
5.6.250.0060.01014.10
5.6.240.0030.01014.41
5.6.230.0060.00614.62
5.6.220.0030.01314.39
5.6.210.0080.03117.71
5.6.200.0020.03216.61
5.6.190.0140.04517.67
5.6.180.0170.03617.80
5.6.170.0110.03017.72
5.6.160.0040.02317.80
5.6.150.0050.05116.64
5.6.140.0050.02316.52
5.6.130.0060.04616.33
5.6.120.0050.02218.20
5.6.110.0050.04018.08
5.6.100.0070.03217.84
5.6.90.0060.02617.94
5.6.80.0070.04417.59
5.6.70.0030.00914.52
5.6.60.0060.00614.63
5.6.50.0040.00714.12
5.6.40.0090.00614.45
5.6.30.0110.00614.65
5.6.20.0040.01114.21
5.6.10.0130.00014.46
5.6.00.0030.01414.39
5.5.380.0040.00814.59
5.5.370.0000.01514.30
5.5.360.0040.01214.60
5.5.350.0040.04317.47
5.5.340.0070.03016.31
5.5.330.0070.04717.65
5.5.320.0080.04117.51
5.5.310.0070.02817.70
5.5.300.0090.03216.39
5.5.290.0070.02016.36
5.5.280.0080.04717.82
5.5.270.0080.04017.79
5.5.260.0030.04717.68
5.5.250.0070.04317.84
5.5.240.2080.02517.40
5.5.230.0120.00014.49
5.5.220.0080.00414.38
5.5.210.0000.01714.59
5.5.200.0070.00714.52
5.5.190.0070.00414.26
5.5.180.0070.01014.49
5.5.170.0040.01114.53
5.5.160.0070.01014.17
5.5.150.0040.00814.69
5.5.140.0040.01214.28
5.5.130.0060.00314.36
5.5.120.0040.01114.21
5.5.110.0110.00414.37
5.5.100.0000.01814.48
5.5.90.0060.00914.14
5.5.80.0090.00314.39
5.5.70.0000.01314.13
5.5.60.0030.00614.55
5.5.50.0090.00614.23
5.5.40.0070.00714.58
5.5.30.0090.00314.36
5.5.20.0040.00714.24
5.5.10.0040.01114.62
5.5.00.0070.00714.45
5.4.450.0220.02315.51
5.4.440.0200.02715.44
5.4.430.0280.02415.40
5.4.420.0120.02715.29
5.4.410.0180.02415.24
5.4.400.0230.02115.37
5.4.390.0170.02415.27
5.4.380.0050.03514.96
5.4.370.0130.02615.10
5.4.360.0080.03115.07
5.4.350.0080.03114.88
5.4.340.0100.03015.02
5.4.330.0060.00611.00
5.4.320.0040.02211.98
5.4.310.0060.02411.79
5.4.300.0070.02112.04
5.4.290.0060.02811.99
5.4.280.0060.02711.97
5.4.270.0050.02311.67
5.4.260.0080.02611.95
5.4.250.0050.02212.00
5.4.240.0020.02511.89
5.4.230.0020.02811.84
5.4.220.0070.02111.91
5.4.210.0050.02111.89
5.4.200.0050.02211.90
5.4.190.0040.02311.69
5.4.180.0040.02111.89
5.4.170.0070.02111.86
5.4.160.0060.01911.90
5.4.150.0080.01911.85
5.4.140.0070.02411.66
5.4.130.0060.02511.78
5.4.120.0040.02311.55
5.4.110.0030.03011.78
5.4.100.0090.02311.55
5.4.90.0050.02511.70
5.4.80.0090.02011.76
5.4.70.0040.02311.68
5.4.60.0070.02311.61
5.4.50.0050.02011.56
5.4.40.0080.02311.54
5.4.30.0090.02111.62
5.4.20.0100.01711.60
5.4.10.0050.02211.83
5.4.00.0060.02111.46
5.3.290.0080.02011.88
5.3.280.0040.02411.58
5.3.270.0040.02411.71
5.3.260.0060.02111.65
5.3.250.0040.02711.65
5.3.240.0060.02611.65
5.3.230.0030.02611.62
5.3.220.0040.02611.69
5.3.210.0020.02611.66
5.3.200.0050.02511.70
5.3.190.0040.02211.74
5.3.180.0060.02211.83
5.3.170.0040.02411.85
5.3.160.0070.02011.83
5.3.150.0050.02311.84
5.3.140.0050.03011.77
5.3.130.0050.03311.75
5.3.120.0050.03011.76
5.3.110.0060.02211.71
5.3.100.0040.02011.51
5.3.90.0070.01911.49
5.3.80.0080.02011.41
5.3.70.0080.02311.40
5.3.60.0070.02211.45
5.3.50.0040.02311.39
5.3.40.0070.02111.39
5.3.30.0040.02311.29
5.3.20.0050.02111.24
5.3.10.0090.01711.12
5.3.00.0040.02311.08
5.2.170.0020.0319.18
5.2.160.0060.0269.18
5.2.150.0080.0269.18
5.2.140.0050.0299.18
5.2.130.0050.0329.13
5.2.120.0040.0289.14
5.2.110.0040.0289.15
5.2.100.0040.0339.14
5.2.90.0020.0339.14
5.2.80.0050.0369.14
5.2.70.0070.0399.14
5.2.60.0040.0359.09
5.2.50.0020.0389.06
5.2.40.0060.0339.04
5.2.30.0040.0299.02
5.2.20.0040.0289.00
5.2.10.0050.0448.92
5.2.00.0030.0298.79
5.1.60.0030.0288.07
5.1.50.0060.0348.06
5.1.40.0040.0248.05
5.1.30.0040.0258.39
5.1.20.0040.0258.41
5.1.10.0050.0258.14
5.1.00.0030.0298.14
5.0.50.0030.0306.62
5.0.40.0020.0196.48
5.0.30.0030.0416.29
5.0.20.0050.0186.26
5.0.10.0020.0216.25
5.0.00.0030.0306.23
4.4.90.0030.0154.78
4.4.80.0010.0174.75
4.4.70.0020.0164.75
4.4.60.0020.0164.75
4.4.50.0020.0174.77
4.4.40.0010.0344.71
4.4.30.0030.0144.76
4.4.20.0010.0164.85
4.4.10.0030.0224.85
4.4.00.0020.0334.76
4.3.110.0040.0154.67
4.3.100.0030.0154.66
4.3.90.0020.0154.64
4.3.80.0020.0244.59
4.3.70.0010.0264.63
4.3.60.0030.0144.63
4.3.50.0040.0214.62
4.3.40.0030.0274.54
4.3.30.0020.0193.28
4.3.20.0000.0263.26
4.3.10.0040.0143.21
4.3.00.0100.01315.28

preferences:
49.81 ms | 400 KiB | 5 Q