PHP 5.0.x から PHP 5.1.x への移行
PHP Manual

E_STRICT のチェック

ひとつのスクリプトについてのみチェックしたいのであれば、 PHP コマンドラインの文法チェック機能を使用して E_STRICT エラーを抜き出すことができます。

    php -d error_reporting=4095 -l script_to_check.php
   

大量のファイルをチェックするのなら、以下のシェルスクリプトで同様のことが可能です。

#!/bin/sh

directory=$1

shift

# チェックする拡張子を指定します
extensions="php inc"

check_file ()
{
  echo -ne "Doing PHP syntax check on $1 ..."

  # オプション
  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

PHP 5.0.x から PHP 5.1.x への移行
PHP Manual
[お役立ちリンク集]

NPO法人の設立(東京・大阪) 東京や大阪などNPO法人を設立する場合の注意点等を紹介

不動産・賃貸・マンション 不動産・賃貸・マンションに関する用語集です。

堺市の入院・内科

大阪の賃貸探し 大阪で賃貸を探している方は大阪ホームへ

東京の賃貸マンション 東京で賃貸を探すなら東京賃貸.orgへ