Commit Graph

47946 Commits

Author SHA1 Message Date
Christoph M. Becker
3da9fc86d1 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix imagesetinterpolation arginfo
2018-02-24 11:33:13 +01:00
Christoph M. Becker
8c396e0e88 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix imagesetinterpolation arginfo
2018-02-24 11:32:03 +01:00
Gabriel Caruso
a358211a75 Fix imagesetinterpolation arginfo
imagesetinterpolation only requires one parameter.
2018-02-24 11:30:24 +01:00
Christoph M. Becker
94d0c24dca Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix #75873: pcntl_wexitstatus returns incorrect on Big_Endian platform (s390x)
2018-02-23 23:53:32 +01:00
Christoph M. Becker
32df2b6617 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75873: pcntl_wexitstatus returns incorrect on Big_Endian platform (s390x)
2018-02-23 23:52:07 +01:00
Sam Ding
78c1ef2adb Fix #75873: pcntl_wexitstatus returns incorrect on Big_Endian platform (s390x)
Cf. https://github.com/php/php-src/pull/3141.
2018-02-23 23:50:36 +01:00
Christoph M. Becker
701d1ab0cc Fix skip condition
The test is not about mhash, but rather about hash.
2018-02-23 16:23:55 +01:00
Christoph M. Becker
d5f84fb9c5 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix some arginfos
2018-02-23 11:32:18 +01:00
Christoph M. Becker
c6cf3d4ada Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix some arginfos
2018-02-23 11:29:21 +01:00
Gabriel Caruso
0b8cfa6c78 Fix some arginfos
* all arguments for ftp_pasv are required
* $varname for getenv function isn't required anymore
* fsockopen and pfsockopen only require $hostname
* strtok can work with only one parameter
* strpbrk needs two parameters to work
* required parameters and add some parameters in openssl_* functions
2018-02-23 11:27:14 +01:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
zufuliu
bff179888f Improve similar_text(), reduce recursive call to php_similar_char()
If the longest common substring is the leftmost common substring, there
is no need to check the string prefixes for further common substrings,
since there are none.
2018-02-22 15:59:24 +01:00
Gabriel Caruso
0c0a5df111 Test ReflectionClass::getReflectionConstant method 2018-02-22 13:18:52 +01:00
Gabriel Caruso
e1cc4863d9 Remove duplicated tests 2018-02-22 13:03:21 +01:00
Gabriel Caruso
b895690dfa
remove support for string|unicode in tests 2018-02-22 08:11:30 +01:00
Pedro Magalhães
230ef2d947
improve extension skeleton generator 2018-02-22 08:04:33 +01:00
Anatol Belski
bc3de8caea Fix def signature to match declaration 2018-02-21 11:53:38 +01:00
Xinchen Hui
91635b011b Optimized php_stripslash with SSSE3 instr 2018-02-21 10:09:11 +08:00
Xinchen Hui
a6e1dc8d5b Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
  Added expectation
  Fix initialisation order
  Fix NEWS
  Fix a memleak with mysqlnd and SSL
  Move exceptional code into helpers
  Fix negotiaton of MySQL auth plugin
  Use EXPECT instead of EXPECTF when possible
  Move cold code, duplicated by specializer, into helper functions
  Fixed build without global register variables
  Sync --enable-native-intrinsics to pecl
  [ci skip] Sort recent NEWS entries alphabetically
  Fix openssl_* arginfos
  Update binary tools SDK branch for AppVeyor
  Separate slow path with make_real_object() and related code into "cold" function.
  [ci skip] run-tests.php: add missing put section
