fix the description of the second parameter, fix screen role and applying coding standards

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164022 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2004-07-22 16:21:26 +00:00
parent cb2ed3b1ec
commit 2f1a419029

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.php-check-syntax">
<refnamediv>
<refname>php_check_syntax</refname>
@ -15,12 +15,13 @@
<methodparam choice="opt"><type>string</type><parameter>error_message</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>php_check_syntax</function> function performs a syntax (lint) check
on the specified <parameter>filename</parameter> testing for scripting errors.
The <function>php_check_syntax</function> function performs a syntax
(lint) check on the specified <parameter>filename</parameter> testing
for scripting errors.
</simpara>
<simpara>
If the second parameter is passed, the function will return the error messages from the syntax
check. This parameter must be passed by reference.
If the second parameter is passed, it will contain the error message
from the syntax check. This parameter must be passed by reference.
</simpara>
<para>
The following example shows how this function can be used.
@ -31,12 +32,11 @@
<?php
$error_message = "";
$filename = "./test.php";
$filename = "./tests.php";
if(!php_check_syntax($filename, &$error_message)) {
printf("Errors were found in the file %s:\n\n%s\n", $filename, $error_message);
}
else {
} else {
printf("The file %s contained no syntax errors.", $filename);
}
@ -46,7 +46,7 @@ else {
<simpara>
The output of the above script could look something like this:
</simpara>
<screen role="html">
<screen>
<![CDATA[
Errors were found in the file ./tests.php: