Skip to content

Commit

Permalink
Finish func_info updates for ext/standard
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jun 3, 2019
1 parent fd911a7 commit 001d434
Show file tree
Hide file tree
Showing 13 changed files with 196 additions and 196 deletions.
258 changes: 130 additions & 128 deletions ext/opcache/Optimizer/zend_func_info.c

Large diffs are not rendered by default.

28 changes: 13 additions & 15 deletions ext/standard/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,7 @@ static zend_long php_extract_skip(zend_array *arr, zend_array *symbol_table) /*
}
/* }}} */

/* {{{ proto int extract(array var_array [, int extract_type [, string prefix]])
/* {{{ proto int|null extract(array var_array [, int extract_type [, string prefix]])
Imports variables into symbol table from an array */
PHP_FUNCTION(extract)
{
Expand Down Expand Up @@ -2556,7 +2556,7 @@ static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_valu
}
/* }}} */

/* {{{ proto array compact(mixed var_names [, mixed ...])
/* {{{ proto array|null compact(mixed var_names [, mixed ...])
Creates a hash containing variables and their values */
PHP_FUNCTION(compact)
{
Expand Down Expand Up @@ -2592,7 +2592,7 @@ PHP_FUNCTION(compact)
}
/* }}} */

/* {{{ proto array array_fill(int start_key, int num, mixed val)
/* {{{ proto array|false array_fill(int start_key, int num, mixed val)
Create an array containing num elements starting with index start_key each initialized to val */
PHP_FUNCTION(array_fill)
{
Expand Down Expand Up @@ -3974,7 +3974,7 @@ PHP_FUNCTION(array_keys)
}
/* }}} */

/* {{{ proto mixed array_key_first(array stack)
/* {{{ proto int|string|false array_key_first(array stack)
Get the key of the first element of the array */
PHP_FUNCTION(array_key_first)
{
Expand All @@ -3990,7 +3990,7 @@ PHP_FUNCTION(array_key_first)
}
/* }}} */

/* {{{ proto mixed array_key_last(array stack)
/* {{{ proto int|string|false array_key_last(array stack)
Get the key of the last element of the array */
PHP_FUNCTION(array_key_last)
{
Expand Down Expand Up @@ -4159,7 +4159,7 @@ static inline zval *array_column_fetch_prop(zval *data, zval *name, zval *rv) /*
}
/* }}} */

/* {{{ proto array array_column(array input, mixed column_key[, mixed index_key])
/* {{{ proto array|false array_column(array input, mixed column_key[, mixed index_key])
Return the values from a single column in the input array, identified by the
value_key and optionally indexed by the index_key */
PHP_FUNCTION(array_column)
Expand Down Expand Up @@ -4748,7 +4748,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
param_spec = "+f";
intersect_data_compare_func = php_array_user_compare;
} else {
php_error_docref(NULL, E_WARNING, "data_compare_type is %d. This should never happen. Please report as a bug", data_compare_type);
ZEND_ASSERT(0 && "Invalid data_compare_type");
return;
}

Expand Down Expand Up @@ -4800,7 +4800,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
fci_key = &fci2;
fci_key_cache = &fci2_cache;
} else {
php_error_docref(NULL, E_WARNING, "data_compare_type is %d. key_compare_type is %d. This should never happen. Please report as a bug", data_compare_type, key_compare_type);
ZEND_ASSERT(0 && "Invalid data_compare_type / key_compare_type");
return;
}

Expand All @@ -4814,7 +4814,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
}

} else {
php_error_docref(NULL, E_WARNING, "behavior is %d. This should never happen. Please report as a bug", behavior);
ZEND_ASSERT(0 && "Invalid behavior");
return;
}

Expand Down Expand Up @@ -5211,7 +5211,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
fci_key = &fci2;
fci_key_cache = &fci2_cache;
} else {
php_error_docref(NULL, E_WARNING, "data_compare_type is %d. key_compare_type is %d. This should never happen. Please report as a bug", data_compare_type, key_compare_type);
ZEND_ASSERT(0 && "Invalid data_compare_type / key_compare_type");
return;
}

