|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-05-11 08:31 UTC] zeeky dot h at gmail dot com
[2008-05-11 08:45 UTC] sebastian@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 09 01:00:01 2025 UTC |
Description: ------------ One cannot create an object of the ReflectionFunction class for a function that has been disabled via the disable_functions configuration directive. This effectively renders the ReflectionFunction::isDisabled() method useless. Reproduce code: --------------- --TEST-- ReflectionFunction::isDisabled() --INI-- disable_functions=eval --FILE-- <?php $function = new ReflectionFunction('sort'); var_dump($function->isDisabled()); $function = new ReflectionFunction('eval'); var_dump($function->isDisabled()); ?> --EXPECT-- bool(false) bool(true) Expected result: ---------------- Test passes. Actual result: -------------- bool(false) Fatal error: Uncaught exception 'ReflectionException' with message 'Function eval() does not exist' in /home/sb/ReflectionFunction_isDisabled.php:5 Stack trace: #0 /home/sb/ReflectionFunction_isDisabled.php(5): ReflectionFunction->__construct('eval') #1 {main} thrown in /home/sb/ReflectionFunction_isDisabled.php on line 5