Display the drop-down list

getimagesize()

« gethostname | getlastmod »
<?php
$array 
getimagesize (
    
// string $filename
    
  // [array &$imageinfo]
);
?>
Result
$array = [
  
=> 120,
  
=> 138,
  
=> 3,
  
=> 'width="120" height="138"',
  
'bits' => 8,
  
'mime' => 'image/png',
]
Examples
#1 getimagesize  ("/home/micmap/www/php-by-example/logo.gif")
#2 getimagesize  ("https://upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Wikipedia-logo-v2-en.png/120px-Wikipedia-logo-v2-en.png")
#3 getimagesize  ("http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Wiktionary-logo.svg/370px-Wiktionary-logo.svg.png")
See also
exif_imagetype, exif_read_data, exif_thumbnail, image_type_to_mime_type