3v4l.org

run code in 200+ PHP versions simultaneously
<?php $info = finfo_open(FILEINFO_MIME_TYPE); if (!$info) die('no finfo available'); $buffer = <<<JSON {asd:'asd'} JSON ; $result = finfo_buffer($info, $buffer); finfo_close($info); if ($result === false) { die('Failed to read file'); } var_dump($result);
Output for 7.1.0 - 7.4.6
string(10) "text/plain"