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 && preg_match( '!^(' . $ext_pattern . ')$!i', $ext ) ) { $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.0160.00620.00
8.4.10.0000.00921.52
8.3.150.0150.00617.32
8.3.140.0050.00319.01
8.3.130.0040.00718.63
8.3.120.0060.01019.07
8.3.110.0120.00620.94
8.3.100.0090.00024.06
8.3.90.0050.00326.77
8.3.80.0100.00016.88
8.3.70.0130.00316.75
8.3.60.0130.01016.73
8.3.50.0120.00923.88
8.3.40.0060.00919.47
8.3.30.0120.00618.79
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.260.0160.00616.97
8.2.250.0080.00018.57
8.2.240.0100.01019.02
8.2.230.0050.00522.58
8.2.220.0040.00437.54
8.2.210.0000.00826.77
8.2.200.0030.00716.88
8.2.190.0110.01117.00
8.2.180.0100.01025.92
8.2.170.0160.00019.29
8.2.160.0120.00622.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0000.00826.35
8.2.110.0070.00321.16
8.2.100.0090.00318.10
8.2.90.0030.00518.41
8.2.80.0030.00719.16
8.2.70.0080.00417.75
8.2.60.0000.00917.75
8.2.50.0000.00818.05
8.2.40.0060.00320.20
8.2.30.0000.00818.26
8.2.20.0080.00018.24
8.2.10.0050.00319.32
8.2.00.0040.00419.45
8.1.310.0070.01417.00
8.1.300.0060.00319.98
8.1.290.0060.00318.88
8.1.280.0110.00725.92
8.1.270.0080.00023.99
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0100.00022.67
8.1.230.0040.00821.12
8.1.220.0000.00817.91
8.1.210.0040.00418.88
8.1.200.0030.00717.73
8.1.190.0080.00017.60
8.1.180.0030.00618.10
8.1.170.0000.00819.09
8.1.160.0050.00318.99
8.1.150.0050.00318.96
8.1.140.0040.00420.85
8.1.130.0040.00420.32
8.1.120.0030.00617.62
8.1.110.0040.00417.65
8.1.100.0050.00317.61
8.1.90.0050.00317.75
8.1.80.0060.00317.73
8.1.70.0030.00517.73
8.1.60.0000.00917.73
8.1.50.0030.00617.73
8.1.40.0000.00917.66
8.1.30.0000.00817.89
8.1.20.0000.01017.81
8.1.10.0060.00317.75
8.1.00.0040.00717.80
8.0.300.0040.00420.34
8.0.290.0000.00817.00
8.0.280.0040.00418.53
8.0.270.0040.00418.08
8.0.260.0040.00420.18
8.0.250.0000.00717.18
8.0.240.0040.00417.09
8.0.230.0040.00417.02
8.0.220.0050.00217.10
8.0.210.0030.00517.12
8.0.200.0030.00317.19
8.0.190.0030.00517.19
8.0.180.0050.00317.08
8.0.170.0060.00317.14
8.0.160.0080.00017.04
8.0.150.0040.00416.96
8.0.140.0040.00417.09
8.0.130.0000.00613.51
8.0.120.0080.00017.04
8.0.110.0000.00916.96
8.0.100.0030.00617.11
8.0.90.0030.00617.05
8.0.80.0080.01217.09
8.0.70.0030.00517.11
8.0.60.0000.00817.15
8.0.50.0060.00317.14
8.0.30.0090.00917.25
8.0.20.0070.01317.44
8.0.10.0000.00817.20
8.0.00.0120.00916.88
7.4.330.0030.00315.55
7.4.320.0000.00716.78
7.4.300.0030.00316.70
7.4.290.0040.00416.74
7.4.280.0000.00916.83
7.4.270.0040.00416.79
7.4.260.0030.00313.56
7.4.250.0080.00016.64
7.4.240.0040.00516.88
7.4.230.0030.00616.77
7.4.220.0030.00516.82
7.4.210.0090.01016.78
7.4.200.0050.00316.96
7.4.130.0140.00516.85
7.4.120.0070.01316.70
7.4.110.0130.01016.77
7.4.100.0090.00916.80
7.4.90.0090.00916.85
7.4.80.0040.01819.39
7.4.70.0120.00616.58
7.4.60.0100.01016.64
7.4.50.0170.00716.65
7.4.40.0120.01216.40
7.4.30.0130.01016.71
7.4.20.0080.01116.49
7.4.10.0030.01516.59
7.4.00.0050.01316.73
7.3.330.0080.00016.67
7.3.320.0000.00713.31
7.3.310.0050.00216.73
7.3.300.0030.00516.58
7.3.290.0090.00616.61
7.3.260.0090.01916.67
7.3.240.0100.00816.70
7.3.230.0090.00916.48
7.3.210.0120.00616.55
7.3.200.0120.00616.80
7.3.190.0110.00716.57
7.3.180.0100.01016.74
7.3.170.0110.01116.91
7.3.160.0130.01016.81
7.3.150.0070.01116.72
7.3.140.0190.00016.63
7.3.130.0160.00616.57
7.3.120.0120.00616.68
7.3.110.0190.00616.57
7.3.100.0180.00616.70
7.3.90.0100.00916.84
7.3.80.0130.01316.90
7.3.70.0160.00816.58
7.3.60.0250.00616.70
7.3.50.0110.01516.66
7.3.40.0110.01416.72
7.3.30.0120.01216.72
7.3.20.0150.00816.50
7.3.10.0190.00616.60
7.3.00.0270.01116.61
7.2.330.0120.01216.93
7.2.320.0060.01416.95
7.2.310.0150.00816.88
7.2.300.0150.00616.85
7.2.290.0160.00816.91
7.2.280.0130.00817.11
7.2.270.0070.01316.86
7.2.260.0060.01517.05
7.2.250.0170.00716.76
7.2.240.0120.01116.72
7.2.230.0180.00316.82
7.2.220.0120.00816.98
7.2.210.0150.00616.63
7.2.200.0170.00917.07
7.2.190.0290.00417.03
7.2.180.0170.01016.82
7.2.170.0180.00816.82
7.2.160.0130.01016.65
7.2.150.0150.01117.06
7.2.140.0090.01917.05
7.2.130.0190.01016.90
7.2.120.0200.00717.00
7.2.110.0180.01316.98
7.2.100.0170.01316.98
7.2.90.0150.01116.89
7.2.80.0140.01816.92
7.2.70.0170.01716.89
7.2.60.0150.01916.81
7.2.50.0230.00817.06
7.2.40.0240.00918.63
7.2.30.0080.01918.68
7.2.20.0130.01118.59
7.2.10.0190.00818.61
7.2.00.0150.00318.57

preferences:
34.38 ms | 403 KiB | 5 Q