Expand All @@ -5225,7 +5225,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
}

} else {
php_error_docref(NULL, E_WARNING, "behavior is %d. This should never happen. Please report as a bug", behavior);
ZEND_ASSERT(0 && "Invalid behavior");
return;
}

Expand Down Expand Up @@ -6134,8 +6134,6 @@ PHP_FUNCTION(array_map)
Z_PARAM_VARIADIC('+', arrays, n_arrays)
ZEND_PARSE_PARAMETERS_END();

RETVAL_NULL();

if (n_arrays == 1) {
zend_ulong num_key;
zend_string *str_key;
Expand Down Expand Up @@ -6318,7 +6316,7 @@ PHP_FUNCTION(array_key_exists)
}
/* }}} */

/* {{{ proto array array_chunk(array input, int size [, bool preserve_keys])
/* {{{ proto array|null array_chunk(array input, int size [, bool preserve_keys])
Split array into chunks */
PHP_FUNCTION(array_chunk)
{
Expand Down Expand Up @@ -6387,7 +6385,7 @@ PHP_FUNCTION(array_chunk)
}
/* }}} */

/* {{{ proto array array_combine(array keys, array values)
/* {{{ proto array|false array_combine(array keys, array values)
Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values */
PHP_FUNCTION(array_combine)
{
Expand Down
12 changes: 6 additions & 6 deletions ext/standard/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,23 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
}
/* }}} */

/* {{{ proto mixed opendir(string path[, resource context])
/* {{{ proto resource|false opendir(string path[, resource context])
Open a directory and return a dir_handle */
PHP_FUNCTION(opendir)
{
_php_do_opendir(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* }}} */

/* {{{ proto object dir(string directory[, resource context])
/* {{{ proto objectđalse dir(string directory[, resource context])
Directory class with properties, handle and class and methods read, rewind and close */
PHP_FUNCTION(getdir)
{
_php_do_opendir(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* }}} */

/* {{{ proto void closedir([resource dir_handle])
/* {{{ proto bool closedir([resource dir_handle])
Close directory connection identified by the dir_handle */
PHP_FUNCTION(closedir)
{
Expand Down Expand Up @@ -390,7 +390,7 @@ PHP_FUNCTION(rewinddir)
}
/* }}} */

