<?php $acceptFormat = array( 'jpg' => 'image/jpeg', 'jpg' => 'image/jpg', 'png' => 'image/png' ); $ext ='jpg'; if (!in_array($ext,array_keys($acceptFormat))) { throw new RuntimeException('Invalid file format.'); } $mime = 'video/mkv'; if (!in_array($mime,array_values($acceptFormat))) { throw new RuntimeException('Invalid mime format.'); }
You have javascript disabled. You will not be able to edit any code.