note 83597 added to function.halt-compiler
| From: | gn_shallyNOSPAM at yahoo dot com | Date: | Wed, 04 Jun 2008 02:56:19 +0000 |
| Subject: | note 83597 added to function.halt-compiler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140097@lists.php.net to get a copy of this message | ||
actually, __halt_compiler did something, even in eval function, that things is set the constant
__COMPILER_HALT_OFFSET__ to the right value
as all of you might know, PHP will change content of some magic constant like __FUNCTION__,
__CLASS__, etc based on the situation. so do the __COMPILER_HALT_OFFSET__ constant, is a file
specific constant, just like the __FILE__ constant, the content will be changed based on wich file
the __halt_compiler() reside.
try this:
/**** whatever.php ****/
<?php
eval('echo __FILE__."(".__COMPILER_HALT_OFFSET__.")\n";
__halt_compiler();');
echo __FILE__."(".__COMPILER_HALT_OFFSET__.")\n"; __halt_compiler();
if (!isset($whatever))
{
$whatever = 'whatever';
include __FILE__;
}
__halt_compiler();whatever
----
Server IP: 202.67.10.139
Probable Submitter: 222.124.24.124
----
Manual Page -- http://www.php.net/manual/en/function.halt-compiler.php
Edit -- https://master.php.net/note/edit/83597
Del: integrated -- https://master.php.net/note/delete/83597/integrated
Del: useless -- https://master.php.net/note/delete/83597/useless
Del: bad code -- https://master.php.net/note/delete/83597/bad+code
Del: spam -- https://master.php.net/note/delete/83597/spam
Del: non-english -- https://master.php.net/note/delete/83597/non-english
Del: in docs -- https://master.php.net/note/delete/83597/in+docs
Del: other reasons-- https://master.php.net/note/delete/83597
Reject -- https://master.php.net/note/reject/83597
Search -- https://master.php.net/manage/user-notes.php