Commit graph

1496 commits

Author SHA1 Message Date
Theodore Brown
d5f42d68c8 Convert remaining array function arginfo to PHP stubs 2019-08-26 12:53:00 +02:00
Olumide Samson
b9c961e160 Add some header and html function stub 2019-08-25 15:27:58 +02:00
inem0o
baeb10d736 Add sha1 arginfo stubs 2019-08-19 12:35:53 +02:00
inem0o
8150c65ae4 Add pageinfo arginfo stubs 2019-08-19 11:29:22 +02:00
inem0o
b7c4d8e846 Add metaphone arginfo stubs 2019-08-19 11:18:44 +02:00
inem0o
ff7900f551 Add md5 arginfo stubs 2019-08-19 09:41:46 +02:00
inem0o
f795bdfd30 Add lcg arginfo stubs 2019-08-16 12:56:07 +02:00
inem0o
f1eca42825 Add ftok arginfo stubs 2019-08-16 12:53:11 +02:00
Theodore Brown
e2b0fb946b Add hrtime arginfo stubs 2019-08-14 16:46:10 +02:00
jason-liew
ffffaf12cf add some stubs for array func in basic_functions 2019-08-14 15:27:58 +02:00
Nikita Popov
8c927442b4 Merge branch 'PHP-7.4' 2019-08-13 14:54:57 +02:00
Islam Israfilov
1dc88ff67e Add inet_ntop and inet_pton stubs 2019-08-13 14:52:14 +02:00
Nikita Popov
fdfc7ea932 Don't return persistent string from get_cfg_var()
This is not thread-safe.
2019-08-13 14:50:01 +02:00
inem0o
ccf79547af Add crypt() function's stub
Closes GH-4515.
2019-08-13 11:28:32 +02:00
inem0o
fb363f7f00 add syslog arginfo stubs 2019-08-13 09:58:26 +02:00
inem0o
1376f61aed Add crc32 stub 2019-08-11 18:33:58 +02:00
inem0o
b98bc5bd92 Add base64_encode / base64_decode stubs
Closes GH-4504.
2019-08-10 17:40:10 +02:00
Nikita Popov
d9e2d18505 Add some basic_functions stubs 2019-08-10 12:34:29 +02:00
Nikita Popov
33886f710c Generate arginfo from PHP stub files
Signature stubs for internal functions are specified in xyz.stub.php,
from which we generate actual arginfo structures in xyz_arginfo.h.
This file then needs to be included in the implementation appropriately.

Arginfo from stubs can be regenerated using scripts/dev/gen_stub.php.
However, this should also automatically happen when the stub file is
modified.
2019-08-09 14:51:25 +02:00
Nikita Popov
36db71df47 Merge branch 'PHP-7.4' 2019-07-22 12:28:40 +02:00
Nikita Popov
964de035a7 Deprecate restore_include_path() 2019-07-22 11:39:52 +02:00
Nikita Popov
b3668aabf7 Deprecate convert_cyr_string() 2019-07-22 11:39:52 +02:00
Nikita Popov
4e190691e2 Deprecate is_real() function 2019-07-22 11:39:52 +02:00
Nikita Popov
b1cdf06673 Deprecate money_format() 2019-07-22 11:39:52 +02:00
Nikita Popov
4e4d8a4a6c Deprecate hebrevc() 2019-07-22 11:39:52 +02:00
Nikita Popov
e9e2fa4ad4 Deprecate ezmlm_hash() 2019-07-22 11:39:52 +02:00
Nikita Popov
b2ea507bea Deprecate get_magic_quotes_gpc() and get_magic_quotes_runtime() 2019-07-22 11:39:52 +02:00
Nikita Popov
3faa903d47 Merge branch 'PHP-7.4' 2019-07-16 16:44:46 +02:00
Nikita Popov
49bac9b77b Introduce zend_stream_init_filename()
Avoid more ad-hoc initialization of zend_file_handle structures.
2019-07-16 16:44:37 +02:00
Peter Kokot
7f994990ea Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_STRCOLL check
2019-06-28 00:13:25 +02:00
Peter Kokot
638c21765c Remove HAVE_STRCOLL check
The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3

- Remove also SKIPIF strcoll check in test
2019-06-28 00:05:55 +02:00
Joe Watkins
3d759e11a0
Merge branch 'PHP-7.4'
* PHP-7.4:
  Use uint64_t for time_sleep_until calculations
2019-06-16 19:20:37 +02:00
Nikita Popov
4befe320e3
Use uint64_t for time_sleep_until calculations 2019-06-16 19:20:08 +02:00
Nikita Popov
d3ed9d8192 Make sure array_splice() always returns an array
Return an array even if the return value isn't used. This allows us
to add the arginfo return type.
2019-06-05 14:56:32 +02:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Gabriel Caruso
192170a39a Add return type to some array_* functions 2019-06-05 00:13:52 -03:00
Gabriel Caruso
7393777da9 Add return type for string functions 2019-06-01 11:52:06 -03:00
Gabriel Caruso
f3f159a779 Add double return type for math functions 2019-06-01 11:52:06 -03:00
Gabriel Caruso
edd7fb2a16 Add boolean return type for is_* functions 2019-05-30 13:55:36 -03:00
Nikita Popov
d95c15e371 Update MAY_BE_NULL for parts of ext/standard
Also update proto comments to be more accurate.
2019-05-28 12:11:32 +02:00
Nikita Popov
0b66563eee Merge branch 'PHP-7.4' 2019-05-28 11:15:37 +02:00
Dik Takken
77cf3d7b11 Allow array_merge() / array_merge_recursive() without arguments
This allows writing

    array_merge(...$arrays)

instead of

    array_merge([], ...$arrays)

and is in line with similar changes to array_push() and array_unshift()
in PHP 7.3.

Closes GH-4175.
2019-05-28 11:14:15 +02:00
Nikita Popov
521a919caf Add return type information to some ext/standard functions
Just the first few functions in basic_functions.c to get started.

If anyone is interested in continuing this, PRs to add type info
will be accepted against master, with the following caveats:

 * Return types only, we are not ready to add argument types yet.
 * Only for functions. For methods the addition of return types is
   BC breaking and needs to be carefully considered.
 * Only in cases where we can actually express the return type, we
   don't have int|false and similar.
2019-05-28 11:01:10 +02:00
Dmitry Stogov
e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03:00
Dmitry Stogov
2e4686b566 Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:16:47 +03:00
Dmitry Stogov
34db07567d Use ZEND_TRA_ASSIGN_REF_... macros for by reference arguments of internal functions. 2019-04-24 16:14:48 +03:00
Nikita Popov
2f97bb6cfc Add test for get_cfg_var with array variable
And fix incorrect variable shadowing in add_config_entry(). However,
the test doesn't hit this case, as it requires a nested array. I'm
not sure if it's possible to produce nested arrays from ini?
2019-04-12 15:12:45 +02:00
Nikita Popov
733c61a894 Add test for get_cfg_var with array variable
And fix incorrect variable shadowing in add_config_entry(). However,
the test doesn't hit this case, as it requires a nested array. I'm
not sure if it's possible to produce nested arrays from ini?
2019-04-12 15:12:39 +02:00
Peter Kokot
e6f86fb17c Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove checks for locale.h, setlocale, localeconv
2019-04-07 18:34:02 +02:00