asmblah / uniter

🎉 PHP in the browser and Node.js => Docs: https://phptojs.com/
https://asmblah.github.io/uniter/
Other
446 stars 42 forks source link

sizeof/count is not implemented #36

Closed dave-irvine closed 4 years ago

dave-irvine commented 8 years ago
var php = require('uniter').createEngine('PHP');
php.getStdout().on('data', function (text) { console.log(text); });
php.getStderr().on('data', function (text) { console.error(text); });

php.execute('<?php print sizeof([]);');

PHP Fatal error: Call to undefined function sizeof()
asmblah commented 8 years ago

Thanks for raising this @dave-irvine, I've now implemented count(...) in PHPRuntime v4.4.0 (https://github.com/uniter/phpruntime/commit/66b4cca74ed074dc269a697f3e492a86c4ac947d)

Cheers!

bkidwell commented 4 years ago

This commit is in lots of recent tags and in master branch of uniter/phpruntime. Should the issue on this page be closed?

asmblah commented 4 years ago

Hi @bkidwell, thanks for the question! count(...) is indeed implemented as you say, but I've just checked and its alias sizeof(...) is not, so as that's the one mentioned in the title and description above I'll leave this open just until that's resolved and then I think we can close it.

asmblah commented 4 years ago

sizeof(...) alias implemented in uniter/phpruntime#10.