Skip to content

Commit 001d434

Browse files
committed
Finish func_info updates for ext/standard
1 parent fd911a7 commit 001d434

File tree

13 files changed

+196
-196
lines changed

13 files changed

+196
-196
lines changed

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 130 additions & 128 deletions
Large diffs are not rendered by default.

ext/standard/array.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,7 @@ static zend_long php_extract_skip(zend_array *arr, zend_array *symbol_table) /*
24132413
}
24142414
/* }}} */
24152415

2416-
/* {{{ proto int extract(array var_array [, int extract_type [, string prefix]])
2416+
/* {{{ proto int|null extract(array var_array [, int extract_type [, string prefix]])
24172417
Imports variables into symbol table from an array */
24182418
PHP_FUNCTION(extract)
24192419
{
@@ -2556,7 +2556,7 @@ static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_valu
25562556
}
25572557
/* }}} */
25582558

2559-
/* {{{ proto array compact(mixed var_names [, mixed ...])
2559+
/* {{{ proto array|null compact(mixed var_names [, mixed ...])
25602560
Creates a hash containing variables and their values */
25612561
PHP_FUNCTION(compact)
25622562
{
@@ -2592,7 +2592,7 @@ PHP_FUNCTION(compact)
25922592
}
25932593
/* }}} */
25942594

2595-
/* {{{ proto array array_fill(int start_key, int num, mixed val)
2595+
/* {{{ proto array|false array_fill(int start_key, int num, mixed val)
25962596
Create an array containing num elements starting with index start_key each initialized to val */
25972597
PHP_FUNCTION(array_fill)
25982598
{
@@ -3974,7 +3974,7 @@ PHP_FUNCTION(array_keys)
39743974
}
39753975
/* }}} */
39763976

3977-
/* {{{ proto mixed array_key_first(array stack)
3977+
/* {{{ proto int|string|false array_key_first(array stack)
39783978
Get the key of the first element of the array */
39793979
PHP_FUNCTION(array_key_first)
39803980
{
@@ -3990,7 +3990,7 @@ PHP_FUNCTION(array_key_first)
39903990
}
39913991
/* }}} */
39923992

3993-
/* {{{ proto mixed array_key_last(array stack)
3993+
/* {{{ proto int|string|false array_key_last(array stack)
39943994
Get the key of the last element of the array */
39953995
PHP_FUNCTION(array_key_last)
39963996
{
@@ -4159,7 +4159,7 @@ static inline zval *array_column_fetch_prop(zval *data, zval *name, zval *rv) /*
41594159
}
41604160
/* }}} */
41614161

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

@@ -4800,7 +4800,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
48004800
fci_key = &fci2;
48014801
fci_key_cache = &fci2_cache;
48024802
} else {
4803-
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);
4803+
ZEND_ASSERT(0 && "Invalid data_compare_type / key_compare_type");
48044804
return;
48054805
}
48064806

@@ -4814,7 +4814,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
48144814
}
48154815

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

@@ -5211,7 +5211,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
52115211
fci_key = &fci2;
52125212
fci_key_cache = &fci2_cache;
52135213
} else {
5214-
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);
5214+
ZEND_ASSERT(0 && "Invalid data_compare_type / key_compare_type");
52155215
return;
52165216
}
52175217

@@ -5225,7 +5225,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
52255225
}
52265226

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

@@ -6134,8 +6134,6 @@ PHP_FUNCTION(array_map)
61346134
Z_PARAM_VARIADIC('+', arrays, n_arrays)
61356135
ZEND_PARSE_PARAMETERS_END();
61366136

6137-
RETVAL_NULL();
6138-
61396137
if (n_arrays == 1) {
61406138
zend_ulong num_key;
61416139
zend_string *str_key;
@@ -6318,7 +6316,7 @@ PHP_FUNCTION(array_key_exists)
63186316
}
63196317
/* }}} */
63206318

6321-
/* {{{ proto array array_chunk(array input, int size [, bool preserve_keys])
6319+
/* {{{ proto array|null array_chunk(array input, int size [, bool preserve_keys])
63226320
Split array into chunks */
63236321
PHP_FUNCTION(array_chunk)
63246322
{
@@ -6387,7 +6385,7 @@ PHP_FUNCTION(array_chunk)
63876385
}
63886386
/* }}} */
63896387

6390-
/* {{{ proto array array_combine(array keys, array values)
6388+
/* {{{ proto array|false array_combine(array keys, array values)
63916389
Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values */
63926390
PHP_FUNCTION(array_combine)
63936391
{

ext/standard/dir.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,23 +239,23 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
239239
}
240240
/* }}} */
241241

