Checking for E_STRICT
If you only have a single script to check, you can pick up
E_STRICT
errors using PHP's commandline lint
facility:
php -d error_reporting=4095 -l script_to_check.php
For larger projects, the shell script below will achieve the same task:
#!/bin/sh directory=$1 shift # These extensions are checked extensions="php inc" check_file () { echo -ne "Doing PHP syntax check on $1 ..." # Options: ERRORS=`/www/php/bin/php -d display_errors=1 -d html_errors=0 -d error_prepend_string=" " -d error_append_string=" " -d error_reporting=4095 -l $1 | grep -v "No syntax errors detected"` if test -z "$ERRORS"; then echo -ne "OK." else echo -e "Errors found!\n$ERRORS" fi echo } # loop over remaining file args for FILE in "$@" ; do for ext in $extensions; do if echo $FILE | grep "\.$ext$" > /dev/null; then if test -f $FILE; then check_file "$FILE" fi fi done done
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-migration51.errorcheck.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.