note 116224 added to function.runkit-constant-remove
| From: | vladimir at bashkirtsev dot com | Date: | Tue, 25 Nov 2014 09:08:06 +0000 |
| Subject: | note 116224 added to function.runkit-constant-remove | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201016@lists.php.net to get a copy of this message | ||
At least under PHP 5.5.18 use of this function followed by constant redefinition like:
runkit_constant_remove("CONSTANT");
define("CONSTANT", "value");
may cause the constant to go into inconsistent state: from run-to-run var_dump(CONSTANT); may return
NULL while $s = CONSTANT; will cause "Fatal error: Allowed memory size of 1073741824 bytes
exhausted (tried to allocate 1714381161 bytes)" (note that 1G of memory configured and it is
still not enough). On some runs code behaves as expected.
I believe runkit doing some low level manipulation with pointers and perhaps it is just some form of
bug. Just stay wary: fiddling around with PHP on low level likely to cause unexpected results.
----
Server IP: 72.52.91.14
Probable Submitter: 94.137.218.92
----
Manual Page -- http://php.net/manual/en/function.runkit-constant-remove.php
Edit -- https://master.php.net/note/edit/116224
Del: integrated -- https://master.php.net/note/delete/116224/integrated
Del: useless -- https://master.php.net/note/delete/116224/useless
Del: bad code -- https://master.php.net/note/delete/116224/bad+code
Del: spam -- https://master.php.net/note/delete/116224/spam
Del: non-english -- https://master.php.net/note/delete/116224/non-english
Del: in docs -- https://master.php.net/note/delete/116224/in+docs
Del: other reasons-- https://master.php.net/note/delete/116224
Reject -- https://master.php.net/note/reject/116224
Search -- https://master.php.net/manage/user-notes.php