mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 13:57:03 +08:00
111 lines
4.0 KiB
HTML
111 lines
4.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>Redefine a constant</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.uopz-redefine" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">uopz_redefine</h1>
|
||
<p class="verinfo">(PECL uopz 1, PECL uopz 2, PECL uopz 5)</p><p class="refpurpose"><span class="refname">uopz_redefine</span> — <span class="dc-title">Redefine a constant</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.uopz-redefine-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>uopz_redefine</strong></span>
|
||
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$constant</code></span>
|
||
, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
|
||
) : <span class="type">bool</span></div>
|
||
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>uopz_redefine</strong></span>
|
||
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$class</code></span>
|
||
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$constant</code></span>
|
||
, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
|
||
) : <span class="type">bool</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
Redefines the given <code class="parameter">constant</code> as <code class="parameter">value</code>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.uopz-redefine-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">class</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
The name of the class containing the constant
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">constant</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
The name of the constant
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">value</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
The new value for the constant, must be a valid type for a constant variable
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.uopz-redefine-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
成功时返回 <strong><code>TRUE</code></strong>, 或者在失败时返回 <strong><code>FALSE</code></strong>。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 examples" id="refsect1-function.uopz-redefine-examples">
|
||
<h3 class="title">范例</h3>
|
||
<div class="example" id="example-581">
|
||
<p><strong>Example #1 <span class="function"><strong>uopz_redefine()</strong></span> example</strong></p>
|
||
<div class="example-contents">
|
||
<div class="phpcode"><pre><span style="color: #000000">
|
||
<span style="color: #0000BB"><?php<br />define</span><span style="color: #007700">(</span><span style="color: #DD0000">"MY"</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">uopz_redefine</span><span style="color: #007700">(</span><span style="color: #DD0000">"MY"</span><span style="color: #007700">, </span><span style="color: #0000BB">1000</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #0000BB">MY</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span>
|
||
</span>
|
||
</pre></div>
|
||
</div>
|
||
|
||
<div class="example-contents"><p>以上例程会输出:</p></div>
|
||
<div class="example-contents screen">
|
||
<div class="cdata"><pre>
|
||
1000
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
</div></div></div></body></html> |