mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Reordered example,
removed extra u git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51723 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6edd9dfc62
commit
cd59518c88
1 changed files with 8 additions and 6 deletions
|
@ -62,14 +62,15 @@
|
|||
<para>
|
||||
The callback function should accept three arguments. The first
|
||||
argument will contain the file the assertion failed in. The second
|
||||
arugument will contain the line the assertion failed on and the
|
||||
argument will contain the line the assertion failed on and the
|
||||
third argument will contain the expression that failed (if any - literal
|
||||
values such as 1 or "two" will not be passed via this argument)
|
||||
</para>
|
||||
<para>
|
||||
Handle a failed assertion with a custom handler
|
||||
<informalexample>
|
||||
<programlisting><?php
|
||||
<example>
|
||||
<title>Handle a failed assertion with a custom handler</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
// Active assert and make it quiet
|
||||
assert_options (ASSERT_ACTIVE, 1);
|
||||
assert_options (ASSERT_WARNING, 0);
|
||||
|
@ -88,8 +89,9 @@ assert_options (ASSERT_CALLBACK, 'my_assert_handler');
|
|||
|
||||
// Make an assertion that should fail
|
||||
assert ('mysql_query ("")');
|
||||
?></programlisting>
|
||||
</informalexample>
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue