Jan Wagner revised this gist 10 years ago. Go to revision
1 file changed, 2 insertions, 2 deletions
php54_deprecated_functions
| @@ -60,7 +60,7 @@ echo "" >> ${OUTPUT} | |||
| 60 | 60 | ||
| 61 | 61 | while [ $i -lt $len ]; do | |
| 62 | 62 | echo " // checking for '${deprecatedFunctions54[$i]}()'" >> ${OUTPUT} | |
| 63 | - | grep -rn --color --include=*.php "^[^#]*[^a-zA-Z_]${deprecatedFunctions54[$i]}[[:space:]]*(" * >> ${OUTPUT}; | |
| 63 | + | grep -rn --color --include=*.php "^[^#]*[^a-zA-Z_]${deprecatedFunctions54[$i]}[[:space:]]*(" . >> ${OUTPUT}; | |
| 64 | 64 | echo "" >> ${OUTPUT} | |
| 65 | 65 | let i++ | |
| 66 | 66 | done | |
| @@ -73,7 +73,7 @@ echo "" >> ${OUTPUT} | |||
| 73 | 73 | ||
| 74 | 74 | while [ $i -lt $len ]; do | |
| 75 | 75 | echo " // checking for '${deprecatedIniDirectives54[$i]}()'" >> ${OUTPUT} | |
| 76 | - | grep -rn --color --include=*.php "ini_set[[:space:]]*(['|\"]${deprecatedIniDirectives54[$i]}" * >> ${OUTPUT}; | |
| 76 | + | grep -rn --color --include=*.php "ini_set[[:space:]]*(['|\"]${deprecatedIniDirectives54[$i]}" . >> ${OUTPUT}; | |
| 77 | 77 | echo "" >> ${OUTPUT} | |
| 78 | 78 | let i++ | |
| 79 | 79 | done | |
Jan Wagner revised this gist 10 years ago. Go to revision
1 file changed, 3 insertions, 1 deletion
php54_deprecated_functions
| @@ -37,8 +37,10 @@ deprecatedFunctions54=( | |||
| 37 | 37 | get_magic_quotes_gpc | |
| 38 | 38 | get_magic_quotes_runtime | |
| 39 | 39 | set_magic_quotes_runtime | |
| 40 | + | array_combine | |
| 40 | 41 | htmlspecialchars | |
| 41 | 42 | htmlentities | |
| 43 | + | ob_start | |
| 42 | 44 | # php 5.4 deprecated | |
| 43 | 45 | mcrypt_generic_end | |
| 44 | 46 | mysql_list_dbs | |
| @@ -74,4 +76,4 @@ while [ $i -lt $len ]; do | |||
| 74 | 76 | grep -rn --color --include=*.php "ini_set[[:space:]]*(['|\"]${deprecatedIniDirectives54[$i]}" * >> ${OUTPUT}; | |
| 75 | 77 | echo "" >> ${OUTPUT} | |
| 76 | 78 | let i++ | |
| 77 | - | done | |
| 79 | + | done | |
waja revised this gist 12 years ago. Go to revision
1 file changed, 1 insertion
php54_deprecated_functions
| @@ -38,6 +38,7 @@ deprecatedFunctions54=( | |||
| 38 | 38 | get_magic_quotes_runtime | |
| 39 | 39 | set_magic_quotes_runtime | |
| 40 | 40 | htmlspecialchars | |
| 41 | + | htmlentities | |
| 41 | 42 | # php 5.4 deprecated | |
| 42 | 43 | mcrypt_generic_end | |
| 43 | 44 | mysql_list_dbs | |
waja revised this gist 12 years ago. Go to revision
1 file changed, 1 insertion
php54_deprecated_functions
| @@ -37,6 +37,7 @@ deprecatedFunctions54=( | |||
| 37 | 37 | get_magic_quotes_gpc | |
| 38 | 38 | get_magic_quotes_runtime | |
| 39 | 39 | set_magic_quotes_runtime | |
| 40 | + | htmlspecialchars | |
| 40 | 41 | # php 5.4 deprecated | |
| 41 | 42 | mcrypt_generic_end | |
| 42 | 43 | mysql_list_dbs | |
waja revised this gist 12 years ago. Go to revision
1 file changed, 1 insertion, 1 deletion
php54_deprecated_functions
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | # | |
| 5 | 5 | # Version: 0.0.3 | |
| 6 | 6 | # | |
| 7 | - | # Author: Michiel Roos <michiel@donationbasedhosting.org> | |
| 7 | + | # Original Author: Michiel Roos <michiel@donationbasedhosting.org> | |
| 8 | 8 | # | |
| 9 | 9 | # http://www.php.net/manual/de/migration54.incompatible.php | |
| 10 | 10 | # http://www.php.net/manual/en/migration54.deprecated.php | |
waja revised this gist 12 years ago. Go to revision
1 file changed, 2 insertions, 1 deletion
php54_deprecated_functions
| @@ -6,7 +6,8 @@ | |||
| 6 | 6 | # | |
| 7 | 7 | # Author: Michiel Roos <michiel@donationbasedhosting.org> | |
| 8 | 8 | # | |
| 9 | - | # http://www.php.net/manual/en/migration53.deprecated.php | |
| 9 | + | # http://www.php.net/manual/de/migration54.incompatible.php | |
| 10 | + | # http://www.php.net/manual/en/migration54.deprecated.php | |
| 10 | 11 | # | |
| 11 | 12 | # Please note that there will be some false positives. Some PHP code is mixed | |
| 12 | 13 | # with JS code. In JS 'split' is still a valid function. | |
waja revised this gist 12 years ago. Go to revision
1 file changed, 1 insertion, 1 deletion
php54_deprecated_functions
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | # | |
| 3 | - | # PHP 5.3 Deprecated function checker | |
| 3 | + | # PHP 5.4 Deprecated function checker | |
| 4 | 4 | # | |
| 5 | 5 | # Version: 0.0.3 | |
| 6 | 6 | # | |
waja revised this gist 12 years ago. Go to revision
1 file changed, 2 insertions, 2 deletions
php54_deprecated_functions
| @@ -16,8 +16,8 @@ PWD="/tmp" | |||
| 16 | 16 | FIND_PHP54_DEPRECATED_LOGLOCATION="php54_deprecated_functions.log" | |
| 17 | 17 | OUTPUT=${PWD}/${FIND_PHP54_DEPRECATED_LOGLOCATION} | |
| 18 | 18 | ||
| 19 | - | # php 5.4 removed | |
| 20 | 19 | deprecatedFunctions54=( | |
| 20 | + | # php 5.4 removed | |
| 21 | 21 | define_syslog_variables | |
| 22 | 22 | import_request_variables | |
| 23 | 23 | session_is_registered | |
| @@ -41,8 +41,8 @@ deprecatedFunctions54=( | |||
| 41 | 41 | mysql_list_dbs | |
| 42 | 42 | ) | |
| 43 | 43 | ||
| 44 | - | # php 5.4 | |
| 45 | 44 | deprecatedIniDirectives54=( | |
| 45 | + | # php 5.4 | |
| 46 | 46 | register_globals | |
| 47 | 47 | register_long_arrays | |
| 48 | 48 | ) | |
waja revised this gist 12 years ago. Go to revision
1 file changed, 74 insertions
php54_deprecated_functions(file created)
| @@ -0,0 +1,74 @@ | |||
| 1 | + | #!/bin/bash | |
| 2 | + | # | |
| 3 | + | # PHP 5.3 Deprecated function checker | |
| 4 | + | # | |
| 5 | + | # Version: 0.0.3 | |
| 6 | + | # | |
| 7 | + | # Author: Michiel Roos <michiel@donationbasedhosting.org> | |
| 8 | + | # | |
| 9 | + | # http://www.php.net/manual/en/migration53.deprecated.php | |
| 10 | + | # | |
| 11 | + | # Please note that there will be some false positives. Some PHP code is mixed | |
| 12 | + | # with JS code. In JS 'split' is still a valid function. | |
| 13 | + | # | |
| 14 | + | ||
| 15 | + | PWD="/tmp" | |
| 16 | + | FIND_PHP54_DEPRECATED_LOGLOCATION="php54_deprecated_functions.log" | |
| 17 | + | OUTPUT=${PWD}/${FIND_PHP54_DEPRECATED_LOGLOCATION} | |
| 18 | + | ||
| 19 | + | # php 5.4 removed | |
| 20 | + | deprecatedFunctions54=( | |
| 21 | + | define_syslog_variables | |
| 22 | + | import_request_variables | |
| 23 | + | session_is_registered | |
| 24 | + | session_register | |
| 25 | + | session_unregister | |
| 26 | + | mysqli_bind_param | |
| 27 | + | mysqli_bind_result | |
| 28 | + | mysqli_client_encoding | |
| 29 | + | mysqli_fetch | |
| 30 | + | mysqli_param_count | |
| 31 | + | mysqli_get_metadata | |
| 32 | + | mysqli_send_long_data | |
| 33 | + | mysqli::client_encoding | |
| 34 | + | mysqli_stmt::stmt | |
| 35 | + | # php 5.4 changed behavior | |
| 36 | + | get_magic_quotes_gpc | |
| 37 | + | get_magic_quotes_runtime | |
| 38 | + | set_magic_quotes_runtime | |
| 39 | + | # php 5.4 deprecated | |
| 40 | + | mcrypt_generic_end | |
| 41 | + | mysql_list_dbs | |
| 42 | + | ) | |
| 43 | + | ||
| 44 | + | # php 5.4 | |
| 45 | + | deprecatedIniDirectives54=( | |
| 46 | + | register_globals | |
| 47 | + | register_long_arrays | |
| 48 | + | ) | |
| 49 | + | ||
| 50 | + | len=${#deprecatedFunctions54[*]} | |
| 51 | + | i=0 | |
| 52 | + | ||
| 53 | + | echo "Checking for deprectated functions in PHP 5.4 ______________________________________" > ${OUTPUT} | |
| 54 | + | echo "" >> ${OUTPUT} | |
| 55 | + | ||
| 56 | + | while [ $i -lt $len ]; do | |
| 57 | + | echo " // checking for '${deprecatedFunctions54[$i]}()'" >> ${OUTPUT} | |
| 58 | + | grep -rn --color --include=*.php "^[^#]*[^a-zA-Z_]${deprecatedFunctions54[$i]}[[:space:]]*(" * >> ${OUTPUT}; | |
| 59 | + | echo "" >> ${OUTPUT} | |
| 60 | + | let i++ | |
| 61 | + | done | |
| 62 | + | ||
| 63 | + | len=${#deprecatedIniDirectives54[*]} | |
| 64 | + | i=0 | |
| 65 | + | ||
| 66 | + | echo "Checking for deprectated ini directives in PHP 5.4 _________________________________" >> ${OUTPUT} | |
| 67 | + | echo "" >> ${OUTPUT} | |
| 68 | + | ||
| 69 | + | while [ $i -lt $len ]; do | |
| 70 | + | echo " // checking for '${deprecatedIniDirectives54[$i]}()'" >> ${OUTPUT} | |
| 71 | + | grep -rn --color --include=*.php "ini_set[[:space:]]*(['|\"]${deprecatedIniDirectives54[$i]}" * >> ${OUTPUT}; | |
| 72 | + | echo "" >> ${OUTPUT} | |
| 73 | + | let i++ | |
| 74 | + | done | |