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.3.60.0110.00716.32
8.3.50.0160.00616.43
8.3.40.0140.00718.84
8.3.30.0090.00918.76
8.3.20.0070.00024.18
8.3.10.0030.00524.66
8.3.00.0080.00026.16
8.2.180.0150.00625.92
8.2.170.0090.00622.96
8.2.160.0030.01022.96
8.2.150.0050.00225.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00419.60
8.2.110.0100.00021.91
8.2.100.0060.00617.91
8.2.90.0090.00017.75
8.2.80.0080.00018.92
8.2.70.0000.00817.75
8.2.60.0040.00417.63
8.2.50.0040.00418.05
8.2.40.0050.00318.16
8.2.30.0040.00418.08
8.2.20.0000.00718.23
8.2.10.0000.00719.25
8.2.00.0070.00019.22
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0050.00526.35
8.1.250.0080.00028.09
8.1.240.0090.00920.70
8.1.230.0060.00617.64
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0000.00917.50
8.1.190.0060.00317.23
8.1.180.0030.00618.10
8.1.170.0040.00417.62
8.1.160.0070.00018.95
8.1.150.0050.00218.95
8.1.140.0000.00718.86
8.1.130.0000.00720.10
8.1.120.0020.00517.53
8.1.110.0030.00517.38
8.1.100.0040.00417.49
8.1.90.0050.00217.47
8.1.80.0000.00717.48
8.1.70.0030.00517.38
8.1.60.0000.00917.56
8.1.50.0000.00817.59
8.1.40.0050.00317.43
8.1.30.0040.00417.60
8.1.20.0060.00317.64
8.1.10.0050.00217.41
8.1.00.0040.00417.44
8.0.300.0040.00418.93
8.0.290.0040.00416.63
8.0.280.0030.00318.37
8.0.270.0000.00718.05
8.0.260.0030.00718.44
8.0.250.0030.00316.82
8.0.240.0030.00316.96
8.0.230.0000.00716.87
8.0.220.0000.00716.81
8.0.210.0040.00416.92
8.0.200.0070.00016.85
8.0.190.0040.00416.96
8.0.180.0040.00416.90
8.0.170.0030.00616.98
8.0.160.0080.00016.93
8.0.150.0050.00216.84
8.0.140.0000.00816.92
8.0.130.0000.00913.42
8.0.120.0000.00716.90
8.0.110.0070.00316.89
8.0.100.0050.00316.96
8.0.90.0080.00016.88
8.0.80.0090.00816.85
8.0.70.0000.00716.76
8.0.60.0000.00716.79
8.0.50.0040.00416.75
8.0.30.0090.00917.25
8.0.20.0070.01417.21
8.0.10.0040.00417.04
8.0.00.0100.01316.95
7.4.330.0050.00015.55
7.4.320.0030.00516.51
7.4.300.0030.00316.47
7.4.290.0000.00716.53
7.4.280.0080.00016.44
7.4.270.0000.00716.55
7.4.260.0030.00316.40
7.4.250.0070.00016.62
7.4.240.0000.00716.62
7.4.230.0000.00716.43
7.4.220.0020.00416.52
7.4.210.0090.00716.56
7.4.200.0050.00216.45
7.4.130.0030.01716.47
7.4.120.0100.01316.49
7.4.110.0030.01616.38
7.4.100.0070.01716.65
7.4.90.0130.00316.71
7.4.80.0140.00719.39
7.4.70.0140.00916.67
7.4.60.0030.01416.48
7.4.50.0090.00816.43
7.4.40.0100.00816.27
7.4.30.0090.01116.26
7.4.20.0060.01216.33
7.4.10.0110.00816.41
7.4.00.0110.01216.40
7.3.330.0040.00416.44
7.3.320.0000.00513.07
7.3.310.0000.00716.31
7.3.300.0000.00716.36
7.3.290.0070.00016.25
7.3.260.0060.01216.35
7.3.230.0120.00616.48
7.3.210.0070.01316.37
7.3.200.0060.01016.40
7.3.190.0110.00716.59
7.3.180.0120.00616.18
7.3.170.0070.01116.49
7.3.160.0090.00916.48
7.3.150.0120.00716.41
7.3.140.0060.01416.46
7.3.130.0100.01216.38
7.3.120.0140.00816.40
7.3.110.0080.00816.33
7.3.100.0080.01116.47
7.3.90.0080.01216.39
7.3.80.0130.00516.46
7.3.70.0070.00916.37
7.3.60.0070.01216.21
7.3.50.0060.01016.36
7.3.40.0120.00616.38
7.3.30.0140.00316.39
7.3.20.0100.00916.34
7.3.10.0090.01016.31
7.3.00.0070.01216.41
7.2.330.0280.00016.48
7.2.320.0200.00316.46
7.2.310.0100.00716.42
7.2.300.0100.00616.54
7.2.290.0140.00616.55
7.2.280.0060.01416.52
7.2.270.0120.00616.71
7.2.260.0110.00916.69
7.2.250.0100.00916.71
7.2.240.0080.00916.47
7.2.230.0110.00816.51
7.2.220.0100.00716.65
7.2.210.0050.01316.60
7.2.200.0100.00716.70
7.2.190.0110.00616.61
7.2.180.0060.01116.65
7.2.170.0060.01116.58
7.2.160.0050.01216.62
7.2.150.0090.01016.69
7.2.140.0090.01016.57
7.2.130.0120.00816.57
7.2.120.0070.01216.62
7.2.110.0340.00716.58
7.2.100.0120.01116.59
7.2.90.0160.00516.56
7.2.80.0120.00916.66
7.2.70.0130.00716.63
7.2.60.0120.00916.66
7.2.50.0100.01216.68
7.2.40.0120.00816.75
7.2.30.0080.01116.66
7.2.20.0120.00816.54
7.2.10.0080.01316.59
7.2.00.0110.01016.57

preferences:
61.03 ms | 400 KiB | 5 Q