<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>爱周末 &#187; function_exists</title>
	<atom:link href="http://zhoumo123.cn/tag/function_exists/feed" rel="self" type="application/rss+xml" />
	<link>http://zhoumo123.cn</link>
	<description>知识分享，共同进步。zhoumo123.cn</description>
	<lastBuildDate>Thu, 07 Nov 2019 05:53:49 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.1</generator>
	<item>
		<title>php中检测函数是否存在函数 function_exists</title>
		<link>http://zhoumo123.cn/php/257.html</link>
		<comments>http://zhoumo123.cn/php/257.html#comments</comments>
		<pubDate>Wed, 20 Aug 2014 01:25:31 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[function_exists]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=257</guid>
		<description><![CDATA[php教程检测函数是否存在函数 function_exists  语法 bool function_exists ( string $function_name ) 检查的定义的函数的列表，同时内置（内部）和用户定义的，为function_name。 返回值 返回true，如果function_name存在，是一个函数，否则返回false。 //如果您使用suhosin.executor.func.blacklist而不是在你的php.ini disabled_functions，function_exists将返回true为功能。我用这个有与suhosin.executor.func.bla ...  <a href="http://zhoumo123.cn/php/257.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p><strong>php</strong>教程检测函数是否存在函数 <strong>function_exists </strong></p>
<p>语法<br />
bool function_exists ( string $function_name )<br />
检查的定义的函数的列表，同时内置（内部）和用户定义的，为function_name。<br />
返回值<br />
返回true，如果function_name存在，是一个函数，否则返回false。</p>
<pre class="brush: php; title: ; notranslate">
if (function_exists(imap_open)) {
echo &quot;imap functions are available.zhoumo123.cn&lt;br /&gt;n&quot;;
} else {
echo &quot;imap functions are not available.&lt;br /&gt;n&quot;;
}



//function_exists returns false on null and empty string:
if (function_exists()) {
echo &quot;empty string function existsn&quot;;
}
if (function_exists(null)) {
echo &quot;null function existsn&quot;;
}

</pre>
<p>//如果您使用suhosin.executor.func.blacklist而不是在你的php.ini disabled_functions，function_exists将返回true为功能。我用这个有与suhosin.executor.func.blacklist和disabled_functions相同</p>
<pre class="brush: php; title: ; notranslate">

beahviour：
function suhosin_function_exists($func) {
if (extension_loaded(suhosin)) {
$suhosin = @ini_get(&quot;suhosin.executor.func.blacklist&quot;);
if (empty($suhosin) == false) {
$suhosin = explode(,, $suhosin);
$suhosin = array_map(trim, $suhosin);
$suhosin = array_map(strtolower, $suhosin);
return (function_exists($func) == true &amp;&amp; array_search($func, $suhosin) === false);
}
}
return function_exists($func);
}

</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/php/257.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
