note 77980 added to function.function-exists

From: Date: Sat, 22 Sep 2007 12:43:51 +0000
Subject: note 77980 added to function.function-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-130690@lists.php.net to get a copy of this message
If you use suhosin.executor.func.blacklist instead of disabled_functions in your php.ini, function_exists will return true for a disabled function. I used this to have the same beahviour with suhosin.executor.func.blacklist and disabled_functions: <?php function suhosin_function_exists($func) { if (extension_loaded('suhosin')) { $suhosin = @ini_get("suhosin.executor.func.blacklist"); if (empty($suhosin) == false) { $suhosin = explode(',', $suhosin); $suhosin = array_map('trim', $suhosin); $suhosin = array_map('strtolower', $suhosin); return (function_exists($func) == true && array_search($func, $suhosin) === false); } } return function_exists($func); } ?> ---- Server IP: 212.124.37.9 Probable Submitter: 217.87.97.12 ---- Manual Page -- http://www.php.net/manual/en/function.function-exists.php Edit -- https://master.php.net/note/edit/77980 Del: integrated -- https://master.php.net/note/delete/77980/integrated Del: useless -- https://master.php.net/note/delete/77980/useless Del: bad code -- https://master.php.net/note/delete/77980/bad+code Del: spam -- https://master.php.net/note/delete/77980/spam Del: non-english -- https://master.php.net/note/delete/77980/non-english Del: in docs -- https://master.php.net/note/delete/77980/in+docs Del: other reasons-- https://master.php.net/note/delete/77980 Reject -- https://master.php.net/note/reject/77980 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130690) next »