Thanks. Have submitted to php.js: https://github.com/niklasvh/php.js/pull/44