hamacoの日記

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

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

via. http://d.hatena.ne.jp/shimooka/20120224/1330062199:title=

以前PHP5.3版でやったやつのPHP5.4版があったのでSabelでもやってみた。

SRC_DIR=/sabel
find $SRC_DIR -iname \*.php -print0 | xargs -0 grep -iwE '(break|continue) +\$|get_magic_quotes_gpc|get_magic_quotes_runtime|set_magic_quotes_runtime|array_combine|(abstract|and|array()|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|old_function|or|private|protected|public|static|switch|throw|try|use|var|while|xor) +(trait|callable|insteadof)|define_syslog_variables|import_request_variables|session_is_registered|session_register|session_unregister|mysqli_bind_param|mysqli_bind_result|mysqli_client_encoding|mysqli_fetch|mysqli_param_count|mysqli_get_metadata|mysqli_send_long_data|mysqli::client_encoding|mysqli_stmt::stmt|mysql_list_dbs|mcrypt_generic_end'

まさかの0箇所!これ実行ミスってたりしないよね……