Skip to content

Commit

Permalink
Update MAY_BE_NULL info for more ext/standard functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed May 28, 2019
1 parent c64fe84 commit 0d79c70
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 109 deletions.
144 changes: 72 additions & 72 deletions ext/opcache/Optimizer/zend_func_info.c
Expand Up @@ -153,100 +153,100 @@ static const func_info_t func_infos[] = {
#endif
F0("flush", MAY_BE_NULL),
F1("wordwrap", MAY_BE_FALSE | MAY_BE_STRING),
F1("htmlspecialchars", MAY_BE_NULL | MAY_BE_STRING),
F1("htmlentities", MAY_BE_NULL | MAY_BE_STRING),
FN("html_entity_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
FN("htmlspecialchars_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("get_html_translation_table", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
F1("sha1", MAY_BE_NULL | MAY_BE_STRING),
F1("sha1_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("md5", MAY_BE_NULL | MAY_BE_STRING),
F1("md5_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F0("crc32", MAY_BE_NULL | MAY_BE_LONG),
F1("iptcparse", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
F1("iptcembed", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("getimagesize", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
F1("getimagesizefromstring", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
F1("image_type_to_mime_type", MAY_BE_NULL | MAY_BE_STRING),
F1("htmlspecialchars", MAY_BE_STRING),
F1("htmlentities", MAY_BE_STRING),
FN("html_entity_decode", MAY_BE_FALSE | MAY_BE_STRING),
FN("htmlspecialchars_decode", MAY_BE_FALSE | MAY_BE_STRING),
F1("get_html_translation_table", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
F1("sha1", MAY_BE_STRING),
F1("sha1_file", MAY_BE_FALSE | MAY_BE_STRING),
F1("md5", MAY_BE_STRING),
F1("md5_file", MAY_BE_FALSE | MAY_BE_STRING),
F0("crc32", MAY_BE_LONG),
F1("iptcparse", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
F1("iptcembed", MAY_BE_FALSE | MAY_BE_STRING),
F1("getimagesize", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
F1("getimagesizefromstring", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
F1("image_type_to_mime_type", MAY_BE_STRING),
F1("image_type_to_extension", MAY_BE_FALSE | MAY_BE_STRING),
F0("phpinfo", MAY_BE_NULL | MAY_BE_TRUE),
F1("phpversion", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F0("phpcredits", MAY_BE_NULL | MAY_BE_TRUE),
F0("phpinfo", MAY_BE_TRUE),
F1("phpversion", MAY_BE_FALSE | MAY_BE_STRING),
F0("phpcredits", MAY_BE_TRUE),
F1("php_sapi_name", MAY_BE_FALSE | MAY_BE_STRING),
F1("php_uname", MAY_BE_NULL | MAY_BE_STRING),
F1("php_uname", MAY_BE_STRING),
F1("php_ini_scanned_files", MAY_BE_FALSE | MAY_BE_STRING),
F1("php_ini_loaded_file", MAY_BE_FALSE | MAY_BE_STRING),
F0("strnatcmp", MAY_BE_NULL | MAY_BE_LONG),
F0("strnatcasecmp", MAY_BE_NULL | MAY_BE_LONG),
F0("substr_count", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F0("strspn", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F0("strcspn", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F1("strtok", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
FN("strtoupper", MAY_BE_NULL | MAY_BE_STRING),
FN("strtolower", MAY_BE_NULL | MAY_BE_STRING),
F0("strpos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F0("stripos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F0("strrpos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F0("strripos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F1("strrev", MAY_BE_NULL | MAY_BE_STRING),
F1("hebrev", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("hebrevc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("nl2br", MAY_BE_NULL | MAY_BE_STRING),
F1("basename", MAY_BE_NULL | MAY_BE_STRING),
F0("strnatcmp", MAY_BE_LONG),
F0("strnatcasecmp", MAY_BE_LONG),
F0("substr_count", MAY_BE_FALSE | MAY_BE_LONG),
F0("strspn", MAY_BE_FALSE | MAY_BE_LONG),
F0("strcspn", MAY_BE_FALSE | MAY_BE_LONG),
F1("strtok", MAY_BE_FALSE | MAY_BE_STRING),
FN("strtoupper", MAY_BE_STRING),
FN("strtolower", MAY_BE_STRING),
F0("strpos", MAY_BE_FALSE | MAY_BE_LONG),
F0("stripos", MAY_BE_FALSE | MAY_BE_LONG),
F0("strrpos", MAY_BE_FALSE | MAY_BE_LONG),
F0("strripos", MAY_BE_FALSE | MAY_BE_LONG),
F1("strrev", MAY_BE_STRING),
F1("hebrev", MAY_BE_FALSE | MAY_BE_STRING),
F1("hebrevc", MAY_BE_FALSE | MAY_BE_STRING),
FN("nl2br", MAY_BE_STRING),
F1("basename", MAY_BE_STRING),
F1("dirname", MAY_BE_NULL | MAY_BE_STRING),
F1("pathinfo", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
F1("stripslashes", MAY_BE_NULL | MAY_BE_STRING),
F1("stripcslashes", MAY_BE_NULL | MAY_BE_STRING),
F1("strstr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("stristr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("strrchr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("pathinfo", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
F1("stripslashes", MAY_BE_STRING),
F1("stripcslashes", MAY_BE_STRING),
F1("strstr", MAY_BE_FALSE | MAY_BE_STRING),
F1("stristr", MAY_BE_FALSE | MAY_BE_STRING),
F1("strrchr", MAY_BE_FALSE | MAY_BE_STRING),
F1("str_shuffle", MAY_BE_NULL | MAY_BE_STRING),
F1("str_word_count", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F1("str_split", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F1("str_word_count", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F1("str_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING),
F0("substr_compare", MAY_BE_FALSE | MAY_BE_LONG),
#ifdef HAVE_STRCOLL
F0("strcoll", MAY_BE_NULL | MAY_BE_LONG),
F0("strcoll", MAY_BE_LONG),
#endif
#ifdef HAVE_STRFMON
F1("money_format", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("money_format", MAY_BE_STRING),
#endif
FN("substr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
FN("substr_replace", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
F1("quotemeta", MAY_BE_NULL | MAY_BE_STRING),
FN("ucfirst", MAY_BE_NULL | MAY_BE_STRING),
FN("lcfirst", MAY_BE_NULL | MAY_BE_STRING),
F1("ucwords", MAY_BE_NULL | MAY_BE_STRING),
FN("strtr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
FN("addslashes", MAY_BE_NULL | MAY_BE_STRING),
F1("addcslashes", MAY_BE_NULL | MAY_BE_STRING),
FN("rtrim", MAY_BE_NULL | MAY_BE_STRING),
FN("str_replace", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
FN("str_ireplace", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
FN("substr", MAY_BE_FALSE | MAY_BE_STRING),
FN("substr_replace", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
F1("quotemeta", MAY_BE_STRING),
FN("ucfirst", MAY_BE_STRING),
FN("lcfirst", MAY_BE_STRING),
F1("ucwords", MAY_BE_STRING),
FN("strtr", MAY_BE_FALSE | MAY_BE_STRING),
FN("addslashes", MAY_BE_STRING),
F1("addcslashes", MAY_BE_STRING),
FN("rtrim", MAY_BE_STRING),
FN("str_replace", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
FN("str_ireplace", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
F1("str_repeat", MAY_BE_NULL | MAY_BE_STRING),
F1("count_chars", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
F1("chunk_split", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
FN("trim", MAY_BE_NULL | MAY_BE_STRING),
FN("ltrim", MAY_BE_NULL | MAY_BE_STRING),
F1("strip_tags", MAY_BE_NULL | MAY_BE_STRING),
F0("similar_text", MAY_BE_NULL | MAY_BE_LONG),
F1("explode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F1("count_chars", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
F1("chunk_split", MAY_BE_FALSE | MAY_BE_STRING),
FN("trim", MAY_BE_STRING),
FN("ltrim", MAY_BE_STRING),
F1("strip_tags", MAY_BE_STRING),
F0("similar_text", MAY_BE_LONG),
F1("explode", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
FN("implode", MAY_BE_NULL | MAY_BE_STRING),
FN("join", MAY_BE_NULL | MAY_BE_STRING),
FN("setlocale", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
FN("setlocale", MAY_BE_FALSE | MAY_BE_STRING),
F1("localeconv", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
#if HAVE_NL_LANGINFO
F1("nl_langinfo", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("nl_langinfo", MAY_BE_FALSE | MAY_BE_STRING),
#endif
F1("soundex", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F0("levenshtein", MAY_BE_NULL | MAY_BE_LONG),
F1("chr", MAY_BE_NULL | MAY_BE_STRING),
F0("ord", MAY_BE_NULL | MAY_BE_LONG),
F1("soundex", MAY_BE_FALSE | MAY_BE_STRING),
F0("levenshtein", MAY_BE_LONG),
F1("chr", MAY_BE_STRING),
F0("ord", MAY_BE_LONG),
F0("parse_str", MAY_BE_NULL),
F1("str_getcsv", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
F1("str_pad", MAY_BE_NULL | MAY_BE_STRING),
F1("chop", MAY_BE_NULL | MAY_BE_STRING),
F1("strchr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("strchr", MAY_BE_STRING),
F1("sprintf", MAY_BE_FALSE | MAY_BE_STRING),
F0("printf", MAY_BE_FALSE | MAY_BE_LONG),
F0("vprintf", MAY_BE_FALSE | MAY_BE_LONG),
Expand Down
8 changes: 4 additions & 4 deletions ext/standard/image.c
Expand Up @@ -1223,7 +1223,7 @@ PHP_FUNCTION(image_type_to_mime_type)
}
/* }}} */

/* {{{ proto string image_type_to_extension(int imagetype [, bool include_dot])
/* {{{ proto string|false image_type_to_extension(int imagetype [, bool include_dot])
Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype */
PHP_FUNCTION(image_type_to_extension)
{
Expand Down Expand Up @@ -1510,23 +1510,23 @@ static void php_getimagesize_from_any(INTERNAL_FUNCTION_PARAMETERS, int mode) {
}

if (!stream) {
RETURN_FALSE;
RETURN_FALSE;
}

php_getimagesize_from_stream(stream, info, INTERNAL_FUNCTION_PARAM_PASSTHRU);
php_stream_close(stream);
}
/* }}} */

/* {{{ proto array getimagesize(string imagefile [, array info])
/* {{{ proto array|false getimagesize(string imagefile [, array info])
Get the size of an image as 4-element array */
PHP_FUNCTION(getimagesize)
{
php_getimagesize_from_any(INTERNAL_FUNCTION_PARAM_PASSTHRU, FROM_PATH);
}
/* }}} */

/* {{{ proto array getimagesizefromstring(string data [, array info])
/* {{{ proto array|false getimagesizefromstring(string data [, array info])
Get the size of an image as 4-element array */
PHP_FUNCTION(getimagesizefromstring)
{
Expand Down
12 changes: 6 additions & 6 deletions ext/standard/info.c
Expand Up @@ -1245,7 +1245,7 @@ void register_phpinfo_constants(INIT_FUNC_ARGS)
}
/* }}} */

/* {{{ proto void phpinfo([int what])
/* {{{ proto bool phpinfo([int what])
Output a page of useful information about PHP and the current request */
PHP_FUNCTION(phpinfo)
{
Expand All @@ -1266,7 +1266,7 @@ PHP_FUNCTION(phpinfo)

/* }}} */

/* {{{ proto string phpversion([string extension])
/* {{{ proto string|false phpversion([string extension])
Return the current PHP version */
PHP_FUNCTION(phpversion)
{
Expand All @@ -1291,7 +1291,7 @@ PHP_FUNCTION(phpversion)
}
/* }}} */

/* {{{ proto void phpcredits([int flag])
/* {{{ proto bool phpcredits([int flag])
Prints the list of people who've contributed to the PHP project */
PHP_FUNCTION(phpcredits)
{
Expand All @@ -1307,7 +1307,7 @@ PHP_FUNCTION(phpcredits)
}
/* }}} */

/* {{{ proto string php_sapi_name(void)
/* {{{ proto string|false php_sapi_name(void)
Return the current SAPI module name */
PHP_FUNCTION(php_sapi_name)
{
Expand Down Expand Up @@ -1341,7 +1341,7 @@ PHP_FUNCTION(php_uname)

/* }}} */

/* {{{ proto string php_ini_scanned_files(void)
/* {{{ proto string|false php_ini_scanned_files(void)
Return comma-separated string of .ini files parsed from the additional ini dir */
PHP_FUNCTION(php_ini_scanned_files)
{
Expand All @@ -1357,7 +1357,7 @@ PHP_FUNCTION(php_ini_scanned_files)
}
/* }}} */

/* {{{ proto string php_ini_loaded_file(void)
/* {{{ proto string|false php_ini_loaded_file(void)
Return the actual loaded ini filename */
PHP_FUNCTION(php_ini_loaded_file)
{
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/iptc.c
Expand Up @@ -180,7 +180,7 @@ static int php_iptc_next_marker(FILE *fp, int spool, unsigned char **spoolbuf)

static char psheader[] = "\xFF\xED\0\0Photoshop 3.0\08BIM\x04\x04\0\0\0\0";

/* {{{ proto array iptcembed(string iptcdata, string jpeg_file_name [, int spool])
/* {{{ proto string|false iptcembed(string iptcdata, string jpeg_file_name [, int spool])
Embed binary IPTC data into a JPEG image. */
PHP_FUNCTION(iptcembed)
{
Expand Down Expand Up @@ -311,7 +311,7 @@ PHP_FUNCTION(iptcembed)
}
/* }}} */

/* {{{ proto array iptcparse(string iptcdata)
/* {{{ proto array|false iptcparse(string iptcdata)
Parse binary IPTC-data into associative array */
PHP_FUNCTION(iptcparse)
{
Expand Down

0 comments on commit 0d79c70

Please sign in to comment.