Closed
Description
Description
The following code:
<?php
class Foo
{
public function bar()
{
$this->baz(function () {});
}
}
echo mime_content_type(__FILE__);
Resulted in this output in PHP 8.4:
application/javascript
But I expected this output, as in PHP <= 8.3:
text/x-php
Note that when you remove the function () {}
snippet, it detects it as text/x-php
.
Thank you!
PHP Version
PHP 8.4.1
Operating System
Ubuntu 24.04