mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
$php_errmsg is not global
links to expressions, predefined $php_errmsg git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@98944 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
48a60f2a86
commit
13103e40f0
1 changed files with 10 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.39 $ -->
|
||||
<!-- $Revision: 1.40 $ -->
|
||||
<chapter id="language.operators">
|
||||
<title>Operators</title>
|
||||
<simpara>
|
||||
|
@ -406,14 +406,15 @@ $b .= "There!"; // sets $b to "Hello There!", just like $b = $b . "There!";
|
|||
<simpara>
|
||||
PHP supports one error control operator: the at sign (@). When
|
||||
prepended to an expression in PHP, any error messages that might
|
||||
be generated by that expression will be ignored.
|
||||
be generated by that expression will be ignored.
|
||||
</simpara>
|
||||
<simpara>
|
||||
If the <link linkend="ini.track-errors">track_errors</link>
|
||||
feature is enabled, any error message generated by the expression
|
||||
will be saved in the global variable $php_errormsg. This variable
|
||||
will be overwritten on each error, so check early if you want to
|
||||
use it.
|
||||
will be saved in the variable
|
||||
<link linkend="reserved.variables.phperrormsg">$php_errormsg</link>.
|
||||
This variable will be overwritten on each error, so check early if you
|
||||
want to use it.
|
||||
</simpara>
|
||||
<para>
|
||||
<informalexample>
|
||||
|
@ -435,9 +436,10 @@ $value = @$cache[$key];
|
|||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
The @-operator works only on expressions. A simple rule of thumb
|
||||
is: if you can take the value of something, you can prepend the @
|
||||
operator to it. For instance, you can prepend it to variables,
|
||||
The @-operator works only on
|
||||
<link linkend="language.expressions">expressions</link>. A simple rule
|
||||
of thumb is: if you can take the value of something, you can prepend
|
||||
the @ operator to it. For instance, you can prepend it to variables,
|
||||
function and <function>include</function> calls, constants, and
|
||||
so forth. You cannot prepend it to function or class definitions,
|
||||
or conditional structures such as <literal>if</literal> and
|
||||
|
|
Loading…
Reference in a new issue