bcompiler 函数
在线手册:中文 英文
PHP手册

bcompiler_load_exe

(PECL bcompiler >= 0.4)

bcompiler_load_exeReads and creates classes from a bcompiler exe file

说明

bool bcompiler_load_exe ( string $filename )

Reads data from a bcompiler exe file and creates classes from the bytecodes.

参数

filename

The exe file path, as a string.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE.

范例

Example #1 bcompiler_load_exe() example

<?php

bcompiler_load_exe
("/tmp/example.exe");
print_r(get_defined_classes());

?>

注释

Warning

此函数是实验性的。 此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本扩展风险自担 。

参见


bcompiler 函数
在线手册:中文 英文
PHP手册
PHP手册 - N: Reads and creates classes from a bcompiler exe file

用户评论:

Sinured (01-Jul-2007 11:59)

foo.exe (compiled):
<?php
class myclass {
    static
$scalar = 'Hello World!';
}
?>

foo.php:
<?php
include 'foo.exe';
echo
myclass::$scalar;
?>

As you can see, simply including the file will also work perfectly (oh joy!)