/* {{{ proto string readdir([resource dir_handle])
/* {{{ proto string|false readdir([resource dir_handle])
Read directory entry from dir_handle */
PHP_NAMED_FUNCTION(php_if_readdir)
{
Expand All @@ -413,7 +413,7 @@ PHP_NAMED_FUNCTION(php_if_readdir)
/* }}} */

#ifdef HAVE_GLOB
/* {{{ proto array glob(string pattern [, int flags])
/* {{{ proto array|false glob(string pattern [, int flags])
Find pathnames matching a pattern */
PHP_FUNCTION(glob)
{
Expand Down Expand Up @@ -546,7 +546,7 @@ PHP_FUNCTION(glob)
/* }}} */
#endif

/* {{{ proto array scandir(string dir [, int sorting_order [, resource context]])
/* {{{ proto array|false scandir(string dir [, int sorting_order [, resource context]])
List files & directories inside the specified path */
PHP_FUNCTION(scandir)
{
Expand Down
14 changes: 7 additions & 7 deletions ext/standard/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ PHP_FUNCTION(flock)

#define PHP_META_UNSAFE ".\\+*?[^]$() "

/* {{{ proto array get_meta_tags(string filename [, bool use_include_path])
/* {{{ proto array|false get_meta_tags(string filename [, bool use_include_path])
Extracts all meta tag content attributes from a file and returns an array */
PHP_FUNCTION(get_meta_tags)
{
Expand Down Expand Up @@ -520,7 +520,7 @@ PHP_FUNCTION(get_meta_tags)
}
/* }}} */

/* {{{ proto string file_get_contents(string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]])
/* {{{ proto string|false file_get_contents(string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]])
Read the entire file into a string */
PHP_FUNCTION(file_get_contents)
{
Expand Down Expand Up @@ -578,7 +578,7 @@ PHP_FUNCTION(file_get_contents)
}
/* }}} */

/* {{{ proto int file_put_contents(string file, mixed data [, int flags [, resource context]])
/* {{{ proto int|false file_put_contents(string file, mixed data [, int flags [, resource context]])
Write/Create a file with contents data and return the number of bytes written */
PHP_FUNCTION(file_put_contents)
{
Expand Down Expand Up @@ -720,7 +720,7 @@ PHP_FUNCTION(file_put_contents)

#define PHP_FILE_BUF_SIZE 80

/* {{{ proto array file(string filename [, int flags[, resource context]])
/* {{{ proto array|false file(string filename [, int flags[, resource context]])
Read entire file into an array */
PHP_FUNCTION(file)
{
Expand Down Expand Up @@ -816,7 +816,7 @@ PHP_FUNCTION(file)
}
/* }}} */

/* {{{ proto string tempnam(string dir, string prefix)
/* {{{ proto string|false tempnam(string dir, string prefix)
Create a unique filename in a directory */
PHP_FUNCTION(tempnam)
{
Expand Down Expand Up @@ -1932,7 +1932,7 @@ PHPAPI size_t php_fputcsv(php_stream *stream, zval *fields, char delimiter, char
}
/* }}} */

/* {{{ proto array fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])
/* {{{ proto array|false fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])
Get line from file pointer and parse for CSV fields */
PHP_FUNCTION(fgetcsv)
{
Expand Down Expand Up @@ -2293,7 +2293,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int
/* }}} */

#if HAVE_REALPATH || defined(ZTS)
/* {{{ proto string realpath(string path)
/* {{{ proto string|false realpath(string path)
Return the resolved path */
PHP_FUNCTION(realpath)
{
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/filestat.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static int php_disk_total_space(char *path, double *space) /* {{{ */
/* }}} */
/* }}} */

/* {{{ proto float disk_total_space(string path)
/* {{{ proto float|false disk_total_space(string path)
Get total disk space for filesystem that path is on */
PHP_FUNCTION(disk_total_space)
{
Expand Down Expand Up @@ -273,7 +273,7 @@ static int php_disk_free_space(char *path, double *space) /* {{{ */
/* }}} */
/* }}} */

/* {{{ proto float disk_free_space(string path)
/* {{{ proto float|false disk_free_space(string path)
Get free disk space for filesystem that path is on */
PHP_FUNCTION(disk_free_space)
{
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ PHPAPI zend_string *php_mail_build_headers(zval *headers)
}


/* {{{ proto int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
/* {{{ proto bool mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
Send an email message */
PHP_FUNCTION(mail)
{
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/metaphone.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

static int metaphone(unsigned char *word, size_t word_len, zend_long max_phonemes, zend_string **phoned_word, int traditional);

/* {{{ proto string metaphone(string text[, int phones])
/* {{{ proto string|false metaphone(string text[, int phones])
Break english phrases down into their phonemes */
PHP_FUNCTION(metaphone)
{
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ static zend_long php_unpack(char *data, size_t size, int issigned, int *map)
* Implemented formats are Z, A, a, h, H, c, C, s, S, i, I, l, L, n, N, q, Q, J, P, f, d, x, X, @.
* Added g, G for little endian float and big endian float, added e, E for little endian double and big endian double.
*/
/* {{{ proto array unpack(string format, string input)
/* {{{ proto array|false unpack(string format, string input)
Unpack binary string into named array elements according to format argument */
PHP_FUNCTION(unpack)
{
Expand Down
Loading

0 comments on commit 001d434

Please sign in to comment.