parsekit_compile_file
(PECL parsekit >= 0.2.0)
parsekit_compile_file — Compile a string of PHP code and return the resulting op array
설명
array parsekit_compile_file
( string $filename
[, array &$errors
[, int $options = PARSEKIT_QUIET
]] )
Warning
이 함수는 실험적입니다. 이 함수의 작동, 함수의 이름, 그리고 관련된 모든 문서는 이후의 PHP 릴리즈에서 예고 없이 변경할 수 있습니다. 이 함수의 사용에 관한 것은 사용자 책임입니다.
인수
- filename
-
A string containing the name of the file to compile. Similar to the argument to include().
- errors
-
A 2D hash of errors (including fatal errors) encountered during compilation. Returned by reference.
- options
-
One of either PARSEKIT_QUIET or PARSEKIT_SIMPLE. To produce varying degrees of verbosity in the returned output.
반환값
Returns a complex multi-layer array structure as detailed below.
예제
Example #1 parsekit_compile_file() example
<?php
var_dump(parsekit_compile_file('hello_world.php', $errors, PARSEKIT_SIMPLE));
?>
위 예제의 출력:
array(5) {
[0]=>
string(37) "ZEND_ECHO UNUSED 'Hello World' UNUSED"
[1]=>
string(30) "ZEND_RETURN UNUSED NULL UNUSED"
[2]=>
string(42) "ZEND_HANDLE_EXCEPTION UNUSED UNUSED UNUSED"
["function_table"]=>
NULL
["class_table"]=>
NULL
}
There are no user contributed notes for this page.
