summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03abd10)
raw | patch | inline | side by side (parent: 03abd10)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Sep 2005 10:01:31 +0000 (10:01 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Sep 2005 10:01:31 +0000 (10:01 +0000) |
New Version.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1442 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1442 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions_list.inc | patch | blob | history | |
include/functions_test.inc | patch | blob | history |
index bae4a424bf295f01d42a1bfd8948b329375a497b..bcf9f15c9eadfbbf5285e3b8f4ebf511ebbf90e8 100644 (file)
<?php
array (
- 0 => 'touch',
- 1 => 'fopen',
- 2 => 'fwrite',
- 3 => 'var_export',
- 4 => 'fclose',
- 5 => 'header',
+ 0 => 'print_r',
+ 1 => 'touch',
+ 2 => 'fopen',
+ 3 => 'fwrite',
+ 4 => 'var_export',
+ 5 => 'fclose',
6 => 'session_start',
- 7 => 'error_reporting',
- 8 => 'putenv',
- 9 => 'setlocale',
- 10 => 'bindtextdomain',
- 11 => 'textdomain',
- 12 => 'sprintf',
- 13 => 'str_replace',
- 14 => 'gmdate',
- 15 => 'imageAlphaBlending',
- 16 => 'imageSaveAlpha',
- 17 => 'imagesx',
- 18 => 'imagesy',
- 19 => 'imagecopy',
- 20 => 'imagePng',
- 21 => 'mysql_pconnect',
- 22 => 'mysql_select_db',
- 23 => 'mysql_query',
- 24 => 'mysql_fetch_array',
- 25 => 'mysql_result',
- 26 => 'mysql_close',
- 27 => 'tempnam',
- 28 => 'popen',
- 29 => 'fread',
- 30 => 'pclose',
- 31 => 'unlink',
- 32 => 'imagick_blob2image',
- 33 => 'imagick_image2blob',
- 34 => 'preg_match',
- 35 => 'base64_decode',
- 36 => 'preg_replace',
- 37 => 'srand',
- 38 => 'strlen',
- 39 => 'date',
- 40 => 'preg_split',
- 41 => 'trim',
- 42 => 'chr',
- 43 => 'chunk_split',
- 44 => 'is_dir',
- 45 => 'is_writable',
- 46 => 'session_destroy',
- 47 => 'substr',
- 48 => 'tidy_parse_string',
- 49 => 'tidy_clean_repair',
- 50 => 'tidy_error_count',
- 51 => 'tidy_warning_count',
- 52 => 'nl2br',
- 53 => 'intval',
- 54 => 'ImageFontWidth',
- 55 => 'ImageFontHeight',
- 56 => 'imagecolorallocate',
- 57 => 'imagerectangle',
- 58 => 'imagefilledrectangle',
- 59 => 'imagestring',
- 60 => 'imagepng',
- 61 => 'imagedestroy',
- 62 => 'is_int',
- 63 => 'session_id',
- 64 => 'debug_backtrace',
- 65 => 'htmlentities',
- 66 => 'flush',
- 67 => 'dirname',
- 68 => 'set_error_handler',
- 69 => 'ini_set',
- 70 => 'mb_substr',
- 71 => 'crypt',
- 72 => 'imap_close',
- 73 => 'is_array',
- 74 => 'imap_listmailbox',
- 75 => 'imap_utf7_decode',
- 76 => 'imap_last_error',
- 77 => 'imap_getacl',
- 78 => 'imap_setacl',
- 79 => 'rtrim',
- 80 => 'strpos',
- 81 => 'is_integer',
- 82 => 'implode',
- 83 => 'file',
- 84 => 'get_class_vars',
- 85 => 'array_keys',
- 86 => 'split',
- 87 => 'define',
- 88 => 'chdir',
- 89 => 'opendir',
- 90 => 'readdir',
- 91 => 'closedir',
- 92 => 'explode',
- 93 => 'microtime',
- 94 => 'strtoupper',
- 95 => 'syslog',
- 96 => 'md5',
- 97 => 'arsort',
- 98 => 'reset',
- 99 => 'ltrim',
- 100 => 'strstr',
- 101 => 'array_flip',
- 102 => 'preg_quote',
- 103 => 'func_get_args',
- 104 => 'cups_get_dest_list',
- 105 => 'cups_get_printer_attributes',
- 106 => 'exec',
- 107 => 'session_unregister',
- 108 => 'pow',
- 109 => 'key',
- 110 => 'current',
- 111 => 'array_merge',
- 112 => 'strtolower',
- 113 => 'mt_srand',
- 114 => 'mt_rand',
- 115 => 'is_link',
- 116 => 'sort',
- 117 => 'array_reverse',
- 118 => 'is_readable',
- 119 => 'is_file',
- 120 => 'filesize',
- 121 => 'dechex',
- 122 => 'stripcslashes',
- 123 => 'get_class',
- 124 => 'ldap_connect',
- 125 => 'ldap_set_option',
- 126 => 'ldap_set_rebind_proc',
- 127 => 'ldap_get_values_len',
- 128 => 'ldap_unbind',
- 129 => 'asort',
- 130 => 'xml_parser_create',
- 131 => 'xml_set_object',
- 132 => 'xml_set_element_handler',
- 133 => 'chop',
- 134 => 'xml_error_string',
- 135 => 'xml_get_current_line_number',
- 136 => 'function_exists',
- 137 => 'sha1',
- 138 => 'base64_encode',
- 139 => 'get_declared_classes',
- 140 => 'escapeshellarg',
- 141 => 'kadm5_init_with_password',
- 142 => 'kadm5_chpass_principal',
- 143 => 'kadm5_destroy',
- 144 => 'uniqid',
- 145 => 'htmlspecialchars',
- 146 => 'serialize',
- 147 => 'hexdec',
- 148 => 'gettype',
- 149 => 'get_object_vars',
- 150 => 'is_object',
- 151 => 'mysql_num_fields',
- 152 => 'mysql_field_name',
- 153 => 'mysql_data_seek',
- 154 => 'preg_match_all',
- 155 => 'ldap_bind',
- 156 => 'ldap_read',
- 157 => 'ldap_get_entries',
- 158 => 'version_compare',
- 159 => 'shell_exec',
- 160 => 'system',
- 161 => 'ini_get',
- 162 => 'posix_getgrgid',
- 163 => 'recode',
- 164 => 'iconv',
- 165 => 'ord',
- 166 => 'printf',
- 167 => 'print_r',
+ 7 => 'header',
+ 8 => 'error_reporting',
+ 9 => 'putenv',
+ 10 => 'setlocale',
+ 11 => 'bindtextdomain',
+ 12 => 'textdomain',
+ 13 => 'sprintf',
+ 14 => 'str_replace',
+ 15 => 'gmdate',
+ 16 => 'imageAlphaBlending',
+ 17 => 'imageSaveAlpha',
+ 18 => 'imagesx',
+ 19 => 'imagesy',
+ 20 => 'imagecopy',
+ 21 => 'imagePng',
+ 22 => 'mysql_pconnect',
+ 23 => 'mysql_select_db',
+ 24 => 'mysql_query',
+ 25 => 'mysql_fetch_array',
+ 26 => 'mysql_result',
+ 27 => 'mysql_close',
+ 28 => 'tempnam',
+ 29 => 'popen',
+ 30 => 'fread',
+ 31 => 'pclose',
+ 32 => 'unlink',
+ 33 => 'imagick_blob2image',
+ 34 => 'imagick_image2blob',
+ 35 => 'preg_match',
+ 36 => 'base64_decode',
+ 37 => 'preg_replace',
+ 38 => 'srand',
+ 39 => 'strlen',
+ 40 => 'date',
+ 41 => 'preg_split',
+ 42 => 'trim',
+ 43 => 'chr',
+ 44 => 'chunk_split',
+ 45 => 'is_dir',
+ 46 => 'is_writable',
+ 47 => 'session_destroy',
+ 48 => 'substr',
+ 49 => 'tidy_parse_string',
+ 50 => 'tidy_clean_repair',
+ 51 => 'tidy_error_count',
+ 52 => 'tidy_warning_count',
+ 53 => 'nl2br',
+ 54 => 'intval',
+ 55 => 'ImageFontWidth',
+ 56 => 'ImageFontHeight',
+ 57 => 'imagecolorallocate',
+ 58 => 'imagerectangle',
+ 59 => 'imagefilledrectangle',
+ 60 => 'imagestring',
+ 61 => 'imagepng',
+ 62 => 'imagedestroy',
+ 63 => 'is_int',
+ 64 => 'session_id',
+ 65 => 'define',
+ 66 => 'base64_encode',
+ 67 => 'debug_backtrace',
+ 68 => 'htmlentities',
+ 69 => 'flush',
+ 70 => 'dirname',
+ 71 => 'set_error_handler',
+ 72 => 'ini_set',
+ 73 => 'chdir',
+ 74 => 'opendir',
+ 75 => 'readdir',
+ 76 => 'closedir',
+ 77 => 'explode',
+ 78 => 'microtime',
+ 79 => 'split',
+ 80 => 'strtoupper',
+ 81 => 'syslog',
+ 82 => 'md5',
+ 83 => 'arsort',
+ 84 => 'reset',
+ 85 => 'ltrim',
+ 86 => 'strstr',
+ 87 => 'rtrim',
+ 88 => 'array_flip',
+ 89 => 'preg_quote',
+ 90 => 'func_get_args',
+ 91 => 'cups_get_dest_list',
+ 92 => 'cups_get_printer_attributes',
+ 93 => 'exec',
+ 94 => 'session_unregister',
+ 95 => 'pow',
+ 96 => 'key',
+ 97 => 'current',
+ 98 => 'array_merge',
+ 99 => 'strtolower',
+ 100 => 'mt_srand',
+ 101 => 'mt_rand',
+ 102 => 'mb_substr',
+ 103 => 'is_link',
+ 104 => 'sort',
+ 105 => 'array_reverse',
+ 106 => 'is_readable',
+ 107 => 'is_file',
+ 108 => 'filesize',
+ 109 => 'dechex',
+ 110 => 'crypt',
+ 111 => 'imap_close',
+ 112 => 'is_array',
+ 113 => 'imap_listmailbox',
+ 114 => 'imap_utf7_decode',
+ 115 => 'imap_last_error',
+ 116 => 'imap_getacl',
+ 117 => 'imap_setacl',
+ 118 => 'strpos',
+ 119 => 'is_integer',
+ 120 => 'implode',
+ 121 => 'file',
+ 122 => 'uniqid',
+ 123 => 'htmlspecialchars',
+ 124 => 'serialize',
+ 125 => 'hexdec',
+ 126 => 'gettype',
+ 127 => 'get_object_vars',
+ 128 => 'is_object',
+ 129 => 'mysql_num_fields',
+ 130 => 'mysql_field_name',
+ 131 => 'mysql_data_seek',
+ 132 => 'preg_match_all',
+ 133 => 'stripcslashes',
+ 134 => 'get_class',
+ 135 => 'ldap_connect',
+ 136 => 'ldap_set_option',
+ 137 => 'ldap_set_rebind_proc',
+ 138 => 'ldap_get_values_len',
+ 139 => 'ldap_unbind',
+ 140 => 'asort',
+ 141 => 'function_exists',
+ 142 => 'sha1',
+ 143 => 'get_declared_classes',
+ 144 => 'escapeshellarg',
+ 145 => 'get_class_vars',
+ 146 => 'array_keys',
+ 147 => 'ldap_bind',
+ 148 => 'ldap_read',
+ 149 => 'ldap_get_entries',
+ 150 => 'version_compare',
+ 151 => 'shell_exec',
+ 152 => 'system',
+ 153 => 'ini_get',
+ 154 => 'posix_getgrgid',
+ 155 => 'xml_parser_create',
+ 156 => 'xml_set_object',
+ 157 => 'xml_set_element_handler',
+ 158 => 'chop',
+ 159 => 'xml_error_string',
+ 160 => 'xml_get_current_line_number',
+ 161 => 'printf',
+ 162 => 'kadm5_init_with_password',
+ 163 => 'kadm5_chpass_principal',
+ 164 => 'kadm5_destroy',
+ 165 => 'recode',
+ 166 => 'iconv',
+ 167 => 'ord',
168 => 'time',
169 => 'stat',
170 => 'array_slice',
203 => 'array_unshift',
204 => 'next',
205 => 'round',
- 206 => 'preg_grep',
- 207 => 'rawurlencode',
- 208 => 'bin2hex',
+ 206 => 'rawurlencode',
+ 207 => 'bin2hex',
+ 208 => 'preg_grep',
209 => 'str_repeat',
210 => 'extract',
211 => 'preg_replace_callback',
225 => 'unserialize',
226 => 'realpath',
227 => 'strncmp',
- 228 => 'mysql_fetch_row',
- 229 => 'array_search',
- 230 => 'array_key_exists',
+ 228 => 'array_search',
+ 229 => 'array_key_exists',
+ 230 => 'mysql_fetch_row',
231 => 'mysql_error',
232 => 'utf8_encode',
233 => 'file_get_contents',
index 01e513475691672b31383cddd49621c992e7f352..5d29176f54885e564dc4cae303ed345e479aa966 100644 (file)
}
/**
- * Scans files in $path an checks for calls of functions.
+ * Scans files in $path and checks for calls of functions.
* @param $path Path to search for files in (default: "./")
* @param $pattern RegEx-Pattern for matching PHP-Files (default: "/.+\.(php[34]?$)|(inc$)/")
* @param $skip_dirs RegEx-Pattern for directories to ignore (default: ".svn")
// Needed arrays
$functions= array();
- $user_functions= array();
+
+ // We need to include our own function here, because PHP seems to lock the current executed function
+ $user_functions= array('test_defined_functions');
// Scan files for used defined functions
foreach($array as $file) {
}
/**
- * Scans files in $path an checks for calls of functions that are undefined.
+ * Scans files in $path and checks for calls of functions that are undefined.
* Edit $debug and $verbose to control output. Default is 'false' for both to disallow
* console functionality.
* @param $path Path to search for files in (default: "./")
}
/**
- * @return true if $function is a known php-function, false otherwise
+ * Returns true if $function is a known php-function, false otherwise.
+ * @return true if $function is a known php-function, false otherwise.
*/
function check_function($function) {
$result= false;
return $result;
}
-/** @return true if $function is meta-function, false otherwise */
+/** Returns true if $function is meta-function, false otherwise.
+ * @return true if $function is meta-function, false otherwise.
+ */
function is_meta_function($function) {
$meta_functions= array(
"print","array","isset","exit","unset",
return(in_array($function,$meta_functions));
}
-/** @return true if $function is keyword, false otherwise */
+/** Returns true if $function is keyword, false otherwise.
+ * @return true if $function is keyword, false otherwise.
+ */
function is_keyword($function) {
$keywords= array(
"if","else","elseif","while","do","case",
}
/**
+ * Returns array of called functions.
* @param $string PHP-Code
- * @return array of called functions
+ * @return array of called functions.
*/
function extract_php_functions($string) {
// Function names have to be A-z or _ for the first letter
}
/**
- * @return php-code without <?php ... markers
+ * Returns php-code without <?php ... markers.
+ * @return php-code without <?php ... markers.
*/
function get_php_code($string) {
$array= array();