242-
/* {{{ proto mixed opendir(string path[, resource context])
242+
/* {{{ proto resource|false opendir(string path[, resource context])
243243
Open a directory and return a dir_handle */
244244
PHP_FUNCTION(opendir)
245245
{
246246
_php_do_opendir(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
247247
}
248248
/* }}} */
249249

250-
/* {{{ proto object dir(string directory[, resource context])
250+
/* {{{ proto objectđalse dir(string directory[, resource context])
251251
Directory class with properties, handle and class and methods read, rewind and close */
252252
PHP_FUNCTION(getdir)
253253
{
254254
_php_do_opendir(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
255255
}
256256
/* }}} */
257257

258-
/* {{{ proto void closedir([resource dir_handle])
258+
/* {{{ proto bool closedir([resource dir_handle])
259259
Close directory connection identified by the dir_handle */
260260
PHP_FUNCTION(closedir)
261261
{
@@ -390,7 +390,7 @@ PHP_FUNCTION(rewinddir)
390390
}
391391
/* }}} */
392392

393-
/* {{{ proto string readdir([resource dir_handle])
393+
/* {{{ proto string|false readdir([resource dir_handle])
394394
Read directory entry from dir_handle */
395395
PHP_NAMED_FUNCTION(php_if_readdir)
396396
{
@@ -413,7 +413,7 @@ PHP_NAMED_FUNCTION(php_if_readdir)
413413
/* }}} */
414414

415415
#ifdef HAVE_GLOB
416-
/* {{{ proto array glob(string pattern [, int flags])
416+
/* {{{ proto array|false glob(string pattern [, int flags])
417417
Find pathnames matching a pattern */
418418
PHP_FUNCTION(glob)
419419
{
@@ -546,7 +546,7 @@ PHP_FUNCTION(glob)
546546
/* }}} */
547547
#endif
548548

549-
/* {{{ proto array scandir(string dir [, int sorting_order [, resource context]])
549+
/* {{{ proto array|false scandir(string dir [, int sorting_order [, resource context]])
550550
List files & directories inside the specified path */
551551
PHP_FUNCTION(scandir)
552552
{

ext/standard/file.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ PHP_FUNCTION(flock)
375375

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

378-
/* {{{ proto array get_meta_tags(string filename [, bool use_include_path])
378+
/* {{{ proto array|false get_meta_tags(string filename [, bool use_include_path])
379379
Extracts all meta tag content attributes from a file and returns an array */
380380
PHP_FUNCTION(get_meta_tags)
381381
{
@@ -520,7 +520,7 @@ PHP_FUNCTION(get_meta_tags)
520520
}
521521
/* }}} */
522522

523-
/* {{{ proto string file_get_contents(string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]])
523+
/* {{{ proto string|false file_get_contents(string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]])
524524
Read the entire file into a string */
525525
PHP_FUNCTION(file_get_contents)
526526
{
@@ -578,7 +578,7 @@ PHP_FUNCTION(file_get_contents)
578578
}
579579
/* }}} */
580580

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

721721
#define PHP_FILE_BUF_SIZE 80
722722

723-
/* {{{ proto array file(string filename [, int flags[, resource context]])
723+
/* {{{ proto array|false file(string filename [, int flags[, resource context]])
724724
Read entire file into an array */
725725
PHP_FUNCTION(file)
726726
{
@@ -816,7 +816,7 @@ PHP_FUNCTION(file)
816816
}
817817
/* }}} */
818818

819-
/* {{{ proto string tempnam(string dir, string prefix)
819+
/* {{{ proto string|false tempnam(string dir, string prefix)
820820
Create a unique filename in a directory */
821821
PHP_FUNCTION(tempnam)
822822
{
@@ -1932,7 +1932,7 @@ PHPAPI size_t php_fputcsv(php_stream *stream, zval *fields, char delimiter, char
19321932
}
19331933
/* }}} */
19341934

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

22952295
#if HAVE_REALPATH || defined(ZTS)
2296-
/* {{{ proto string realpath(string path)
2296+
/* {{{ proto string|false realpath(string path)
22972297
Return the resolved path */
22982298
PHP_FUNCTION(realpath)
22992299
{

ext/standard/filestat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static int php_disk_total_space(char *path, double *space) /* {{{ */
178178
/* }}} */
179179
/* }}} */
180180

181-
/* {{{ proto float disk_total_space(string path)
181+
/* {{{ proto float|false disk_total_space(string path)
182182
Get total disk space for filesystem that path is on */
183183
PHP_FUNCTION(disk_total_space)
184184
{
@@ -273,7 +273,7 @@ static int php_disk_free_space(char *path, double *space) /* {{{ */
273273
/* }}} */
274274
/* }}} */
275275

276-
/* {{{ proto float disk_free_space(string path)
276+
/* {{{ proto float|false disk_free_space(string path)
277277
Get free disk space for filesystem that path is on */
278278
PHP_FUNCTION(disk_free_space)
279279
{

ext/standard/mail.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ PHPAPI zend_string *php_mail_build_headers(zval *headers)
275275
}
276276

277277

278-
/* {{{ proto int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
278+
/* {{{ proto bool mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
279279
Send an email message */
280280
PHP_FUNCTION(mail)
281281
{

ext/standard/metaphone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
/* {{{ proto string metaphone(string text[, int phones])
28+
/* {{{ proto string|false metaphone(string text[, int phones])
2929
Break english phrases down into their phonemes */
3030
PHP_FUNCTION(metaphone)
3131
{

ext/standard/pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static zend_long php_unpack(char *data, size_t size, int issigned, int *map)
710710
* 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, @.
711711
* Added g, G for little endian float and big endian float, added e, E for little endian double and big endian double.
712712
*/
713-
/* {{{ proto array unpack(string format, string input)
713+
/* {{{ proto array|false unpack(string format, string input)
714714
Unpack binary string into named array elements according to format argument */
715715
PHP_FUNCTION(unpack)
716716
{

0 commit comments

Comments
 (0)