3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Default imes taken from wp_get_mime_types(); $mimes = [ // Image formats. 'jpg|jpeg|jpe' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', 'bmp' => 'image/bmp', 'tiff|tif' => 'image/tiff', 'ico' => 'image/x-icon', // Video formats. 'asf|asx' => 'video/x-ms-asf', 'wmv' => 'video/x-ms-wmv', 'wmx' => 'video/x-ms-wmx', 'wm' => 'video/x-ms-wm', 'avi' => 'video/avi', 'divx' => 'video/divx', 'flv' => 'video/x-flv', 'mov|qt' => 'video/quicktime', 'mpeg|mpg|mpe' => 'video/mpeg', 'mp4|m4v' => 'video/mp4', 'ogv' => 'video/ogg', 'webm' => 'video/webm', 'mkv' => 'video/x-matroska', '3gp|3gpp' => 'video/3gpp', // Can also be audio '3g2|3gp2' => 'video/3gpp2', // Can also be audio // Text formats. 'txt|asc|c|cc|h|srt' => 'text/plain', 'csv' => 'text/csv', 'tsv' => 'text/tab-separated-values', 'ics' => 'text/calendar', 'rtx' => 'text/richtext', 'css' => 'text/css', 'htm|html' => 'text/html', 'vtt' => 'text/vtt', 'dfxp' => 'application/ttaf+xml', // Audio formats. 'mp3|m4a|m4b' => 'audio/mpeg', 'aac' => 'audio/aac', 'ra|ram' => 'audio/x-realaudio', 'wav' => 'audio/wav', 'ogg|oga' => 'audio/ogg', 'flac' => 'audio/flac', 'mid|midi' => 'audio/midi', 'wma' => 'audio/x-ms-wma', 'wax' => 'audio/x-ms-wax', 'mka' => 'audio/x-matroska', // Misc application formats. 'rtf' => 'application/rtf', 'js' => 'application/javascript', 'pdf' => 'application/pdf', 'swf' => 'application/x-shockwave-flash', 'class' => 'application/java', 'tar' => 'application/x-tar', 'zip' => 'application/zip', 'gz|gzip' => 'application/x-gzip', 'rar' => 'application/rar', '7z' => 'application/x-7z-compressed', 'exe' => 'application/x-msdownload', 'psd' => 'application/octet-stream', 'xcf' => 'application/octet-stream', // MS Office formats. 'doc' => 'application/msword', 'pot|pps|ppt' => 'application/vnd.ms-powerpoint', 'wri' => 'application/vnd.ms-write', 'xla|xls|xlt|xlw' => 'application/vnd.ms-excel', 'mdb' => 'application/vnd.ms-access', 'mpp' => 'application/vnd.ms-project', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12', 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', 'sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12', 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote', 'oxps' => 'application/oxps', 'xps' => 'application/vnd.ms-xpsdocument', // OpenOffice formats. 'odt' => 'application/vnd.oasis.opendocument.text', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odb' => 'application/vnd.oasis.opendocument.database', 'odf' => 'application/vnd.oasis.opendocument.formula', // WordPerfect formats. 'wp|wpd' => 'application/wordperfect', // iWork formats. 'key' => 'application/vnd.apple.keynote', 'numbers' => 'application/vnd.apple.numbers', 'pages' => 'application/vnd.apple.pages', ]; $site_exts = explode( ' ', 'tx xls' ); $site_mimes = array(); foreach ( $site_exts as $ext ) { foreach ( $mimes as $ext_pattern => $mime ) { if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false ) { $site_mimes[ $ext_pattern ] = $mime; } } } var_dump( $site_mimes );

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.4.20.0130.00717.52
8.4.10.0070.00320.76
8.3.150.0080.00016.57
8.3.140.0060.00317.10
8.3.130.0040.00418.34
8.3.120.0040.00420.83
8.3.110.0060.00316.50
8.3.100.0120.00624.06
8.3.90.0090.00326.77
8.3.80.0000.00816.38
8.3.70.0160.00618.30
8.3.60.0070.01116.50
8.3.50.0120.00523.69
8.3.40.0150.00718.67
8.3.30.0180.00018.54
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0070.00726.16
8.2.260.0110.00416.71
8.2.250.0120.00318.43
8.2.240.0000.00817.36
8.2.230.0000.01020.94
8.2.220.0060.00337.54
8.2.210.0130.00326.77
8.2.200.0060.00316.88
8.2.190.0000.01416.63
8.2.180.0100.01025.92
8.2.170.0110.00422.96
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0050.00326.35
8.2.110.0070.01021.12
8.2.100.0000.01217.91
8.2.90.0040.00417.75
8.2.80.0040.00418.91
8.2.70.0000.00817.63
8.2.60.0060.00317.73
8.2.50.0040.00418.05
8.2.40.0040.00418.34
8.2.30.0000.00718.02
8.2.20.0020.00518.14
8.2.10.0000.00819.29
8.2.00.0040.00419.20
8.1.310.0090.00916.29
8.1.300.0040.00416.14
8.1.290.0040.00818.88
8.1.280.0150.00325.92
8.1.270.0050.00323.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00422.66
8.1.230.0070.00420.96
8.1.220.0060.00317.77
8.1.210.0060.00318.77
8.1.200.0070.00417.36
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0040.00417.62
8.1.160.0020.00518.90
8.1.150.0030.00518.77
8.1.140.0000.00818.91
8.1.130.0000.00720.09
8.1.120.0000.00817.47
8.1.110.0040.00417.38
8.1.100.0050.00217.46
8.1.90.0040.00417.48
8.1.80.0000.00817.38
8.1.70.0040.00417.49
8.1.60.0040.00417.59
8.1.50.0000.00917.55
8.1.40.0000.00817.53
8.1.30.0030.00617.64
8.1.20.0050.00317.65
8.1.10.0080.00017.49
8.1.00.0050.00317.47
8.0.300.0000.00718.87
8.0.290.0000.00716.75
8.0.280.0050.00318.44
8.0.270.0000.00718.07
8.0.260.0030.00318.50
8.0.250.0030.00316.95
8.0.240.0080.00016.84
8.0.230.0040.00417.00
8.0.220.0030.00316.79
8.0.210.0000.00716.94
8.0.200.0000.00716.97
8.0.190.0040.00416.99
8.0.180.0000.00816.89
8.0.170.0090.00016.81
8.0.160.0000.00716.99
8.0.150.0040.00416.89
8.0.140.0030.00316.91
8.0.130.0000.00513.29
8.0.120.0030.00516.86
8.0.110.0080.00016.84
8.0.100.0080.00016.79
8.0.90.0030.00616.79
8.0.80.0070.01316.94
8.0.70.0050.00316.72
8.0.60.0040.00416.80
8.0.50.0000.00916.97
8.0.30.0150.00317.10
8.0.20.0130.00817.09
8.0.10.0040.00416.93
8.0.00.0040.01516.81
7.4.330.0050.00015.55
7.4.320.0030.00316.63
7.4.300.0070.00316.56
7.4.290.0040.00416.63
7.4.280.0040.00416.52
7.4.270.0030.00316.42
7.4.260.0030.00316.57
7.4.250.0000.00716.53
7.4.240.0030.00416.57
7.4.230.0040.00416.50
7.4.220.0010.00616.63
7.4.210.0070.01216.54
7.4.200.0000.00816.41
7.4.130.0100.00816.59
7.4.120.0110.00816.44
7.4.110.0150.00916.52
7.4.100.0070.01016.65
7.4.90.0060.01216.38
7.4.80.0060.01319.39
7.4.70.0140.00316.58
7.4.60.0130.01016.44
7.4.50.0140.00416.61
7.4.40.0100.00616.02
7.4.30.0070.01416.36
7.4.20.0070.01016.27
7.4.10.0070.01115.99
7.4.00.0130.00316.53
7.3.330.0030.00316.21
7.3.320.0000.00613.18
7.3.310.0070.00016.39
7.3.300.0070.00016.29
7.3.290.0000.00816.37
7.3.260.0110.00816.30
7.3.230.0060.01216.52
7.3.210.0150.00316.51
7.3.200.0080.00816.51
7.3.190.0140.00316.46
7.3.180.0030.01716.40
7.3.170.0060.00916.50
7.3.160.0120.00316.36
7.3.150.0090.01216.38
7.3.140.0070.01016.45
7.3.130.0060.01216.59
7.3.120.0080.00816.27
7.3.110.0130.00316.22
7.3.100.0040.01416.29
7.3.90.0080.00816.38
7.3.80.0060.01016.29
7.3.70.0030.01416.23
7.3.60.0060.01016.19
7.3.50.0060.01216.37
7.3.40.0130.00316.24
7.3.30.0070.01016.39
7.3.20.0070.01016.50
7.3.10.0070.01116.17
7.3.00.0100.00716.53
7.2.330.0130.01316.68
7.2.310.0070.01016.69
7.2.300.0070.01016.79
7.2.290.0120.00916.73
7.2.280.0120.01216.40
7.2.270.0110.00816.71
7.2.260.0120.00616.65
7.2.250.0090.01216.50
7.2.240.0100.00716.81
7.2.230.0030.01416.50
7.2.220.0080.00816.70
7.2.210.0030.01416.64
7.2.200.0030.01416.69
7.2.190.0030.01416.48
7.2.180.0160.00016.64
7.2.170.0060.01116.56
7.2.160.0040.01316.52
7.2.150.0110.00816.72
7.2.140.0140.00416.70
7.2.130.0030.01316.50
7.2.120.0070.01016.64
7.2.110.0100.00716.42
7.2.100.0100.00716.53
7.2.90.0070.01016.68
7.2.80.0140.00516.73
7.2.70.0170.00716.76
7.2.60.0110.00716.58
7.2.50.0090.00916.65
7.2.40.0120.00616.82
7.2.30.0140.01116.64
7.2.20.0090.00916.71
7.2.10.0070.01116.61
7.2.00.0110.00716.62

preferences:
78.92 ms | 403 KiB | 5 Q