Başka bir çözüm kullanmak olabilir __halt_compiler
a>:
Halts the execution of the compiler.
This can be useful to embed data in
PHP scripts, like the installation
files.
Byte position of the data start can be
determined by the
__COMPILER_HALT_OFFSET__
constant
which is defined only if there is a
__halt_compiler()
presented in the
file.
Eğer tek bir dosya içine PHP ve (muhtemelen ikili) veri gömmek için gerektiğinde tipik bir kullanım, Phar archives için, ve PHP kodu bu verilere erişimi olması gerekir.
And there is actually a difference : this code :
blah blah
<?php phpinfo(); ?>
glop glop
<?php exit(); ?>
<?HOW CAN I MAKE PHP NOT PARSE THIS?>
Gets me a Parse error: syntax error, unexpected T_STRING
(Probably because I have short_open_tag
enabled, I suppose)
While this one :
blah blah
<?php phpinfo(); ?>
glop glop
<?php __halt_compiler(); ?>
<?HOW CAN I MAKE PHP NOT PARSE THIS?>
Tamam çalışır - bu geçersiz PHP kodu __halt_compiler()
için çağrısından sonra olmak.