2018-02-21 09:51:38 +08:00
Johannes Schlüter
9881cb3945 Fix initialisation order 2018-02-20 23:35:57 +01:00
Johannes Schlüter
64ba5d4a06 Merge branch 'PHP-7.2' 2018-02-20 23:33:01 +01:00
Johannes Schlüter
2577cdbea2 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-20 23:32:25 +01:00
Johannes Schlüter
74ed42c169 Fix a memleak with mysqlnd and SSL 2018-02-20 23:28:23 +01:00
Johannes Schlüter
b35a64bf62 Merge branch 'PHP-7.2' 2018-02-20 23:20:55 +01:00
Johannes Schlüter
1c98955d0f Merge branch 'PHP-7.1' into PHP-7.2 2018-02-20 23:20:28 +01:00
Johannes Schlüter
e3cf72b829 Merge branch 'PHP-7.0' into PHP-7.1 2018-02-20 23:20:02 +01:00
Johannes Schlüter
8f3c29aee1 Fix negotiaton of MySQL auth plugin 2018-02-20 23:13:03 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Christoph M. Becker
e8affd805f Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix openssl_* arginfos
2018-02-20 16:26:06 +01:00
Christoph M. Becker
e80e38ab7c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix openssl_* arginfos
2018-02-20 16:25:22 +01:00
Gabriel Caruso
276b57316c Fix openssl_* arginfos
openssl_pkcs12_export and openssl_x509_parse had wrong arginfos
2018-02-20 16:23:42 +01:00
Xinchen Hui
5091f5ff9c Simplified the codes (the penalty of loading unaligned address is negligible) 2018-02-20 20:56:23 +08:00
Anatol Belski
f63393aee8 Fix possible memory leak 2018-02-20 08:23:25 +01:00
Craig Duncan
9439dd0b5b Add a test for iterating SXE properties by reference 2018-02-19 21:58:57 +01:00
Nikita Popov
ede663f381 Convert iterator by reference errors to exceptions
I'm using RuntimeException in SPL, because other SPL classes that
throw this error used it. Error is used for everything else, because
that's what core does.
2018-02-19 21:58:56 +01:00
Nikita Popov
bcc7d46aa4 Merge branch 'PHP-7.2' 2018-02-19 21:46:20 +01:00
Nikita Popov
1b6a9ea584 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-19 21:46:11 +01:00
Nikita Popov
7b3a2d16aa Fix incorrect printf modifiers 2018-02-19 21:44:36 +01:00
Nikita Popov
df1439241a Simplify code
If operator overloading is ignored tmp will be 0 and we can still
use |=. No need to separate this into two cases.
2018-02-19 21:38:10 +01:00
Anatol Belski
20934d9e18 Reduce struct size by 8 bytes on 64-bit 2018-02-19 14:02:30 +01:00
Gabriel Caruso
5f6b2c12a2 Remove explicit params count check
Relying on ZPP instead. Also, use ZEND_NUM_ARGS() instead of hardcode
number of parameters
2018-02-19 13:56:30 +01:00
Dmitry Stogov
a02a126d54 Allow optional ignorance of operator overlaoding. Optimizer takes into account possibility of operator overloading at default optimization level, but ignores this possibility at "unsafe" level (opcache.optimization_level=-1). 2018-02-19 12:21:43 +03:00
Anatol Belski
298de027d6 Reduce struct size by 8 bytes on 64-bit 2018-02-19 10:12:46 +01:00
Anatol Belski
65be13a89a Reduce struct size by 8 bytes on 64-bit 2018-02-19 10:12:46 +01:00
Gabriel Caruso
a6b2223220
Refactoring duplicated ZPP with a switch 2018-02-19 08:33:18 +01:00
Gabriel Caruso
7566416d9d
Share identical arginfos 2018-02-19 08:31:03 +01:00
Gabriel Caruso
bffc92b105
Remove duplicated informations in tests 2018-02-19 08:29:54 +01:00
Gabriel Caruso
5153413ed4
Test more functions of ftp 2018-02-19 08:27:37 +01:00
Gabriel Caruso
6d785a7a00
Test more functionalities of SPL 2018-02-19 08:26:34 +01:00
Anatol Belski
34a7c6c1a5 Reduce var scope 2018-02-18 19:59:23 +01:00
Anatol Belski
ec5d9ab82b Reduce variable scope 2018-02-18 19:15:36 +01:00
Anatol Belski
8eda7d9410 Remove effectless assignment 2018-02-18 19:07:25 +01:00
Anatol Belski
1bdf7abbcb Fix possible int overflow on vars used in loop with size_t counter 2018-02-18 17:55:50 +01:00
Anatol Belski
26f1ffbd91 Fix overflow, int var used in loop with size_t counter 2018-02-18 17:55:50 +01:00
Nikita Popov
48c0662876 Merge branch 'PHP-7.2' 2018-02-18 17:43:08 +01:00
Nikita Popov
500632ac13 Fix pfsockopen() func info 2018-02-18 17:42:12 +01:00
Nikita Popov
c0abab5fca Fix ZEND_SL range inference
This is a bit tricker than right shifts because shifting in the
sign bit flips the sign. The computed bounds are not tight.
2018-02-18 17:42:12 +01:00
Nikita Popov
202989edf8 Fix ZEND_SR range inference
Handle out-of-range RHS correctly.
2018-02-18 17:42:12 +01:00
Nikita Popov
40ff001381 Fix constant() func info
Since PHP 5.6 this can also be an array.
2018-02-18 17:42:11 +01:00
Gabriel Caruso
a2933e9ebb Fix some compile results warnings 2018-02-18 16:22:31 +01:00
Nikita Popov
c404b27135 Fix pg_pconnect() func info 2018-02-18 16:22:17 +01:00
Nikita Popov
1b54a62fcf Fix gettext func infos 2018-02-18 16:22:16 +01:00
Nikita Popov
705dc3f049 Fix DCE test
Without the type hint the previous optimization no longer applied,
as the result could be an (overloaded) object, which might have
caused dtor effect reordering.
2018-02-18 15:37:10 +01:00
Nikita Popov
a5fa7555dd More mysqli func info fixes
Mainly changing resource returns to objects
2018-02-18 15:34:16 +01:00
Nikita Popov
85597e2932 Merge branch 'PHP-7.2' 2018-02-18 15:34:04 +01:00
Nikita Popov
ae837db8cf Handle overloaded GMP operators in type inference 2018-02-18 15:33:30 +01:00
Nikita Popov
39974dd65d Disable negative range inference
The negative range inference implementation does not work correctly,
and it's not clear right now how it can be fixed. As such, disable
it entirely for now.
2018-02-18 15:33:28 +01:00
Xinchen Hui
22e7329d9a change layout 2018-02-18 19:47:41 +08:00
Xinchen Hui
ac5cdd46f3 Move map out of loop 2018-02-18 19:34:48 +08:00
Gabriel Caruso
4f43d312ad
Remove redelcaration of zend_parse_parameters_none 2018-02-18 09:38:47 +01:00
Gabriel Caruso
079598a85d
Use zend_parse_parameters_none_throw 2018-02-18 09:36:35 +01:00
Nikita Popov
b889ff309b Fix lcfirst() + ucfirst() func info
These may return the original string
2018-02-17 23:22:44 +01:00
Nikita Popov
ea1a51f71b Fix bcpowmod() func_info
Returns false on error
2018-02-17 23:22:44 +01:00
Nikita Popov
9c4783cbd3 Fix error_get_last() func info 2018-02-17 23:22:44 +01:00
Nikita Popov
d59c45d112 Fix mysqli_connect() func info
This function returns an object, not a resource...
2018-02-17 23:22:44 +01:00
Nikita Popov
50def51d19 Fix bcscale() function info
Master only: This function now returns the old scale.
2018-02-17 23:22:43 +01:00
Nikita Popov
2cd40b3aed Merge branch 'PHP-7.2' 2018-02-17 23:21:31 +01:00
Nikita Popov
846e8a3ec9 Fix COUNT range inference
count() on objects may return a negative number :(
2018-02-17 23:18:30 +01:00
Nikita Popov
fa7c23ba27 Fix hash_init() and hash_copy() func info
These functions were switched to use objects instead of resources.
2018-02-17 23:18:29 +01:00
Nikita Popov
acb9426a6b Fix curl_multi_close() func info
Returns false on failure
2018-02-17 23:18:29 +01:00
Nikita Popov
8bdf9905da Fix get_object_vars() func info
Numeric keys will be converted to integer nowadays.
2018-02-17 23:18:29 +01:00
Nikita Popov
1a50a50bcf Add RC flags in init_func_return_info 2018-02-17 23:18:29 +01:00
Nikita Popov
fd5644cd0b Fix array_values() and array_keys() func info
Can return RCN for empty/packed arrays
2018-02-17 23:18:28 +01:00
Xinchen Hui
c79f2de2cf Optimized strrev with SSSE3
since strrev is not wildly used, and SSSE3 is defined default by some
compiler, so won't try to do ifunc here.
2018-02-17 23:19:31 +08:00
Xinchen Hui
ab9162426b change argument parsing 2018-02-17 22:29:59 +08:00
Nikita Popov
38bee72e40 Fix DCE of throwing NEWs 2018-02-17 14:51:11 +01:00
Nikita Popov
ef10dfc31d Fix another bug in coalesce elimination 2018-02-17 14:51:11 +01:00
Anatol Belski
b2cd274122 Remove unnecessary cast 2018-02-17 14:19:06 +01:00
Anatol Belski
f4705b77ff Merge branch 'PHP-7.2'
* PHP-7.2:
  Remove duplicated assignment
2018-02-17 13:13:17 +01:00
Anatol Belski
0255c21319 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove duplicated assignment
2018-02-17 13:12:29 +01:00
Anatol Belski
a468752e53 Remove duplicated assignment 2018-02-17 13:10:59 +01:00
Anatol Belski
b2d38ed9ca Reduce variable scope 2018-02-17 13:02:50 +01:00
Anatol Belski
f44f9d6206 Remove always true condition 2018-02-17 13:02:50 +01:00
Anatol Belski
0bc4cf901c Fix unsigned comparisons 2018-02-17 13:02:50 +01:00
Anatol Belski
e72e537d1b Reduce var scope 2018-02-17 13:02:49 +01:00
Anatol Belski
28132878f2 Reduce var scope 2018-02-17 13:02:49 +01:00
Nikita Popov
257f07ef6d Fix COALESCE jump optimization 2018-02-17 12:42:21 +01:00
Xinchen Hui
55ef99e3b8 Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #75961 (Strange references behavior)

Conflicts:
	ext/standard/array.c
2018-02-17 16:39:31 +08:00
Xinchen Hui
26dda8999c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75961 (Strange references behavior)
2018-02-17 16:33:39 +08:00
Xinchen Hui
94e9d0a2ae Fixed bug #75961 (Strange references behavior) 2018-02-17 16:33:15 +08:00