hamacoの日記

どうでもいい日常をたれながす日記だと思う

PHP5.3で非推奨になった機能や関数をざっくりあぶり出すワンライナー(Sabel版)

via. http://d.hatena.ne.jp/shimooka/20100727/1280198801:title=

Sabelでもやってみた。

find . -iname \*.php -print0 | xargs -0 grep -wE 'define_syslog_variables|register_globals|register_long_arrays|safe_mode|magic_quotes_gpc|magic_quotes_runtime|magic_quotes_sybase|(call_user_method|call_user_method_array|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|set_magic_quotes_runtime|session_register|session_unregister|session_is_registered|set_socket_blocking|split|spliti|sql_regcase|mysql_db_query|mysql_escape_string)\(|\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\{[0-9]+\}|(= *& *new)'
./generator/generator.php:      if ($item{0} === "." && $item !== ".htaccess") continue;
./generator/skeleton/en/lib/form/html/date/Base.php:      $char = $yearRange{0};
./generator/skeleton/en/lib/Paginator.php:        if (preg_match('/^[A-Z]/', $key{0}) === 1 && strpos($key, "_") !== false) {
./generator/skeleton/en/tasks/Fixture.php:        if ($dir{0} !== "/") {  // relative path
./sabel/annotation/Reader.php:        $quote = $v{0};
./sabel/db/ibase/Metadata.php:      if ($default{0} === "'") {
./sabel/db/pgsql/Metadata.php:        if ($default{0} === "'") {
./sabel/functions/core.php:      $str{0} = strtolower($str{0});
./sabel/mail/mime/Decoded.php:    if ($str{0} === '"') {
./sabel/mail/MimeDecode.php:        $quote = $value{0};
./sabel/map/config/Route.php:      if ($name{0} !== ":") {
./sabel/util/fileSystem/Base.php:      return ($path{0} === "/");
./sabel/util/FileSystem.php:      if ($ignoreDotFiles && $item{0} === ".") continue;
./sabel/util/FileSystem.php:      if ($ignoreDotFiles && $item{0} === ".") continue;
./sabel/util/FileSystem.php:      if ($ignoreDotFiles && $item{0} === ".") continue;
./sabel/util/String.php:  public function split($length = 1)
./sabel/Validator.php:    if ($m{0} === "-") {
./sabel/xml/Query.php:    if ($path{0} === "@") {
./sabel/xml/Query.php:      $first  = $_value{0};
./Test/Util/String.php:    $array  = $string->split();
./Test/Util/String.php:    $array  = $string->split();

SymfonyとかZend Frameworkもそうっぽいけど、文字列のアクセスが基本的に引っかかってますねー。