Closed
Description
I encountered an issue while experimenting with PHP CLI
.
node node_modules/.bin/cli test.php
> Fatal error: Uncaught Error: Class "finfo" not found in /mho22/works/php-wasm-issue/test.php:3
> Stack trace:
> #0 {main}
> thrown in /mho22/works/php-wasm-issue/test.php on line 3
It seems like PHP's built-in extensions like fileinfo
are not found. Is this correct ?
Here's step by step to reproduce the problem
mkdir php-wasm-issue
cd php-wasm-issue
npm install @php-wasm/cli
test.php
<?php
$finfo = new finfo( FILEINFO_MIME );
echo json_encode( $finfo );
node node_modules/.bin/cli test.php