downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/reserved.variables.phperrormsg.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/reserved.variables.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'reserved.variables.phperrormsg.php',
   
1 => '$php_errormsg',
  ),
 
'up' =>
  array (
   
0 => 'reserved.variables.php',
   
1 => 'Predefined Variables',
  ),
 
'prev' =>
  array (
   
0 => 'reserved.variables.cookies.php',
   
1 => '$_COOKIE',
  ),
 
'next' =>
  array (
   
0 => 'reserved.variables.httprawpostdata.php',
   
1 => '$HTTP_RAW_POST_DATA',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="reserved.variables.phperrormsg" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">$php_errormsg</h1>
  <p class="refpurpose"><span class="refname">$php_errormsg</span> &mdash; <span class="dc-title">The previous error message</span></p>

 </div>
 
 <a name="reserved.variables.phperrormsg.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <p class="para">
   <var class="varname">$php_errormsg</var> is a variable containing the
   text of the last error message generated by PHP. This variable
   will only be available within the scope in which the error
   occurred, and only if the <a href="errorfunc.configuration.php#ini.track-errors" class="link">track_errors</a> configuration
   option is turned on (it defaults to off).
  </p>
  <blockquote><p><b class="note">Note</b>:
   <span class="simpara">
    This variable is only available when <i>track_errors</i> is
    enabled in <var class="filename">php.ini</var>.
   </span>
  </p></blockquote>
  <div class="warning"><b class="warning">Warning</b>
   <p class="simpara">
    If a user defined error handler (<a href="function.set-error-handler.php" class="function">set_error_handler()</a>)
    is set <var class="varname">$php_errormsg</var> is only set if the error handler
    returns <b><tt class="constant">FALSE</tt></b>
   </p>
  </div>
 </div>

 
 <a name="reserved.variables.phperrormsg.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <var class="varname">$php_errormsg</var> example</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">@</span><span style="color: #0000BB">strpos</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #0000BB">$php_errormsg</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents para"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Wrong parameter count for strpos()
</pre></div>
    </div>
   </div><p>
  </p>
 </div>

 
</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites