3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define('APACHE_MIME_TYPES_URL','http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types'); function generateUpToDateMimeArray($url){ $s=array(); foreach(@explode("\n",@file_get_contents($url))as $x) if(isset($x[0])&&$x[0]!=='#'&&preg_match_all('#([^\s]+)#',$x,$out)&&isset($out[1])&&($c=count($out[1]))>1) for($i=1;$i<$c;$i++) $s[]='&nbsp;&nbsp;&nbsp;\''.$out[1][$i].'\' => \''.$out[1][0].'\''; return @sort($s)?'$mime_types = array(<br />'.implode($s,',<br />').'<br />);':false; } echo generateUpToDateMimeArray(APACHE_MIME_TYPES_URL);
Output for 4.3.3 - 4.4.9, 5.0.2 - 7.2.0
$mime_types = array(<br /><br />);
Output for 4.3.0 - 4.3.2, 5.0.0 - 5.0.1
Notice: Uninitialized string offset: 0 in /in/OpXlC on line 8 $mime_types = array(<br /><br />);