Compare commits

..
Author SHA1 Message Date
David Soria Parra 54ffe6a3b7 PHP 5.5.0 RC2 2013-05-23 00:45:27 +02:00
David Soria Parra aa5f19cffb News for RC2 2013-05-23 00:44:08 +02:00
Johannes Schlüter 4fe74f14c4 Merge branch 'PHP-5.4' into PHP-5.5 2013-05-22 17:19:58 +02:00
Johannes Schlüter cd74b7d57e Merge branch 'PHP-5.3' into PHP-5.4 2013-05-22 17:15:27 +02:00
Johannes Schlüter 4cb25d25f1 This will be PHP 5.3.27 2013-05-22 17:13:17 +02:00
Stanislav Malyshev c53058763a 5.4.17 is next 2013-05-21 23:36:28 -07:00
Remi Collet c50cef1dc5 Fixed bug #64895 Integer overflow in SndToJewish 2013-05-22 08:30:50 +02:00
Remi Collet 93469a1d15 NEWS 2013-05-22 08:29:43 +02:00
Remi Collet d64e8dd7a4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed bug #64895 Integer overflow in SndToJewish
2013-05-22 08:29:30 +02:00
Remi Collet 73eedaf6f7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #64895 Integer overflow in SndToJewish
2013-05-22 08:29:08 +02:00
Remi Collet 013797588a NEWS 2013-05-22 08:28:53 +02:00
Remi Collet fc2a9d6e47 Fixed bug #64895 Integer overflow in SndToJewish 2013-05-22 08:28:05 +02:00
Stanislav Malyshev f5fcb591cc Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  merge NEWS from 5.3
  fix order
2013-05-21 23:26:23 -07:00
Stanislav Malyshev 0776337e28 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix order
2013-05-21 23:26:03 -07:00
Stanislav Malyshev de4fd8638b merge NEWS from 5.3 2013-05-21 23:25:46 -07:00
Stanislav Malyshev d4ad889824 fix order 2013-05-21 23:25:35 -07:00
Sara Golemon 4f46a40b9d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Don't double-quote name of namespaced function.
2013-05-19 13:35:03 -07:00
Remi Collet 4840ff0f05 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Integer overflow in SndToJewish leads to php hang AT least in (inputDay is long, metonicCycle is int):    metonicCycle = (inputDay + 310) / 6940;
2013-05-21 18:09:02 +02:00
Remi Collet 646ebc2cb9 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Integer overflow in SndToJewish leads to php hang AT least in (inputDay is long, metonicCycle is int):    metonicCycle = (inputDay + 310) / 6940;
2013-05-21 18:08:45 +02:00
Remi Collet 4828f7343b Integer overflow in SndToJewish leads to php hang
AT least in (inputDay is long, metonicCycle is int):
   metonicCycle = (inputDay + 310) / 6940;

So large value give strange (negative) results or php hangs.
This is patch already applied in some linux distro.
2013-05-21 18:04:17 +02:00
Andrey Hristov 378a5f9bfe updates 2013-05-21 13:27:45 +02:00
Remi Collet ed9a9b6144 UPGRADING 2013-05-21 12:32:11 +02:00
Remi Collet 70abac2b4e NEWS 2013-05-21 09:54:39 +02:00
Remi Collet c79f162c37 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Add --with-fpm-systemd option to report health to systemd, and systemd_interval option to configure this. The service can now use Type=notify in the systemd unit file.
2013-05-21 09:53:51 +02:00
Remi Collet 0e99329e0a Add --with-fpm-systemd option to report health to systemd, and
systemd_interval option to configure this. The service can now use
Type=notify in the systemd unit file.

Systemd status line will looks like:
Status: "Processes active: 0, idle: 5, Requests: 90, slow: 0, Traffic: 10req/sec"

Watchdog mode is also supported. In this case watchdog interval,
configured in the unit file, override the systemd_interval option.

When not used (default), no change from previous version.
2013-05-21 09:49:00 +02:00
Dmitry Stogov a2d6d27458 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64720 (SegFault on zend_deactivate)

Conflicts:
	NEWS
2013-05-21 10:15:37 +04:00
Dmitry Stogov 77fffff157 Fixed bug #64720 (SegFault on zend_deactivate) 2013-05-21 09:58:11 +04:00
Stanislav Malyshev 49c1a223d5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add reporter
2013-05-20 02:02:34 -07:00
Stanislav Malyshev 1124b0678f add reporter 2013-05-20 02:01:38 -07:00
Stanislav Malyshev ac0aa5737e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #64660 - yyparse can return 2, not only 1

Conflicts:
	Zend/zend_language_scanner.c
2013-05-20 00:57:34 -07:00
Stanislav Malyshev fb58e69a84 fix bug #64660 - yyparse can return 2, not only 1 2013-05-20 00:52:38 -07:00
Stanislav Malyshev 0f02c3aa29 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix 5.4.16 relase date
2013-05-19 23:55:38 -07:00
Stanislav Malyshev 7c66c502d0 fix 5.4.16 relase date 2013-05-19 23:55:12 -07:00
Sara Golemon 2d7415a4af Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Don't double-quote name of namespaced function.
2013-05-19 13:34:57 -07:00
Sara Golemon 2d5695cbc5 Don't double-quote name of namespaced function.
ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info)

was resulting in a function declaration of:

ns\"zend_name"()

including the errant quotes.

This diff corrects that.  There are currently no uses of ZEND_NS_NAMED_FE
in core and reason to believe that there are no uses in the wild either.
2013-05-19 13:32:17 -07:00
Pierre Joye 40d5458eff Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  entry for #64214
  other fix for #64214, unmodified file may not have old fp set, causing other possible crashes
2013-05-17 11:50:52 +02:00
Pierre Joye b142e8825f Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-05-17 11:49:45 +02:00
Pierre Joye aff65a0346 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  entry for #64214
  other fix for #64214, unmodified file may not have old fp set, causing other possible crashes
2013-05-17 11:49:33 +02:00
Pierre Joye 46b05bc57a entry for #64214 2013-05-17 11:49:13 +02:00
Pierre Joye 3eb1745643 other fix for #64214, unmodified file may not have old fp set, causing other possible crashes 2013-05-17 11:45:13 +02:00
Anatol Belski d565e8f0eb Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed error handling for ext/sockets under win
2013-05-16 19:29:25 +02:00
Anatol Belski 8dec06ea2a Fixed error handling for ext/sockets under win
WSAGetLastError() must be the very next call after a socket
function had an invalid return. Any function call inbetween
will clear the error information.
2013-05-16 19:23:31 +02:00
Anatol Belski 07bd1fac57 updated NEWS 2013-05-16 08:44:36 +02:00
Anatol Belski fda25c7ea6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64853Use of no longer available ini directives causes crash on TS build
2013-05-16 08:43:07 +02:00
Anatol Belski d82704b677 Fixed bug #64853Use of no longer available ini directives causes crash on TS build
The fatal error for removed ini options is thrown before the executor
init, so ensure the relevant variables are initialized.
2013-05-16 08:40:56 +02:00
Pierre Joye 9accfee55f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
2013-05-15 15:54:52 +02:00
Pierre Joye bfb50d17cb Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-05-15 15:54:46 +02:00
Pierre Joye 09470ebf35 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-05-15 15:53:57 +02:00
David Soria Parra 139e9824ad Fix array_colum segfault
Separate zval to avoid gc from freeing
2013-05-15 14:42:39 +02:00
Anatol Belski 082ee90b9b fixe preprocessor definition 2013-05-15 14:24:21 +02:00
Anatol Belski 077b575d51 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix unitialized vars when sql.safe_mode=1
  more check for php_stream_fopen_tmpfile failure
2013-05-15 11:17:18 +02:00
Anatol Belski de82e7edf7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix unitialized vars when sql.safe_mode=1
  more check for php_stream_fopen_tmpfile failure
2013-05-15 11:14:58 +02:00
Anatol Belski 86db5fb4c2 Fix unitialized vars when sql.safe_mode=1
which can break the subsequent mysqlnd_connect() call
2013-05-15 11:12:17 +02:00
Pierre Joye 42a186e22d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  more check for php_stream_fopen_tmpfile failure
2013-05-14 16:46:32 +02:00
Pierre Joye 7ec2e5314e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  more check for php_stream_fopen_tmpfile failure
2013-05-14 16:45:56 +02:00
Pierre Joye ba1af29805 more check for php_stream_fopen_tmpfile failure 2013-05-14 16:45:11 +02:00
Andrey Hristov 1f97fde89e Merge branch 'PHP-5.5' of ssh://git.php.net/php-src into PHP-5.5 2013-05-14 13:01:18 +02:00
Andrey Hristov 9d2dda9058 Fix for Bug #64394 MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS undeclared when using Connector/C 2013-05-14 11:26:35 +02:00
Anatol Belski 75ee1a6113 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated libmagic.patch after fix for #64830
2013-05-14 11:16:01 +02:00
Anatol Belski 1a46a102d9 updated libmagic.patch after fix for #64830 2013-05-14 11:14:37 +02:00
Anatol Belski 8c36156070 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-05-14 09:45:02 +02:00
Anatol Belski ad210f2c10 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-05-14 09:44:48 +02:00
Anatol Belski 2626819d65 updated NEWS 2013-05-14 09:42:34 +02:00
Anatol Belski 933e01bbac Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64830 mimetype detection segfaults on mp3 file
2013-05-14 09:41:38 +02:00
Anatol Belski 74555e7c26 Fixed bug #64830 mimetype detection segfaults on mp3 file 2013-05-14 09:40:43 +02:00
Pierre Joye 362402d748 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  php_stream_fopen_tmpfile may file, causing any following stream usage to crash
2013-05-14 09:21:30 +02:00
Pierre Joye f37c54ab27 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  php_stream_fopen_tmpfile may file, causing any following stream usage to crash
2013-05-14 09:21:17 +02:00
Pierre Joye 533e636a62 php_stream_fopen_tmpfile may file, causing any following stream usage to crash 2013-05-14 09:20:53 +02:00
Anatol Belski e191cb63ba Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix heap overflow warnings on win x64 debug crt
2013-05-13 14:26:50 +02:00
Anatol Belski 156576fcce Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix heap overflow warnings on win x64 debug crt
2013-05-13 14:25:25 +02:00
Anatol Belski fe21accfb4 fix heap overflow warnings on win x64 debug crt 2013-05-13 14:24:21 +02:00
Anatol Belski e44849b0f4 Fixed bug #64825 Invalid free unserializing DateTimeZone 2013-05-12 21:29:16 +02:00
Anatol Belski 3fd39c13f9 updated NEWS 2013-05-12 14:09:59 +02:00
Anatol Belski 2d8ce75f39 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  Fixed bug #64821 Custom Exceptions crash when internal properties overridden
2013-05-12 14:09:16 +02:00
Anatol Belski 89159926ad updated NEWS 2013-05-12 14:08:42 +02:00
Anatol Belski dd188e9538 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #64821 Custom Exceptions crash when internal properties overridden
2013-05-12 14:06:59 +02:00
Anatol Belski d6505acbf5 Fixed bug #64821 Custom Exceptions crash when internal properties overridden
If user inherits Exception and overrides the properties to arbitrary data types,
or simply doesn't run parent::__construct(), here we go. Just convert everything
to the appropriate data type, like Exception::__toString() does.
2013-05-12 14:00:32 +02:00
Anatol Belski 95ea1e7ca7 fixed variable corruption under win x64 2013-05-11 02:47:48 +02:00
Xinchen Hui b3f6cc20e0 Merge branch 'PHP-5.4' into PHP-5.5 2013-05-09 15:57:44 +08:00
Xinchen Hui 699dc04c55 Missed SKIPIF 2013-05-09 15:57:25 +08:00
Gustavo Lopes 98302ee3cc Fix NEWS (wrong bug # AND wrong section...)
It's bug #64508, not #64506.
2013-05-08 20:03:43 +02:00
Gustavo Lopes 8687332e08 Fix bug #64506: fix build with --disable-ipv6 2013-05-08 19:58:27 +02:00
Anatol Belski 7b09e5fe35 Fixed news, rc1 is already branched 2013-05-08 19:24:51 +02:00
Anatol Belski 4091e94660 Fixed bug #64769 mbstring PHPTs crash on Windows x64
The tricky business going there in oniguruma is saving a pointer
in an int variable, passing that variable into a function and making
it a pointer again. On 64bit windows casting a pointer to a 32 bit
int will truncate that pointer. This kind of things won't work on
Windows x64.

[SNIPPET]
unsigned long ul0[2], ul1, *ul2;

ul0[0] = 42uL;
ul0[0] = 24uL;

ul1 = (unsigned long)ul0;
ul2 = (unsigned long *)ul1;

/* now it's broken, accessing ul2[0] will crash. */
[/SNIPPET]

To make it portable, ULONG_PTR should be used in this case.

In oniguruma this behaviour is to see at least in the following
codepath:

ext/mbstring/oniguruma/enc/unicode.c:10938
ext/mbstring/oniguruma/st.c:308
ext/mbstring/oniguruma/enc/unicode.c:10859
2013-05-08 19:22:37 +02:00
David Soria Parra 288f04c430 News for RC2 2013-05-08 18:57:06 +02:00
David Soria Parra e30dbcce77 NEWS for RC1 2013-05-08 18:44:05 +02:00
Johannes Schlüter 9ef017af00 Merge branch 'PHP-5.4' into PHP-5.5 2013-05-08 18:03:12 +02:00
Johannes Schlüter 898ddcb9e1 Merge branch 'PHP-5.3' into PHP-5.4 2013-05-08 18:02:35 +02:00
Johannes Schlüter 1cc2162b83 PHP 5.3.25 NEWS 2013-05-08 18:01:39 +02:00
Remi Collet 36eee5b994 Fixed bug #64785 : restore 5.4 behaviour, libpng is mandatory 2013-05-08 07:37:40 +02:00
Ard Biesheuvel 5b121eb04d Fix #64780 (PHP 5.5 builds are broken with GCC 3)
A recent change (by me) introduced a call to __builtin_offsetof()
into zend_operators.h which is not defined by GCC prior to
version 4.

Changed the code to use offsetof() instead: this is defined in
<stddef.h>, so #include this header conditionally (#ifdef GNUC)
2013-05-07 20:37:04 +02:00
Remi Collet de7415ea55 gd: fix 2 failed tests (bundled lib) due to arithmetic precision (allow minor diff). 2013-05-06 10:25:36 +02:00
Remi Collet 96a575123d gd: fix previous (bad include) 2013-05-06 10:07:06 +02:00
Remi Collet 9480de29db Revert removal of overflow2 use in gd.c
Function provided by gd_security with bundled libgd
Function provided by gd_compat with system libgd

This fix failed test imageloadfont_invalid.phpt
This test now also pass with system libgd
2013-05-06 10:00:45 +02:00
Remi Collet 4cea61a0fa gd: fix include... 2013-05-05 10:39:33 +02:00
Remi Collet 0cae9a15d7 Move (back) missing functions in system libgd to gd_compat
- display libPng version in all cases
- gd_compat.c in ext/gd (nothing in ext/gd/libgd)
2013-05-05 09:54:27 +02:00
Remi Collet 9a48b6506c gd: don't include png.h (breaks build on some old version), so report libPNG version only with external libgd 2013-05-05 08:35:29 +02:00
Remi Collet 54d6f8b34e gd: missing comma 2013-05-05 06:52:28 +02:00
Remi Collet 2ab270011d gd: fix typo and cleanups 2013-05-04 20:36:32 +02:00
Remi Collet d981c191d4 NEWS 2013-05-04 16:54:22 +02:00
Remi Collet 00b097d2a3 fix build with bundled libgd 2013-05-04 16:51:56 +02:00
Ondřej Surý 2a2ac5f2be Move png and jpeg version functions to gd.c so the external library build doesn't include anything from libgd/. 2013-05-04 16:50:13 +02:00
Ondřej Surý e6704501f8 Remove extra unused functions from gd_compat.h 2013-05-04 16:50:11 +02:00
Ondřej Surý 5e9c6c3b64 Rewrite Xpm library check so it doesn't break on MultiArch systems 2013-05-04 16:50:08 +02:00
Ondřej Surý 8a90aad35b Required GD >= 2.1.0 or GD bundled, this allows us to remove most of the #ifdef 2013-05-04 16:50:06 +02:00
Ondřej Surý 2fc17d83cb * Remove overflow2, getmbi and skipheaders from gd_compat.h * Add missing return in _php_ctx_getmbi * Reintroduce imagecreatefromxbm by checking for gdCreateImageFromXbm 2013-05-04 16:50:03 +02:00
Ondřej Surý 8a07908215 Remove overflow2, getmbi and skipheader, since they are not needed anymore. 2013-05-04 16:49:59 +02:00
Ondřej Surý 6aedadce0a Allow to use new GD-2.1.0 function from system library 2013-05-04 16:49:35 +02:00
Xinchen Hui 9155d17fef Fix #64749 (warning: cast from pointer to integer of different size) 2013-05-04 20:43:42 +08:00
Anatol Belski b2ef8672c7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  better fix for bug #64770
  better fix for bug #64770
2013-05-04 12:20:19 +02:00
Anatol Belski ec4388158d better fix for bug #64770 2013-05-04 12:19:52 +02:00
Anatol Belski f1e5127e7a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  better fix for bug #64770
2013-05-04 12:18:06 +02:00
Anatol Belski 5c701d19ac better fix for bug #64770 2013-05-04 12:16:38 +02:00
Boris Lytochkin 67d83de11c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  remove OS-specific OIDs from 'WALK multiple on single OID with OID suffix as keys' test part
2013-05-04 00:06:06 +04:00
Boris Lytochkin 8c3b8f39aa remove OS-specific OIDs from
'WALK multiple on single OID with OID suffix as keys' test part
2013-05-04 00:04:52 +04:00
Boris Lytochkin eff60f993c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  re-work walkaround for net-snmp BUGid 2027834, no need to detect it anymore add test for Bug #64159 bump default buffer size for values(32->512): do not reallocate buffers in 99% cases
2013-05-03 23:10:11 +04:00
Boris Lytochkin c34274acb8 re-work walkaround for net-snmp BUGid 2027834, no need to detect it anymore
add test for Bug #64159
bump default buffer size for values(32->512): do not reallocate buffers in 99% cases
2013-05-03 23:06:34 +04:00
Boris Lytochkin 3a413f216a Merge branch 'PHP-5.4' of https://git.php.net/push/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/push/php-src:
  updated NEWS
  Fixed bug #64770 stream_select() fails with pipes
2013-05-03 19:24:24 +04:00
Boris Lytochkin f1269d80c5 Merge branch 'PHP-5.3' of https://git.php.net/push/php-src into PHP-5.3
* 'PHP-5.3' of https://git.php.net/push/php-src:
  Fixed bug #64770 stream_select() fails with pipes
2013-05-03 19:23:46 +04:00
Boris Lytochkin 1c8befe893 cut PHP_VERSION_ID - we know API version now 2013-05-03 19:22:21 +04:00
Boris Lytochkin 74ef9b6cea Merge branch 'PHP-5.5' of https://git.php.net/push/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/push/php-src:
  updated NEWS
  updated NEWS
  Fixed bug #64770 stream_select() fails with pipes
2013-05-03 19:10:22 +04:00
Anatol Belski f7830e4f98 updated NEWS 2013-05-03 17:05:54 +02:00
Anatol Belski 6d41711fd9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  Fixed bug #64770 stream_select() fails with pipes
2013-05-03 17:04:53 +02:00
Anatol Belski b1c24d1eac updated NEWS 2013-05-03 17:04:26 +02:00
Anatol Belski aa4762572e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #64770 stream_select() fails with pipes
2013-05-03 17:03:16 +02:00
Anatol Belski b1ea0b7a7a Fixed bug #64770 stream_select() fails with pipes
returned by proc_open() on Windows x64
2013-05-03 17:01:33 +02:00
Boris Lytochkin 2c336c9cde Fixed bug #64159 (Truncated snmpget) 2013-05-03 15:46:43 +04:00
Boris Lytochkin c68f9d5503 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64159 (Truncated snmpget)
2013-05-03 15:39:57 +04:00
Boris Lytochkin e36adfe94a Fixed bug #64159 (Truncated snmpget) 2013-05-03 15:35:09 +04:00
Boris Lytochkin cbe2870b72 update NEWS 2013-05-03 12:25:49 +04:00
Boris Lytochkin 1ce836580d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  update NEWS
  Fix bug #64765 (enclose IPv6 address into square brackets)
2013-05-03 12:19:10 +04:00
Boris Lytochkin a39282b64d update NEWS 2013-05-03 12:15:35 +04:00
Boris Lytochkin 3828f6227b Fix bug #64765 (enclose IPv6 address into square brackets) 2013-05-03 12:13:50 +04:00
Boris Lytochkin 5f67584fd7 Merge branch 'PHP-5.5' of https://git.php.net/push/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/push/php-src: (310 commits)
  NEWS
  NEWS
  NEWS
  From code coverity scan, syscall return value must be check.
  fix more resource leaks
  From code coverity scan - fix some memory leak - fix some resources leak (fd) - create fpm_worker_pool_free (shared use) - possible null dref (wp->user and wp->home can be null)
  fixed size array cannot be null
  use limit_extensions as we use security_limit_extensions later (free)
  unused variable
  fix possible null deref (detected by code coverity scan)
  updated lib versions
  Remove trailing space in NEWS
  NEWS for 514afd67
  Fix bug #64729: compilation failure on x32
  don't include smart_str.h in a too global header, fixes #64718
  NEWS
  When Apache use RewriteRule to redirect, via mod_proxy_fgi, to php-fpm the SCRIPT_FILENAME may contains the QUERY_STRING.
  Added SoapClient constructor option 'ssl_method' to specify ssl method
  fix #64738, fix implicit type declaration
  Avoid possible conditional jump depended on uninitialised value
  ...
2013-05-03 11:22:42 +04:00
Boris Lytochkin 5af2c5d202 Merge branch 'PHP-5.4' of https://git.php.net/push/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/push/php-src: (109 commits)
  NEWS
  NEWS
  From code coverity scan, syscall return value must be check.
  fix more resource leaks
  From code coverity scan - fix some memory leak - fix some resources leak (fd) - create fpm_worker_pool_free (shared use) - possible null dref (wp->user and wp->home can be null)
  fixed size array cannot be null
  use limit_extensions as we use security_limit_extensions later (free)
  unused variable
  fix possible null deref (detected by code coverity scan)
  Remove trailing space in NEWS
  NEWS for 514afd67
  Fix bug #64729: compilation failure on x32
  When Apache use RewriteRule to redirect, via mod_proxy_fgi, to php-fpm the SCRIPT_FILENAME may contains the QUERY_STRING.
  Revert "Add CURL_WRAPPERS_ENABLE constant"
  Also fixed bug #64726 in 5.3
  Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB pointer has closed)
  Fix memory realted to #64726
  updated libmagic.patch
  Fixed bug bug #64713 Compilation warnings in finfo
  Fix Test Bug #64714
  ...
2013-05-03 11:22:16 +04:00
Boris Lytochkin aa448adc83 Merge branch 'PHP-5.3' of https://git.php.net/push/php-src into PHP-5.3
* 'PHP-5.3' of https://git.php.net/push/php-src: (39 commits)
  NEWS
  From code coverity scan, syscall return value must be check.
  fix more resource leaks
  From code coverity scan - fix some memory leak - fix some resources leak (fd) - create fpm_worker_pool_free (shared use) - possible null dref (wp->user and wp->home can be null)
  fixed size array cannot be null
  use limit_extensions as we use security_limit_extensions later (free)
  unused variable
  fix possible null deref (detected by code coverity scan)
  Also fixed bug #64726 in 5.3
  Fix memory realted to #64726
  Fix Test Bug #64714
  PHP 5.3.26 this will be
  Fix NEWS
  Fix bug #64458 (dns_get_record result with string of length -1)
  Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.
  Fixed stream_socket_pair() on Windows x64 and
  - Updated to version 2013.3 (2013c)
  lower the limit, should fit in a byte
  updated lib versions
  allow lcov 1.10
  ...
2013-05-03 11:21:48 +04:00
Remi Collet 432b09f238 NEWS 2013-05-03 08:31:22 +02:00
Remi Collet 3011208f1a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  NEWS
2013-05-03 08:30:58 +02:00
Remi Collet 9996c310d1 NEWS 2013-05-03 08:30:47 +02:00
Remi Collet f087c53130 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  NEWS
2013-05-03 08:30:19 +02:00
Remi Collet 4a34d4a83c NEWS 2013-05-03 08:29:56 +02:00
Remi Collet c9085837a9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  From code coverity scan, syscall return value must be check.
2013-05-03 08:23:07 +02:00
Remi Collet 3fd4b6be63 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  From code coverity scan, syscall return value must be check.
2013-05-03 08:22:55 +02:00
Remi Collet 0549e55d82 From code coverity scan, syscall return value must be check.
To not alter current behaviour, we simply log the problem,
so, if it occurs, the message will give explanation.

This are only warning as they don't block the server,
but such fail can explain strange (not expected) behaviour later.
2013-05-03 08:19:14 +02:00
Remi Collet 6494faa844 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix more resource leaks
2013-05-02 13:47:48 +02:00
Remi Collet b7b150b830 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix more resource leaks
2013-05-02 13:47:36 +02:00
Remi Collet 444e59eb20 fix more resource leaks 2013-05-02 13:47:24 +02:00
Remi Collet a3e177b9fd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  From code coverity scan - fix some memory leak - fix some resources leak (fd) - create fpm_worker_pool_free (shared use) - possible null dref (wp->user and wp->home can be null)
2013-05-02 13:31:22 +02:00
Remi Collet 08b72ac9f1 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  From code coverity scan - fix some memory leak - fix some resources leak (fd) - create fpm_worker_pool_free (shared use) - possible null dref (wp->user and wp->home can be null)
2013-05-02 13:31:11 +02:00
Remi Collet 331540d20c From code coverity scan
- fix some memory leak
- fix some resources leak (fd)
- create fpm_worker_pool_free (shared use)
- possible null dref (wp->user and wp->home can be null)
2013-05-02 13:27:16 +02:00
Remi Collet eb53035a80 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed size array cannot be null
2013-05-02 10:33:05 +02:00
Remi Collet c374b80dda Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fixed size array cannot be null
2013-05-02 10:32:54 +02:00
Remi Collet d0c40220d1 fixed size array cannot be null 2013-05-02 10:32:45 +02:00
Remi Collet 2f12769db0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  use limit_extensions as we use security_limit_extensions later (free)
  unused variable
2013-05-02 10:15:49 +02:00
Remi Collet 78c48af2f2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  use limit_extensions as we use security_limit_extensions later (free)
  unused variable
2013-05-02 10:15:20 +02:00
Remi Collet 8492bbefbb use limit_extensions as we use security_limit_extensions later (free) 2013-05-02 10:15:12 +02:00
Remi Collet a7d6cb2360 unused variable 2013-05-02 10:15:05 +02:00
Remi Collet d42ae32738 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix possible null deref (detected by code coverity scan)
  Remove trailing space in NEWS
  NEWS for 514afd67
2013-05-02 09:38:38 +02:00
Remi Collet be3f7ba4fb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix possible null deref (detected by code coverity scan)
2013-05-02 09:38:12 +02:00
Remi Collet ab117573cd fix possible null deref (detected by code coverity scan) 2013-05-02 09:38:00 +02:00
Anatol Belski e3aeb6c070 updated lib versions 2013-05-01 21:37:28 +02:00
Gustavo Lopes 3f2f534a5c Remove trailing space in NEWS 2013-04-30 19:42:31 +02:00
Gustavo Lopes 1656b337ce NEWS for 514afd67 2013-04-30 19:41:27 +02:00
Gustavo Lopes 865cc3a800 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64729: compilation failure on x32

Conflicts:
	Zend/zend_alloc.c
2013-04-30 19:36:08 +02:00
Gustavo Lopes 514afd67b6 Fix bug #64729: compilation failure on x32 2013-04-30 19:28:24 +02:00
Johannes Schlüter 062519ed41 don't include smart_str.h in a too global header, fixes #64718 2013-04-30 14:26:55 +02:00
Remi Collet 36b968ae96 NEWS 2013-04-30 09:03:18 +02:00
Remi Collet fbff4ccf27 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  When Apache use RewriteRule to redirect, via mod_proxy_fgi, to php-fpm the SCRIPT_FILENAME may contains the QUERY_STRING.
2013-04-30 09:02:59 +02:00
Remi Collet 4a92ae3401 When Apache use RewriteRule to redirect, via mod_proxy_fgi, to php-fpm
the SCRIPT_FILENAME may contains the QUERY_STRING.

Ex : RewriteRule ^(.*)\.php$ fcgi://127.0.0.1:9000/$1.php [P]

From apache debug (build with -DFCGI_DUMP_ENV_VARS)
AH01062: sending env var 'SCRIPT_FILENAME' value 'proxy:fcgi://127.0.0.1:9000/var/www/html/info.php?foo'
AH01071: Got error 'Primary script unknown\n'
2013-04-30 08:55:18 +02:00
Dmitry Stogov 13de57c0f4 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  fix #64738, fix implicit type declaration
2013-04-30 10:27:24 +04:00
Dmitry Stogov c782cf7fb3 Added SoapClient constructor option 'ssl_method' to specify ssl method 2013-04-30 10:24:49 +04:00
Pierre Joye 83682d8833 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-30 08:01:52 +02:00
Pierre Joye 1a335d20a8 fix #64738, fix implicit type declaration 2013-04-30 07:52:40 +02:00
Dmitry Stogov 4b83f4a011 Avoid possible conditional jump depended on uninitialised value 2013-04-29 10:45:31 +04:00
Dmitry Stogov a5b4eeb5f0 Fixed compilation warnings (issue #92) 2013-04-29 10:32:08 +04:00
Stanislav Malyshev 8a51bdd3ce Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Revert "Add CURL_WRAPPERS_ENABLE constant"

Conflicts:
	ext/curl/interface.c
2013-04-28 22:28:13 -07:00
Stanislav Malyshev 4e773c1b92 Revert "Add CURL_WRAPPERS_ENABLE constant"
This reverts commit d7f709a032.
Since wrappers are deleted from 5.5, no point in adding this constant.
2013-04-28 22:26:05 -07:00
David Soria Parra 86685aefab Revert "Fix conversion from unsigned char to char"
This reverts commit bc50ba4bf9.
2013-04-29 02:27:11 +02:00
Pierre Joye 9877773438 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-27 18:00:02 +02:00
Pierre Joye 25c9f34c9c fix #64725, wrong res check 2013-04-27 17:52:30 +02:00
Xinchen Hui e60638faca Merge branch 'PHP-5.4' into PHP-5.5 2013-04-27 23:50:23 +08:00
Xinchen Hui 7b9eabaf51 Merge branch 'PHP-5.3' into PHP-5.4 2013-04-27 23:50:02 +08:00
Xinchen Hui 15b554cd9b Also fixed bug #64726 in 5.3 2013-04-27 23:49:43 +08:00
Xinchen Hui a56a95e58d Update NEWS 2013-04-27 23:42:18 +08:00
Xinchen Hui 1c07590ed7 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-27 23:41:51 +08:00
Xinchen Hui 8f5a534b21 Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB pointer has closed) 2013-04-27 23:41:31 +08:00
Xinchen Hui d54432ed98 Merge branch 'PHP-5.3' into PHP-5.4 2013-04-27 23:38:10 +08:00
Xinchen Hui c7b8368ed5 Fix memory realted to #64726 2013-04-27 23:38:00 +08:00
Anatol Belski ca148c030f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated libmagic.patch
2013-04-27 14:09:55 +02:00
Anatol Belski e9b03c412b updated libmagic.patch 2013-04-27 14:09:29 +02:00
Anatol Belski d72307f1ca Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug bug #64713 Compilation warnings in finfo
2013-04-27 13:51:12 +02:00
Anatol Belski cdc1a63790 Fixed bug bug #64713 Compilation warnings in finfo 2013-04-27 13:49:50 +02:00
David Soria Parra cf5d7d9e73 Fix implicit declaration warning for cdf_timestamp_to_timespec 2013-04-26 12:28:58 +02:00
David Soria Parra b86c85723e Fix #64711 ("value computed but not used" in parse_date.c) 2013-04-26 11:33:54 +02:00
David Soria Parra 3411fbbc51 Fix implicit uint* to int* conversion warning 2013-04-26 10:57:55 +02:00
David Soria Parra bc50ba4bf9 Fix conversion from unsigned char to char 2013-04-26 10:55:52 +02:00
David Soria Parra 75cec90d8c Fix #64712 (Obsolete declarations in php_date.c) 2013-04-26 10:45:08 +02:00
Pierre Joye 2809afa119 - #64710, check return val 2013-04-26 08:15:33 +02:00
Pierre Joye 7bd20354a8 - #64710, kill unused var 2013-04-26 08:15:05 +02:00
Pierre Joye b0afef2d5e #64710, kill unused vars 2013-04-26 08:10:24 +02:00
Pierre Joye 685a6d9aab #64710, kill unused vars 2013-04-26 08:09:19 +02:00
Pierre Joye 7b06189702 #64710, kill unused vars 2013-04-26 08:08:38 +02:00
Pierre Joye 3fffc78ed0 #64710, kill unused vars 2013-04-26 08:07:47 +02:00
Pierre Joye b5902b6c9d #64710, kill unused vars 2013-04-26 08:06:34 +02:00
Pierre Joye afe46d4d47 #64710, Implicit declaration 2013-04-26 07:48:11 +02:00
Matt Ficken 4941e3fe44 Adding sys_get_temp_dir() test specific for Windows.
sys_get_temp_dir() returns a Windows-style path (\\ instead of /) on
Windows. This is why a Windows specific test is required.

Skipping req60524.phpt on Windows. Adding -win32 fork for use only on
Windows.

Fixes test bug #64396.
2013-04-25 14:52:48 -07:00
Anatol Belski 30802dbc55 Fixed float precision change under Windows x64
otherwise we'll have asserts in debug builds and void runs of the
error handlers in non debug builds.
2013-04-25 22:44:29 +02:00
Matt Ficken 7d0dd957eb Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix Test Bug #64714
2013-04-25 11:37:25 -07:00
Matt Ficken 5adf1be45d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix Test Bug #64714
2013-04-25 11:37:09 -07:00
Matt Ficken bf5506f511 Fix Test Bug #64714 2013-04-25 11:34:57 -07:00
Johannes Schlüter 6251706ea6 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-25 18:05:40 +02:00
Johannes Schlüter 239ba8d58b Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	configure.in
	main/php_version.h
2013-04-25 18:05:19 +02:00
Johannes Schlüter 63434524f8 PHP 5.3.26 this will be 2013-04-25 18:02:53 +02:00
Johannes Schlüter 671ef9fda7 Fix NEWS 2013-04-25 17:58:02 +02:00
David Soria Parra 4a52fe4755 NEWS for RC1 2013-04-25 08:05:56 +02:00
David Soria Parra 51e3fabf10 NEWS for PHP 5.5.0 Beta 4 again 2013-04-25 08:05:16 +02:00
David Soria Parra e04baf692a Fix curl build on windows 2013-04-25 08:04:30 +02:00
Remi Collet 182fef46a9 Fixed bug #64707 missing declaration after dd0399f 2013-04-25 06:40:55 +02:00
Pierrick Charron f42a257711 Update NEWS file 2013-04-24 13:26:34 -04:00
Stanislav Malyshev cf9db2154e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.16-dev

Conflicts:
	configure.in
	main/php_version.h
2013-04-24 10:16:56 -07:00
Stanislav Malyshev a58a279d7b 5.4.16-dev 2013-04-24 10:15:35 -07:00
Remi Collet 26bd2cba81 gd: missing headers in previous 2013-04-24 16:15:42 +02:00
Remi Collet 3a8ceed844 allow use of gdImageCreateFromJpegEx with system libgd 2013-04-24 16:15:11 +02:00
Remi Collet dd0399f5c6 We need both gdImageCreateFromJpeg* and gdImageCreateFromJpeg*Ex
The new (Ex) functions are used with the new ignore_warning parameter

The standard functions are used in _php_image_create_from_string,
sent as a function pointer, and call without this optional parameter.
2013-04-24 16:07:50 +02:00
Remi Collet 7189cc5be8 gd: fix proto comment 2013-04-24 14:44:20 +02:00
Anatol Belski eb4065b9e1 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-24 14:36:57 +02:00
Remi Collet aa4b0af20f gd: provide imageflip with system libgd when available 2013-04-24 14:32:03 +02:00
Anatol Belski 8d41f6dab6 Removed fork of ext/zlib/tests/bug_52944.phpt
The real issue is a bug in asm zlib build, reported here
https://github.com/madler/zlib/issues/41 . Non ASM builds
behave more predictable.
2013-04-24 14:31:59 +02:00
David Soria Parra ee65e6953f NEWS for RC 1 2013-04-24 12:39:44 +02:00
David Soria Parra 78c79a2d5b NEWS for beta 4 2013-04-24 12:37:07 +02:00
Stanislav Malyshev 920c7ac16e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  update credits
2013-04-23 22:03:42 -07:00
Stanislav Malyshev 84e5c8a0e2 update credits 2013-04-23 22:02:57 -07:00
Stanislav Malyshev 1363626f11 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
2013-04-23 21:46:03 -07:00
Stanislav Malyshev 5e24a6e74d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #64458 (dns_get_record result with string of length -1)
2013-04-23 21:45:49 -07:00
Stanislav Malyshev 2a15aed399 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64458 (dns_get_record result with string of length -1)
2013-04-23 21:45:10 -07:00
Stanislav Malyshev f87d2ab893 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #64458 (dns_get_record result with string of length -1)
2013-04-23 21:43:55 -07:00
Stanislav Malyshev 18fdab5a09 Fix bug #64458 (dns_get_record result with string of length -1) 2013-04-23 21:43:35 -07:00
Pierrick Charron b79e65f268 Remove curl wrappers 2013-04-23 17:01:17 -04:00
Dmitry Stogov 758b666c0a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-04-23 23:59:00 +04:00
Dmitry Stogov 43ab915b41 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-04-23 23:55:47 +04:00
Dmitry Stogov 4cf0647399 Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function. 2013-04-23 23:43:23 +04:00
Remi Collet 2005a15caa fix copy/paste in error message 2013-04-23 13:53:00 +02:00
Remi Collet 9819d81ddf enable WebP with system libgd when available 2013-04-23 13:46:10 +02:00
Remi Collet eb50789910 (re)allow WBMP detection with system libgd
provide getbmi and skipheader not exported functions in gd_compat.
2013-04-23 13:43:57 +02:00
Sara Golemon 734e165d4e array_column() - Use entire subject array when NULL passed for second param.
This starts to look like array_values(), except that you can reindex the arrays
using the third parameter.
2013-04-22 16:19:21 -07:00
Sara Golemon 1a03bd5dee Allow array_column() to take -1 as a valid value in third param
Also do some cleanup and simplification to make this code more
readable in the long term.
2013-04-22 15:54:21 -07:00
Sara Golemon f63db963c4 Harden array_column_basic.phpt against resource renumbering.
We don't care what resource number it is, so long as there's a
stream resource returned.
2013-04-22 13:36:40 -07:00
Anatol Belski b3aa3c2616 updated NEWS 2013-04-22 18:59:47 +02:00
Anatol Belski 8febe2ad08 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed stream_socket_pair() on Windows x64 and
2013-04-22 18:59:11 +02:00
Anatol Belski f082d6311b Fixed stream_socket_pair() on Windows x64 and
improved errorhandling in the socketpair() implementation.
2013-04-22 18:55:32 +02:00
Derick Rethans 0b2c411323 Merge branch 'PHP-5.3' into PHP-5.4 2013-04-22 17:51:43 +01:00
Derick Rethans 70b67f2e50 - Updated to version 2013.3 (2013c) 2013-04-22 17:51:41 +01:00
Sara Golemon 7b34324f84 Fix handling of double keys in array_column
Also fix resource test to not localize __FILE__ to cwd.
2013-04-21 22:35:04 -07:00
Anatol Belski b119836765 updated NEWS 2013-04-22 19:00:46 +02:00
Anatol Belski f578bb0388 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  Fixed stream_socket_pair() on Windows x64 and
2013-04-22 19:00:13 +02:00
Derick Rethans 0720804e7c Merge branch 'PHP-5.4' into PHP-5.5 2013-04-22 17:51:47 +01:00
Remi Collet ec1678dd7c temporary disable WBM detection with system libgd, as gdGetC, getmbi and skipheader not exported 2013-04-22 17:48:28 +02:00
Remi Collet 6889a0d1f5 overflow2 is not exported by system libgd 2013-04-22 17:39:35 +02:00
Dmitry Stogov 13b039ff9a Fixed linkage with C++ 2013-04-22 15:39:50 +04:00
Xinchen Hui b02241b968 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-04-21 11:11:02 +08:00
Xinchen Hui 32490673b9 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-21 11:10:41 +08:00
Xinchen Hui 6b1928ba0b Merge branch 'PHP-5.4' into PHP-5.5 2013-04-21 11:09:18 +08:00
Antonio Diaz Ruiz 92bbe6be72 Includes 5 new phpTests to check that the error message DOM_NOT_FOUND is properly raised by the method DOMNode::insertBefore(newNode, [refNode]).
Each file covers a different test case

    DOMNode_insertBefore_error2.phpt: refNode is a sibling of the node where newNode wanted to be inserted.
    DOMNode_insertBefore_error3.phpt: refNode is the parent of the node where newNode wanted to be inserted.
    DOMNode_insertBefore_error4.phpt: refNode is a brand new node.
    DOMNode_insertBefore_error5.phpt: refNode is a descendant (not child) of the node where newNode wanted to be inserted.
    DOMNode_insertBefore_error6.phpt: refNode is the node where newNode wanted to be inserted.
2013-04-21 11:05:59 +08:00
Pierre Joye 3cc81d151d Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-20 18:24:04 +02:00
Pierre Joye 14d9f3450b fix x64 opcache, still uses fugly fixed addresses, see TODO entry for explanaton 2013-04-20 18:22:39 +02:00
Xinchen Hui 63d3ef4df0 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-20 15:24:18 +08:00
Xinchen Hui 6ed16753c1 Fixed bug #64677 (execution operator `` stealing surrounding arguments) 2013-04-20 15:23:49 +08:00
Dmitry Stogov c7cf9b68b6 Fixed 5.2 ZTS build 2013-04-19 21:37:24 +04:00
Andrey Hristov 7b7424c34c Merge branch 'PHP-5.4' into PHP-5.5 2013-04-19 16:29:53 +02:00
Andrey Hristov 39cc08c7e9 Merge branch 'PHP-5.3' into PHP-5.4 2013-04-19 15:55:46 +02:00
Andrey Hristov 0802961bd1 lower the limit, should fit in a byte 2013-04-19 15:54:35 +02:00
Xinchen Hui 0704e4badb Fixed compiler warning "cast from pointer to integer of different size" 2013-04-18 17:32:46 +08:00
Dmitry Stogov 5a897009a8 Initialize literals hash_value and cache_slot 2013-04-17 21:19:56 +04:00
Anatol Belski 2d9cbf720d Added curl config test for windows 2013-04-17 14:25:45 +02:00
Anatol Belski c76cdb8067 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated lib versions
  fixed EOL
  updated lib versions
  allow lcov 1.10
  allow lcov 1.10
2013-04-17 13:20:46 +02:00
Anatol Belski ca425a67c4 updated lib versions 2013-04-17 13:20:23 +02:00
Anatol Belski ecf76e2da8 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated lib versions
  allow lcov 1.10
2013-04-17 13:18:00 +02:00
Anatol Belski fb955a613c updated lib versions 2013-04-17 13:17:32 +02:00
Anatol Belski 4fbe1173eb fixed EOL 2013-04-17 13:15:08 +02:00
Anatol Belski 323fdb9879 updated lib versions 2013-04-17 13:12:18 +02:00
Nuno Lopes a9271a8b0d allow lcov 1.10 2013-04-13 16:57:25 -04:00
Nuno Lopes e694d40963 allow lcov 1.10 2013-04-13 16:56:30 -04:00
Nuno Lopes adc17bff57 allow lcov 1.10 2013-04-13 16:53:39 -04:00
Xinchen Hui a5cfe57e08 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-11 14:29:09 +08:00
Xinchen Hui ba292b037f Fixed bug (Wrong ce cached) 2013-04-11 14:28:42 +08:00
Pierre Joye e71b794569 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  lucky that the name is not used, fix name of encoder
2013-04-11 07:08:39 +02:00
Remi Collet 6df1e8d3fe apply change from opcache readme to php.ini 2013-04-11 07:05:56 +02:00
Pierre Joye 4475dbf11d Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-04-11 06:58:04 +02:00
Pierre Joye 684f4d5272 lucky that the name is not used, fix name of encoder 2013-04-11 06:42:38 +02:00
Dmitry Stogov 88e14d01bf Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  update NEWS
  updated NEWS
  Fixed bug #64342 ZipArchive::addFile() has to check for file existence
2013-04-10 23:12:48 +04:00
Dmitry Stogov 193e1865ad Added opcache related entries 2013-04-10 23:10:43 +04:00
Anatol Belski 7133eee5f2 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-10 20:51:58 +02:00
Anatol Belski b6d54faa92 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-04-10 20:51:32 +02:00
Anatol Belski 56b028e590 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3 2013-04-10 20:50:57 +02:00
Anatol Belski fc658f442d update NEWS 2013-04-10 20:47:28 +02:00
Anatol Belski 0655ab7c26 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  Fixed bug #64342 ZipArchive::addFile() has to check for file existence
2013-04-10 20:45:28 +02:00
Anatol Belski 782085bbfb updated NEWS 2013-04-10 20:44:41 +02:00
Anatol Belski ceb5b684e0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #64342 ZipArchive::addFile() has to check for file existence
2013-04-10 20:40:28 +02:00
Anatol Belski 968ae4a56a Fixed bug #64342 ZipArchive::addFile() has to check for file existence 2013-04-10 20:39:17 +02:00
Pierre Joye 6ea7e6da8b Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-10 20:15:03 +02:00
Pierre Joye 87f5d9aa1b Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add external 2.1 detection and fix gd_compat for 2.1+
2013-04-10 20:13:46 +02:00
Pierre Joye c480bf3fb2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  add external 2.1 detection and fix gd_compat for 2.1+
2013-04-10 20:13:18 +02:00
Pierre Joye 224a67fb9f add external 2.1 detection and fix gd_compat for 2.1+ 2013-04-10 20:12:25 +02:00
Dmitry Stogov af967de2af Allow wilcards in opcache.blacklist_filename 2013-04-10 21:41:30 +04:00
Dmitry Stogov e27039630a Fixed support for PHP-5.3 2013-04-10 21:27:06 +04:00
Dmitry Stogov 2b3a4afcbf Added missing ARG_INFO 2013-04-10 16:45:59 +04:00
Dmitry Stogov 7845f49006 Numeric string constants used as array indeces have to be converted to long at compile time 2013-04-10 15:33:08 +04:00
Johannes Schlüter 2e3e87029f Merge branch 'PHP-5.4' into PHP-5.5 2013-04-10 09:48:15 +02:00
Johannes Schlüter 442ff25187 PHP 5.4.14 release date 2013-04-10 09:45:16 +02:00
Johannes Schlüter 146d786137 Merge branch 'PHP-5.3' into PHP-5.4 2013-04-10 09:44:34 +02:00
Johannes Schlüter ecdf8bcc45 PHP 5.3.24 release date 2013-04-10 09:41:21 +02:00
Michael Moravec 70668fd88a Fixed typo - inconsistent notice for undefined property (introduced by fix for #49348) 2013-04-10 13:36:47 +08:00
David Soria Parra 1c498e6e94 NEWS section for next beta 2013-04-09 20:27:22 +02:00
David Soria Parra 6426a002e7 NEWS for PHP 5.5.0 Beta 3 2013-04-09 20:26:58 +02:00
Dmitry Stogov 2b28f29e53 Fixed CFG construction bugs 2013-04-09 17:48:45 +04:00
Dmitry Stogov e13d2c7c7f Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  fix possible NULL deref
  fix null deref
  Fixed bugs #47675 and #64577 (fd leak on Solaris)
2013-04-09 12:10:54 +04:00
Pierre Joye 24f1045d55 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix possible NULL deref
2013-04-09 10:09:47 +02:00
Pierre Joye aab5659357 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix possible NULL deref
2013-04-09 10:09:36 +02:00
Pierre Joye 88b3cdc4e9 fix possible NULL deref 2013-04-09 10:09:17 +02:00
Pierre Joye 1359eaa057 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-09 10:06:49 +02:00
Pierre Joye 4d6c367177 Merge branch 'PHP-5.4' into PHP-5.5
# By Pierre Joye (1) and Rasmus Lerdorf (1)
* PHP-5.4:
  fix null deref
  Fixed bugs #47675 and #64577 (fd leak on Solaris)
2013-04-09 10:04:32 +02:00
Pierre Joye 10d62de4aa Merge branch 'PHP-5.3' into PHP-5.4
# By Pierre Joye (1) and Rasmus Lerdorf (1)
* PHP-5.3:
  fix null deref
  Fixed bugs #47675 and #64577 (fd leak on Solaris)
2013-04-09 10:04:17 +02:00
Pierre Joye 4d4adf47e0 fix null deref 2013-04-09 10:04:01 +02:00
Dmitry Stogov 4bf1f3801b Fixed ZTS build 2013-04-09 12:03:41 +04:00
Dmitry Stogov 4cf00c08bd Fixed issue #26 (added opcache_invalidate(string $filename [, bool $force = false]) function) 2013-04-09 11:57:28 +04:00
Dmitry Stogov d9c9e78369 Fixed issue #82 (allow comments in blacklist file, lines started with ";") 2013-04-09 10:51:19 +04:00
Pierre Joye 83500123d0 ws and comment for recommended aa method 2013-04-09 07:04:52 +02:00
Pierre Joye ec136c219e Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-04-09 06:47:21 +02:00
Pierre Joye 85ad65ef40 fix some unitialized values and typo 2013-04-09 06:44:45 +02:00
Anatol Belski a9f9ff68a2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated libmagic.patch
2013-04-08 16:24:20 +02:00
Anatol Belski a35d386612 updated libmagic.patch 2013-04-08 16:23:43 +02:00
Anatol Belski b810878e7d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix ident
2013-04-08 15:51:53 +02:00
Anatol Belski 9de5dcad1c fix ident 2013-04-08 15:51:22 +02:00
Anatol Belski a1f66c0b50 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Refactored the previous memleak fix
2013-04-08 14:34:09 +02:00
Anatol Belski f3ca1155d6 Refactored the previous memleak fix
to avoid usage of a freed pointer. Thanks Laruence )
2013-04-08 14:32:37 +02:00
Anatol Belski 9f0bfed435 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix memory leak at apprentice.c:1095
2013-04-08 12:50:25 +02:00
Anatol Belski 28e26b0fad fix memory leak at apprentice.c:1095 2013-04-08 12:49:53 +02:00
Anatol Belski 30fc3ac6aa Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed EOL
2013-04-08 09:21:06 +02:00
Anatol Belski b0b81c0a37 fixed EOL 2013-04-08 09:20:43 +02:00
Anatol Belski ee0df8c40a updated NEWS 2013-04-07 22:20:12 +02:00
Anatol Belski b12f79cafb Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  upgraded libmagic to 5.14
2013-04-07 22:18:53 +02:00
Anatol Belski 10367fa7c6 upgraded libmagic to 5.14 2013-04-07 22:15:56 +02:00
Nuno Lopes e769025791 leave a sane environment behind (even if empty) when exiting
some OS atexit() handlers call getenv()
2013-04-07 02:33:33 -04:00
Xinchen Hui 5ac8084e5f Merge branch 'PHP-5.4' into PHP-5.5 2013-04-05 23:28:02 +08:00
Carson McDonald 39bc1bd25f Fix typo 2013-04-05 23:27:34 +08:00
Xinchen Hui 5c4d9123fa Drop support for bison < 2.4 when building PHP from GIT source 2013-04-05 21:35:09 +08:00
Xinchen Hui ce88a81111 Contant has been renamed 2013-04-05 14:27:56 +08:00
Xinchen Hui f4d27a1557 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-05 14:27:29 +08:00
Xinchen Hui 1bcaf771dc Constant has been renamed 2013-04-05 14:25:54 +08:00
Rasmus Lerdorf c3a57fff5e Fixed bugs #47675 and #64577 (fd leak on Solaris) 2013-04-04 19:23:22 -07:00
Rasmus Lerdorf 569eddce0f Fixed bugs #47675 and #64577 (fd leak on Solaris) 2013-04-04 19:22:28 -07:00
Rasmus Lerdorf 1b60c189ad Fixed bugs #47675 and #64577 (fd leak on Solaris) 2013-04-04 19:15:52 -07:00
Johannes Schlüter 9587cf385e Improve warning when trying to load zend ext as PHP module 2013-04-04 15:36:46 +02:00
Xinchen Hui 01ca2bf8c3 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	ext/curl/interface.c
2013-04-04 19:31:14 +08:00
Xinchen Hui 185e5e15ae s ,CURL_WRAPPERS_ENABLE,CURL_WRAPPERS_ENABLED, 2013-04-04 19:28:17 +08:00
Xinchen Hui aac43c9ee8 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-04 14:56:00 +08:00
Xinchen Hui 4f2acd8cde Update test script to make sure the error occurred 2013-04-04 14:55:17 +08:00
Xinchen Hui 4d66b3b589 no tab here 2013-04-04 14:53:30 +08:00
Xinchen Hui 5f969c1d46 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-04 14:53:17 +08:00
Xinchen Hui 846d298f9b Merge branch 'PHP-5.3' into PHP-5.4 2013-04-04 14:53:06 +08:00
Xinchen Hui 9883d8d3e5 no tab here 2013-04-04 14:52:59 +08:00
Xinchen Hui 934dfae4e1 no tab here 2013-04-04 14:52:27 +08:00
Xinchen Hui 34c5b80595 Update NEWs 2013-04-04 14:49:22 +08:00
Xinchen Hui 65e368debd Merge branch 'PHP-5.4' into PHP-5.5 2013-04-04 14:48:53 +08:00
Xinchen Hui 82ac3106e0 Use 5.4 specifical warnnig & Update NEWs 2013-04-04 14:47:49 +08:00
Xinchen Hui f4f8b5a94b Merge branch 'PHP-5.3' into PHP-5.4 2013-04-04 14:44:28 +08:00
Xinchen Hui c96a5bc6be Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap: segfault) 2013-04-04 14:34:11 +08:00
Xinchen Hui db3d629f05 Merge branch 'PHP-5.3' into PHP-5.4 2013-04-04 13:40:46 +08:00
Xinchen Hui 7fc8077e4c Fixed Bug #64578 2013-04-04 13:40:21 +08:00
Nikita Popov 1f34ccbe34 Fix bug #64555: foreach no longer copies keys if they are interned 2013-04-03 20:29:19 +02:00
Xinchen Hui 42f94aa978 Fix test due to opcache 2013-04-03 19:52:09 +08:00
Xinchen Hui bbb4a44f98 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-03 18:51:19 +08:00
ptarjan 99ad08f9a5 Fix #64572: Clean up after the test
Lets not leave stuff lying around.
2013-04-03 18:50:27 +08:00
ptarjan e8d80b770b Fix #64572: Clean up after the test
Lets not leave stuff lying around.
2013-04-03 18:50:18 +08:00
Xinchen Hui f5f3ab1b3f format 2013-04-03 10:21:06 +08:00
Xinchen Hui 0495061a8f Merge branch 'PHP-5.4' into PHP-5.5 2013-04-03 10:20:52 +08:00
Xinchen Hui e34767d426 format 2013-04-03 10:20:33 +08:00
Xinchen Hui bb70176328 Update NEWS & UPGRADING 2013-04-03 10:17:27 +08:00
Xinchen Hui 6ace9c646b Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	ext/curl/interface.c
2013-04-03 10:15:41 +08:00
Xinchen Hui 78a9489f6a Use new constant replace ugly trick 2013-04-03 10:12:49 +08:00
Xinchen Hui 37b20a1bc2 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-04-03 10:11:33 +08:00
Xinchen Hui d7f709a032 Add CURL_WRAPPERS_ENABLE constant
see http://news.php.net/php.internals/66871
2013-04-03 10:09:51 +08:00
Remi Collet 688f5fc889 NEW for #64565 2013-04-02 16:34:39 +02:00
Remi Collet c51e32860a NEW for #64565 2013-04-02 16:33:54 +02:00
Remi Collet 44dbe6a815 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  keep previous test to avoid any behavior change
2013-04-02 16:31:45 +02:00
Remi Collet 731a5c5104 keep previous test to avoid any behavior change 2013-04-02 16:31:36 +02:00
Remi Collet ce89bc8743 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix comment
  Fixed Bug #64565 copy doesn't report failure on partial copy
2013-04-02 16:24:14 +02:00
Remi Collet 8e8a75444c fix comment 2013-04-02 16:24:00 +02:00
Remi Collet 6b4148bc97 Fixed Bug #64565 copy doesn't report failure on partial copy
_php_stream_copy_to_stream_ex, when mmap is possible, doesn't check
if actually written bytes match read bytes.

Fix this (paranoid check) to be consistent with non mmap mode

Seems hard to add a unit test, as this rely on a full filesystem.
2013-04-02 16:18:26 +02:00
Dmitry Stogov 23b44e7f39 Fixed ZTS build 2013-04-01 21:16:33 +04:00
Xinchen Hui d8a5f41a60 Fixed bug parameter is casted to string of array_column 2013-04-01 19:11:45 +08:00
Xinchen Hui 3b504a3717 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-01 18:17:28 +08:00
Xinchen Hui 7b07d05917 Merge branch 'PHP-5.3' into PHP-5.4 2013-04-01 18:13:38 +08:00
Xinchen Hui 9456dac54e Fix test 2013-04-01 18:12:16 +08:00
Dmitry Stogov 74f158fb9d Fixed issue #79 (Optimization Problem/Bug) 2013-04-01 11:33:04 +04:00
Nuno Lopes 586dc07a8a fix coverage data for the opcache optimizer 2013-03-31 15:45:15 -04:00
Xinchen Hui ad7c0b1928 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-31 21:26:26 +08:00
Xinchen Hui 72426a446d Skip test when --with-curlwrappers enabled. 2013-03-31 21:22:48 +08:00
Xinchen Hui 2f6b9b970c Fix typo (it's in DateTime::__wakeup) 2013-03-31 20:07:14 +08:00
Derick Rethans 503760c913 Updated test case and added BFN to NEWS. 2013-03-31 11:07:24 +01:00
EC2 Default User b07ecb5501 Bug #60774 (DateInterval::format("%a") is always zero when an interval is
created using the createFromDateString method)
2013-03-31 10:59:21 +01:00
Derick Rethans 84208d9dc5 Added the new .c files as well as they are not automatically regenerated. 2013-03-31 10:55:45 +01:00
Lonny Kapelushnik 58a8013e5f Rebased to PHP-5.4
Implemented Dmitrys change from df97c3aa0d
Moved the timelib_parse_tz_cor function to ext/date/lib/timelib.c
2013-03-31 10:45:01 +01:00
Lonny Kapelushnik a4ca01cc2b Made separate tests for each TZ type
Fixed handling of unserializing types 1 and 3
2013-03-31 10:45:00 +01:00
Lonny Kapelushnik a1ebd82a29 Fixed the test to use %d instead of an actual number 2013-03-31 10:45:00 +01:00
Lonny Kapelushnik 30d0ae42b5 Bug 54567 DateTimeZone serialize/unserialize
Make DateTimeZone serializable and implement __set_state
2013-03-31 10:45:00 +01:00
Derick Rethans 5dd73b9e54 Merge branch 'splitting-out-date-time-immutable' into PHP-5.5 2013-03-31 10:39:01 +01:00
Derick Rethans 68a7fec7af Make DateTime and DateTimeImmutable siblings.
They both implement the DateTimeInterface interface, which specifies the
non-modifying methods of DateTime/DateTimeImmutable.
2013-03-31 10:37:16 +01:00
Stanislav Malyshev 61fff1fd8b Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64433: does not follow redirects for non-3xx response codes
2013-03-30 21:24:21 -07:00
Sergey Akbarov 1d4fcdff9f Fix bug #64433: does not follow redirects for non-3xx response codes 2013-03-30 21:22:30 -07:00
Xinchen Hui bed44e562e missed part of the patch 2013-03-29 23:47:46 +08:00
Xinchen Hui 953f07503a Fixed bug #64544 (Valgrind warnings after using putenv)
The frozen_envion is needed, since if an item in environ is updated
(like the test script HOME one), invalid free still shows up
2013-03-29 23:42:50 +08:00
Keyur Govande b2a760fe45 Merge branch 'pull-request/313' into PHP-5.5
* pull-request/313:
  Patch for Bug #64544. The process title change module keeps track of the locally allocated environ, so it doesn't need to worry about when environ changes underneath it, for example by putenv()/setenv()
2013-03-29 14:42:16 +00:00
Keyur Govande 00d961cf6a Merge branch 'PHP-5.5' of https://git.php.net/push/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/push/php-src: (266 commits)
  Fix "passing NULL to non-pointer argument" warnings in intl
  Remove support for cloning generators
  Removed deprecated check
  Fix whitespace issue in the SOAP test
  Fix SOAP test
  Forgot to fix the test on 5.4
  Exclude Travis build for 5.3 and 5.4
  Fix tests after addition of ^ (xor) operator to ini
  Fix Bug #64545:	PHP Error in ef93a93ee2
  Attempt to fix SKIP
  This will PHP 5.3.25
  Typo fix (greater then => greater than)
  don't optimize script if it's not going to be cached
  Reimplemented OPcache restart trigger. Now, if memory or hash are full the restart is scheduled only in case the amount of wasted memory is above opcache.max_wasted_percentage. Otherwise OPcahce continue serving the following requests using already cached files, but doesn't try to add new files (the cache is full anyway).
  With pkgconfig < 0.28 output is a single space With pkgconfig = 0.28 output is an empty string, This breaks the test on the 2 vars
  Fixed issue #78 (incorrect file path validation)
  Fix test on Mac (\D shows up)
  Add test for #64529
  will be 5.4.15
  fix NEWS
  ...
2013-03-29 14:35:45 +00:00
Keyur Govande 5bf6323e51 Patch for Bug #64544.
The process title change module keeps track of the locally allocated
environ, so it doesn't need to worry about when environ changes
underneath it, for example by putenv()/setenv()
2013-03-29 14:27:36 +00:00
Nikita Popov 8aff7f0528 Fix "passing NULL to non-pointer argument" warnings in intl
The second argument to spprintf is a size_t (maximum length).
2013-03-29 12:55:00 +01:00
Nikita Popov 8345abcabb Remove support for cloning generators 2013-03-29 11:42:10 +01:00
Dmitry Stogov aa791a4d72 Removed deprecated check 2013-03-29 03:18:04 +04:00
Pierre Joye ac0b66f160 fix BELL constant declaration 2013-03-28 22:14:34 +01:00
Nikita Popov 0e25e00ecf Fix whitespace issue in the SOAP test 2013-03-28 19:10:57 +01:00
Nikita Popov a5e606a2ba Fix SOAP test
Doesn't look like these warnings are present anymore.
2013-03-28 19:05:06 +01:00
Nikita Popov 15994a14a4 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	.travis.yml
2013-03-28 18:43:11 +01:00
Nikita Popov 92aa361bfc Forgot to fix the test on 5.4 2013-03-28 18:42:01 +01:00
Nikita Popov bbe9052ca3 Merge branch 'PHP-5.3' into PHP-5.4 2013-03-28 18:41:34 +01:00
Nikita Popov fecce5a55f Exclude Travis build for 5.3 and 5.4 2013-03-28 18:40:57 +01:00
Nikita Popov dcf0b71c98 Fix tests after addition of ^ (xor) operator to ini 2013-03-28 18:35:46 +01:00
Nikita Popov b1a6a17039 Fix Bug #64545: PHP Error in ef93a93ee2
Test was using die "Foo" instead of die("Foo").
2013-03-28 18:23:23 +01:00
Xinchen Hui 127c78cb76 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-28 23:23:07 +08:00
Xinchen Hui ef93a93ee2 Attempt to fix SKIP 2013-03-28 23:22:20 +08:00
Johannes Schlüter e6ef89861e Merge branch 'PHP-5.4' into PHP-5.5 2013-03-28 15:09:06 +01:00
Johannes Schlüter 242d88c20c Merge branch 'PHP-5.3' into PHP-5.4 2013-03-28 15:08:30 +01:00
Johannes Schlüter 46ee57f2d7 This will PHP 5.3.25 2013-03-28 15:05:46 +01:00
Xinchen Hui f4daaf9250 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-28 19:13:58 +08:00
Veres Lajos 124a867b6a Typo fix (greater then => greater than) 2013-03-28 19:12:08 +08:00
Dmitry Stogov 86d301b232 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  With pkgconfig < 0.28 output is a single space With pkgconfig = 0.28 output is an empty string, This breaks the test on the 2 vars
2013-03-28 13:48:18 +04:00
Dmitry Stogov 3ae5c55596 don't optimize script if it's not going to be cached 2013-03-28 13:45:40 +04:00
Dmitry Stogov 037ea6f360 Reimplemented OPcache restart trigger. Now, if memory or hash are full the restart is scheduled only in case the amount of wasted memory is above opcache.max_wasted_percentage. Otherwise OPcahce continue serving the following requests using already cached files, but doesn't try to add new files (the cache is full anyway). 2013-03-28 13:34:59 +04:00
Remi Collet 201128d39c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  With pkgconfig < 0.28 output is a single space With pkgconfig = 0.28 output is an empty string, This breaks the test on the 2 vars
2013-03-28 10:25:39 +01:00
Remi Collet 640e72ce91 With pkgconfig < 0.28 output is a single space
With pkgconfig = 0.28 output is an empty string,
This breaks the test on the 2 vars

Need to split when
LIB set (ex -lssl -lcrypto)
INC empty (because /usr/include used)
2013-03-28 10:22:20 +01:00
Dmitry Stogov 031553cd01 Fixed issue #78 (incorrect file path validation) 2013-03-28 12:30:18 +04:00
Xinchen Hui 7dd661d0cd Merge branch 'PHP-5.4' into PHP-5.5 2013-03-28 14:35:02 +08:00
Xinchen Hui ab089611e0 Fix test on Mac (\D shows up) 2013-03-28 14:34:08 +08:00
Xinchen Hui ae71c1d9aa Merge branch 'PHP-5.4' into PHP-5.5 2013-03-28 13:54:37 +08:00
Xinchen Hui 55341ac0a8 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-03-28 13:54:04 +08:00
Xinchen Hui 467cd6a60f Add test for #64529 2013-03-28 13:45:42 +08:00
Stanislav Malyshev 5d535a007d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  will be 5.4.15
  fix NEWS

Conflicts:
	configure.in
	main/php_version.h
2013-03-27 14:02:14 -07:00
Stanislav Malyshev f982aaafa7 will be 5.4.15 2013-03-27 14:00:12 -07:00
Stanislav Malyshev 210d43d7a2 fix NEWS 2013-03-27 13:57:53 -07:00
Lars Strojny 25b3c94944 Added XOR support for expressions in INI parser: NEWS and zend_language_scanner.c 2013-03-27 21:30:56 +01:00
Dejan Marjanovic 05016b7e96 Added XOR support for expressions in INI parser 2013-03-27 21:28:53 +01:00
Dmitry Stogov 6e8aa09696 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64529 (Ran out of opcode space)

Conflicts:
	NEWS
	Zend/zend_execute_API.c
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
2013-03-28 00:08:11 +04:00
Dmitry Stogov 85e5e60777 Fixed bug #64529 (Ran out of opcode space) 2013-03-28 00:03:40 +04:00
Dmitry Stogov 391a41e167 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Remove unused variable
  NEWS Section for beta 3
  News for beta 2
2013-03-27 23:15:38 +04:00
Dmitry Stogov 1556d5df8a Fixed issue #74 (Allowed per request OPcache disabling) 2013-03-27 23:13:21 +04:00
David Soria Parra f92a15864b Remove unused variable 2013-03-27 20:00:54 +01:00
David Soria Parra ef6cdb85d9 NEWS Section for beta 3 2013-03-27 19:57:24 +01:00
David Soria Parra 2185746feb News for beta 2 2013-03-27 19:30:43 +01:00
Dmitry Stogov 91ab11ed07 Fixed issue #76 (actually we don't need zend_shared_memory_block_header at all) 2013-03-27 22:16:18 +04:00
Dmitry Stogov fc7efecda0 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  add WebP support in phpinfo
2013-03-27 21:09:51 +04:00
Dmitry Stogov 26f3ff25fe Added opcache.enable_cli=0 2013-03-27 21:08:18 +04:00
Dmitry Stogov f139534694 Added description for opcache.enable_cli 2013-03-27 21:02:39 +04:00
Pierre Joye e7d88a63fa add WebP support in phpinfo 2013-03-27 17:38:57 +01:00
Pierre Joye f01a7e54d3 add windows 8 and windows server 2012 2013-03-27 07:29:47 +01:00
Pierre Joye d0aa831614 versions no longer supported, no need to check 2013-03-27 07:15:23 +01:00
Pierre Joye f3ebb40ad6 FALSE on error 2013-03-27 05:13:30 +01:00
Pierre Joye 4d73bb070e Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-26 11:24:48 +01:00
Pierre Joye 5ae6f582fb fix regression, take #2 (merge issue due to git 1.8 default setting changes) 2013-03-26 11:23:15 +01:00
Xinchen Hui ed31582301 Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration) 2013-03-26 12:02:48 +08:00
Xinchen Hui 0496ad31ac Merge branch 'PHP-5.4' into PHP-5.5 2013-03-26 11:51:15 +08:00
Xinchen Hui 1182a3356c Update test script 2013-03-26 11:50:47 +08:00
Xinchen Hui 62ec3893d2 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-26 11:47:38 +08:00
Xinchen Hui 5e9377ebd5 Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration) 2013-03-26 11:44:57 +08:00
Xinchen Hui 975d26667b Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse'). 2013-03-25 23:48:21 +08:00
Pierre Joye c6e911e154 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-25 13:43:22 +01:00
Pierre Joye 0171bcb9fa typo and WS 2013-03-25 13:42:29 +01:00
Dmitry Stogov 65afa3c044 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  add new functions and constants for GD
2013-03-25 15:49:41 +04:00
Dmitry Stogov 96e5f5eb05 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63914 (zend_do_fcall_common_helper_SPEC does not handle exceptions properly). (Jeff Welch)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-03-25 15:47:45 +04:00
Dmitry Stogov e9f996c00d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63914 (zend_do_fcall_common_helper_SPEC does not handle exceptions properly). (Jeff Welch)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-03-25 15:23:49 +04:00
Pierre Joye 878bef2a1d Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-25 12:22:20 +01:00
Pierre Joye 1c662dc303 add new functions and constants for GD 2013-03-25 12:15:46 +01:00
Dmitry Stogov c4686b4de9 Fixed bug #63914 (zend_do_fcall_common_helper_SPEC does not handle exceptions properly). (Jeff Welch) 2013-03-25 15:07:27 +04:00
Dmitry Stogov 6a7088fd18 back to dev (7.0.2-dev) 2013-03-25 13:57:50 +04:00
Dmitry Stogov f17156c2d1 Fixed copy/paste mistake 2013-03-25 13:30:45 +04:00
Dmitry Stogov 0a00d29256 Fixed bug #64482 (Opcodes for dynamic includes should not be cached) 2013-03-25 13:05:16 +04:00
Dmitry Stogov 64b029af0d Separate "start_time" from "last_restart_time" 2013-03-25 12:33:24 +04:00
Dmitry Stogov 987dee9ca1 Fixed PHP-5.2 ZTS compatibility 2013-03-25 12:21:58 +04:00
Dmitry Stogov a3316ffe6a 7.0.1 release 2013-03-25 11:44:09 +04:00
Stanislav Malyshev c20e4bbc96 make it int main 2013-03-24 23:58:30 -07:00
Stanislav Malyshev 016fbd9991 fix return value 2013-03-24 23:43:25 -07:00
Stanislav Malyshev 385d0e52cc add code to check if we know flock definition on this system
In order to configure detect it and not fail the compile.
Not an ideal solution, suggestions are welcome on how to improve it.
2013-03-24 20:11:28 -07:00
Stanislav Malyshev 504ef64c7b fix typo 2013-03-24 20:03:57 -07:00
Stanislav Malyshev 7c0bdb9a4f add definition for 5.5 2013-03-24 19:54:10 -07:00
Pierre Joye 4394249881 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-25 03:19:08 +01:00
Pierre Joye 1b34ab8ff8 remove comments 2013-03-25 03:14:27 +01:00
Stanislav Malyshev c342c9b964 fix bug #64490 - add __FreeBSD_kernel__ to allowed FreeBSD defs 2013-03-24 19:07:30 -07:00
Nikita Popov c08e1d2be9 Fix PDO::inTransaction() test for pgsql
inTransaction() nowadays casts the in_transaction result to boolean.
I'm not sure whether the INERROR state should result in true or false.
For now I went with the result that we actually get.
2013-03-24 17:54:05 +01:00
Johannes Schlüter d900382814 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-24 17:33:17 +01:00
Johannes Schlüter 6f560b0487 Document embedded server options in manpage 2013-03-24 17:32:30 +01:00
Johannes Schlüter de71f435d8 Merge branch 'PHP-5.3' into PHP-5.4 2013-03-24 17:32:00 +01:00
Johannes Schlüter 66682f5abe It's 2013, even for a manpage 2013-03-24 17:31:29 +01:00
Nikita Popov 4633e07e29 Fix mysql_list_fields.phpt test
The minimum length is given in bytes, so it is charset dependent.
For utf8 charsets for example it's 3 rather than 1.
2013-03-24 17:07:16 +01:00
Pierre Joye be3e2bb295 fix generic rotation and 90 degrees & multiples rotation, take #2 2013-03-24 16:52:20 +01:00
Nikita Popov 585f71f497 Fix some errors in mysqlnd charset list
I fixed the stuff that seemed obviously wrong, but there are some more
differences with the SHOW COLLATIONS output:

 * The whole range of "utf16" collations missing
 * "filename" missing
 * "ucs2_general_mysql500_ci" and "utf8_general_mysql500_ci" missing

I wasn't sure whether those omissions are intentional, so I didn't add
them.
2013-03-24 16:09:39 +01:00
David Soria Parra ec7250fb64 Merge commit '1ec484d' into PHP-5.5
* commit '1ec484d':
  - add imageaffinematrixget and imagematrixconcat
  - add affine matrix helper for translate, scale, rotate and shear
  - fix unix build
  - add new files for interpolation
  - config.m4 sync with .w32
  - add new interpolation method   . imagescale   . imageaffine   . replace imagerotate with new generic and optimized new implementations   . imagesetinterpolationmethod, to set the default interpolation to be     used with the new functions   . add imagepalettetotruecolor
2013-03-24 14:05:55 +01:00
Nikita Popov aa2b54812f Fix version check in test 2013-03-24 13:58:35 +01:00
Pierre Joye 0179284bfb Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - add reminder for checking return values
2013-03-24 13:29:16 +01:00
Pierre Joye bb18fa448c - add reminder for checking return values 2013-03-24 13:27:00 +01:00
Anatol Belski ec26141f92 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - fix x64 issues on windows with the various time types (overflow, signed and unsigned bits ops, etc.) causing crashes on start, error or log, must be done in win32/time.c for some of these functions too
2013-03-23 22:43:58 +01:00
Pierre Joye 3af4896837 - fix x64 issues on windows with the various time types (overflow, signed and unsigned bits ops, etc.) causing crashes on start, error or log, must be done in win32/time.c for some of these functions too
Signed-off-by: Anatol Belski <ab@php.net>
2013-03-23 22:42:03 +01:00
Nikita Popov 2b62226188 Fix cli server tests on travis
This passes an absolute path to the executable, rather than a relative.
Maybe this is something that should be done automatically by
run-tests.php as it doesn't apply only to travis.
2013-03-23 21:43:55 +01:00
Nikita Popov 430c987716 Skip locale dependent test if locale not available 2013-03-23 21:09:21 +01:00
Nikita Popov c2893ab592 Missed two occurances of Revision: 2013-03-23 21:09:20 +01:00
Anatol Belski ec25e99193 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Reworked the changes for bug #64452
2013-03-23 21:00:46 +01:00
Anatol Belski 04b492a5fe Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Reworked the changes for bug #64452
2013-03-23 20:59:47 +01:00
Anatol Belski 638c4b89b7 Reworked the changes for bug #64452 2013-03-23 20:57:59 +01:00
Nikita Popov 01583bdc36 phar phpinfo uses Id instead of Revision 2013-03-23 20:11:06 +01:00
Nikita Popov 9a56dce83f Use NEWS merge driver for UPGRADING and UPGRADING.INTERNALS 2013-03-23 18:26:11 +01:00
Nikita Popov bda5c0b082 Show diffs on Travis CI 2013-03-23 18:25:18 +01:00
Nikita Popov 0cb868c042 Move some internal changes from UPGRADING to UPGRADING.INTERNALS 2013-03-23 18:06:25 +01:00
Anatol Belski 2e00f7611c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed possible precision loss in microtime
2013-03-23 17:48:05 +01:00
Anatol Belski 3654ff7366 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed possible precision loss in microtime
2013-03-23 17:47:39 +01:00
Anatol Belski b022e54bd1 Fixed possible precision loss in microtime
This is related to the fix for bug #64370. MSVC natively supports __int64 type,
so calculating with 32 bit ints is neither necessary nor reliable. Therefore
an older piece of code is reused.
2013-03-23 17:40:06 +01:00
David Soria Parra defb08c705 Note about bison version 2013-03-22 17:44:32 +01:00
Etienne Kneuss 6af1b08482 Add SplDoublyLinkedList::add to UPGRADING 2013-03-22 11:35:45 +01:00
Rasmus Lerdorf fd2b8df265 Tweaks an add OPcache info to UPGRADING 2013-03-21 23:14:16 -07:00
David Soria Parra 293d5defb4 Add OPCache ini settings to php.ini 2013-03-21 15:51:23 +01:00
Xinchen Hui 534aec8a52 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-21 21:32:32 +08:00
Xinchen Hui 39a173b79b Fix bug in reflectionClass relate to #64239 2013-03-21 21:32:06 +08:00
Xinchen Hui 9d31c0de0c Update NEWS 2013-03-21 21:11:15 +08:00
Xinchen Hui 79925094c4 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-21 21:10:32 +08:00
Xinchen Hui 7dce0194c8 Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11) 2013-03-21 21:09:30 +08:00
Xinchen Hui f2383dead6 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-21 15:58:08 +08:00
Xinchen Hui 08624ea90d Fix test after f8b91d9acf 2013-03-21 15:57:21 +08:00
Xinchen Hui b29a9fa75d Merge branch 'PHP-5.4' into PHP-5.5 2013-03-21 11:14:36 +08:00
Xinchen Hui 0fd3572f4e Fixed bug #64432 (more empty delimiter warning in strX methods) 2013-03-21 11:14:10 +08:00
Xinchen Hui da6916a770 fix memory leak
the value shouldn't be ref, use z_add_ref is enough
2013-03-21 10:58:58 +08:00
Stanislav Malyshev 6f17c6242f add array_column() 2013-03-20 14:14:17 -07:00
David Soria Parra 2258350450 NEWS section for beta 2 2013-03-20 15:17:53 +01:00
David Soria Parra 7f2424bb1d NEWS for beta 1 2013-03-20 15:17:53 +01:00
David Soria Parra 52171aeaf4 Allow local override of PHPROOT in makedist 2013-03-20 15:17:53 +01:00
David Soria Parra 66b4e5cdec NEWS for array_column 2013-03-20 13:14:20 +01:00
David Soria Parra 0173c4bab0 Merge branch 'pull-request/257' into PHP-5.5
* pull-request/257:
  array_column: Fix compile-time warnings
  array_column: Removed array_pluck() alias
  array_column: Set array_pluck as an alias for array_column
  array_column: Implement ability to specify an index column
  Cleaning up a memory leak.
  array_column: Adding test for IS_OBJECT and converting object to string
  array_column: Using add_next_index_zval() at nikic's recommendation.
  array_column: Improved tests
  array_column: Cleaning up, as recommended in pull request #56 comments
  Fixing typo in test for array_column()
  Simplify the code and use zend_hash_next_index_insert()
  Adding test for columns not present in all rows for array_column().
  Adding tests for the negative results of array_column()
  Implement new array function array_column()
2013-03-20 13:02:33 +01:00
Pierre Joye 1ec484d3c5 - add imageaffinematrixget and imagematrixconcat 2013-03-20 12:19:03 +01:00
Pierre Joye 780c6e0a9c - add affine matrix helper for translate, scale, rotate and shear 2013-03-20 11:01:37 +01:00
Pierre Joye a46065ef71 - fix unix build 2013-03-20 09:24:54 +01:00
Anatol Belski bf8026aacf updated NEWS 2013-03-20 09:15:16 +01:00
Anatol Belski 0125ec77d2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  Fixed bug #64452 Zip PHPTs crash intermittently
2013-03-20 09:14:13 +01:00
Anatol Belski 0881ff0466 updated NEWS 2013-03-20 09:13:13 +01:00
Anatol Belski 06a526be3e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #64452 Zip PHPTs crash intermittently
2013-03-20 09:12:33 +01:00
Anatol Belski bb935ff8dc Fixed bug #64452 Zip PHPTs crash intermittently 2013-03-20 09:10:10 +01:00
Pierre Joye a7a53d369b - add new files for interpolation 2013-03-20 08:10:54 +01:00
Pierre Joye 00a53ca817 - config.m4 sync with .w32 2013-03-20 07:52:23 +01:00
Pierre Joye 22159fb7b7 - add new interpolation method
. imagescale
  . imageaffine
  . replace imagerotate with new generic and optimized new implementations
  . imagesetinterpolationmethod, to set the default interpolation to be
    used with the new functions
  . add imagepalettetotruecolor
2013-03-20 07:46:59 +01:00
Stanislav Malyshev 5aaff8d634 clarify NEWS 2013-03-19 22:32:50 -07:00
Ben Ramsey f5bf1ba88f array_column: Fix compile-time warnings 2013-03-19 20:44:19 -05:00
Anatol Belski cb76420fe0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Backported fix for bug #62852
2013-03-19 21:22:49 +01:00
Anatol Belski cfd096fd7c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Backported fix for bug #62852
2013-03-19 21:22:09 +01:00
Anatol Belski 8d199c7c4f Backported fix for bug #62852 2013-03-19 21:19:55 +01:00
David Soria Parra 5e55c6d9fd Refer to Zend Optimizer as Zend Opcache from now on 2013-03-19 16:20:37 +01:00
David Soria Parra 60b36a6819 ZO+ NEWS 2013-03-19 15:54:57 +01:00
Anatol Belski 25b84546a8 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-19 15:15:31 +01:00
Anatol Belski b3d82845db fix C89 compat 2013-03-19 15:13:27 +01:00
David Soria Parra c542e969f2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix typos
2013-03-19 15:11:48 +01:00
Carson McDonald c6f6bf88d8 Fix typos 2013-03-19 15:11:34 +01:00
Anatol Belski ce04268bb9 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-19 14:50:05 +01:00
Mark Baker 4257469079 Fix #48358 add() method for SplDoublyLinkedLis 2013-03-19 14:46:21 +01:00
Anatol Belski 6f0f5d5281 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix C90 compat
2013-03-19 14:44:20 +01:00
Anatol Belski 7687b8b81c fix C90 compat 2013-03-19 14:42:18 +01:00
Dmitry Stogov 4837bdb910 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63976 (Parent class incorrectly using child constant in class property)

Conflicts:
	NEWS
2013-03-19 17:04:35 +04:00
Dmitry Stogov 7b0993bfb4 Fixed bug #63976 (Parent class incorrectly using child constant in class property) 2013-03-19 16:59:01 +04:00
Dmitry Stogov 960d5be528 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Partial fix for bug #64239
2013-03-19 15:47:43 +04:00
Dmitry Stogov 984561cfa8 Partial fix for bug #64239 2013-03-19 15:45:48 +04:00
Dmitry Stogov 74e11fb14c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #62343 (Show class_alias In get_declared_classes())

Conflicts:
	NEWS
2013-03-19 15:00:24 +04:00
Dmitry Stogov 84630a1109 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62343 (Show class_alias In get_declared_classes())
2013-03-19 14:59:08 +04:00
Dmitry Stogov 4a6291508d Fixed bug #62343 (Show class_alias In get_declared_classes()) 2013-03-19 14:56:53 +04:00
Dmitry Stogov ef8c8eaa95 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error)

Conflicts:
	NEWS
	Zend/zend_compile.c
2013-03-19 13:07:32 +04:00
Dmitry Stogov e62bb03257 Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error) 2013-03-19 12:48:23 +04:00
Dmitry Stogov f621f0b8e7 strlen() returns size_t 2013-03-19 10:45:38 +04:00
Dmitry Stogov a62ffb72f4 Renamed Zend Optimizer+ into Zend OPcache 2013-03-19 10:32:24 +04:00
Dmitry Stogov 840c0d6091 Add stats to phpinfo 2013-03-19 10:17:44 +04:00
Dmitry Stogov 5b0879e7c9 Avoid trailing line break 2013-03-18 13:36:31 +04:00
Dmitry Stogov a9684532eb Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  fix NEWS
  fix NEWS
2013-03-18 13:17:42 +04:00
Dmitry Stogov 1fe43d0798 Add oom, wasted, hash and manual restart counters to help identify potential configuration problems 2013-03-18 13:13:35 +04:00
Stanislav Malyshev 260007a303 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix NEWS
2013-03-18 00:52:36 -07:00
Stanislav Malyshev e25b2d7ea5 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix NEWS
2013-03-18 00:52:27 -07:00
Stanislav Malyshev 87c8ea15f2 fix NEWS 2013-03-18 00:52:15 -07:00
Stanislav Malyshev b893326e0d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix NEWS
2013-03-18 00:51:35 -07:00
Stanislav Malyshev db4d473d53 fix NEWS 2013-03-18 00:51:16 -07:00
Dmitry Stogov ccf7d7cc93 Add optional flag to opcache_get_status() 2013-03-18 11:23:26 +04:00
Boris Lytochkin fe384b3444 merge with 5.4 2013-03-17 20:52:55 +04:00
Boris Lytochkin c5ba47ac59 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  more test coverage: missing square bracket error message
  Fixed bug #61981
2013-03-17 20:52:12 +04:00
Boris Lytochkin 85d9d85ce2 more test coverage: missing square bracket error message 2013-03-17 20:40:15 +04:00
Boris Lytochkin 44197774c0 Fixed bug #61981 2013-03-17 20:29:14 +04:00
Boris Lytochkin 5d0826e9c3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #61981
2013-03-17 20:02:34 +04:00
Boris Lytochkin b32405053f Fix bug #61981 2013-03-17 20:00:37 +04:00
Dmitry Stogov dcc927d3f2 Load "black list" only if O+ is enabled 2013-03-17 12:17:04 +04:00
Dmitry Stogov e66c8681c7 Made opcache_get_status() return statistics during O+ restart 2013-03-17 11:56:04 +04:00
Dmitry Stogov 0b8b6a727d Added ability to load zend_extensions without absolute path names 2013-03-17 11:42:25 +04:00
Dmitry Stogov 930b272d70 Enabled O+ build by default (it may be disabled before 5.0.0 release) 2013-03-17 10:58:30 +04:00
Dmitry Stogov 07b1eaa609 Removed files that are neccessary only for standalone pecl branch 2013-03-17 10:40:59 +04:00
Anatol Belski fa3fc711d3 setting plausible default value for struct members
especially for unsigned members so they don't casted to max unsigned
2013-03-16 18:29:50 +01:00
Etienne Kneuss b46897941a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Remove spurious int cast in between two longs
2013-03-16 18:20:16 +01:00
Etienne Kneuss 5de1b08482 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove spurious int cast in between two longs
2013-03-16 18:20:06 +01:00
Etienne Kneuss 62364e6e01 Remove spurious int cast in between two longs 2013-03-16 18:19:14 +01:00
Xinchen Hui c1cf7538f0 Fixed test after nick previous fix 2013-03-16 23:16:32 +08:00
Xinchen Hui acd160530a Fix test after f8b91d9acf 2013-03-16 23:14:06 +08:00
Dmitry Stogov e00b04a54f Fixed memory leaks 2013-03-16 17:24:54 +04:00
Dmitry Stogov e9641141aa Made test compatible with O+ 2013-03-16 16:11:00 +04:00
Dmitry Stogov 92430bcf5d Fixed compatibility with ext/phar 2013-03-16 16:08:11 +04:00
Dmitry Stogov ac05e68f55 Fixed O+ testes 2013-03-16 12:07:09 +04:00
Dmitry Stogov 9ef01ce698 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-16 00:46:34 +04:00
Dmitry Stogov 34d3202eda Merge Zend Optimizer+
git-subtree-dir: ext/opcache
git-subtree-mainline: b1dbfb7357
git-subtree-split: 8d35170c5f
2013-03-16 00:41:46 +04:00
Anatol Belski f8b91d9acf Fixed bug #62852 Unserialize Invalid Date crash
Error handling is the same as in bug #53437, E_ERROR if we
expect an invalid object.
2013-03-15 21:22:35 +01:00
Anatol Belski b1dbfb7357 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
2013-03-15 19:12:34 +01:00
Anatol Belski 73c38eca5a updated NEWS 2013-03-15 19:11:53 +01:00
Anatol Belski f058942923 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Backported patch for #64370
2013-03-15 19:09:18 +01:00
Anatol Belski 90c8f16c3b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Backported patch for #64370
2013-03-15 19:08:32 +01:00
Anatol Belski b903d2d6cd Backported patch for #64370 2013-03-15 19:04:40 +01:00
Dmitry Stogov 8d35170c5f Renamed ZendOptimizerPlus.so into opcache.so 2013-03-15 21:03:05 +04:00
Anatol Belski 0ee71557ff Fixed bug #53437 Crash with unserialized DatePeriod instance 2013-03-15 16:59:54 +01:00
Nikita Popov b7788c52f1 Fix wrong macro usage and add missing NEWS entry 2013-03-15 13:48:33 +01:00
Dmitry Stogov c765c81cf6 "ZendOptimizerPlus" is renamed to "opcache" to de merged into PHP-5.5 under ext/opcache (the product name is still "Zend Optimizer+") 2013-03-15 16:21:07 +04:00
Ferenc Kovacs cc51729c00 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  explain the step updating the git submodule reference in web/php.git
2013-03-15 09:41:50 +01:00
Ferenc Kovacs 30eff1a697 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  explain the step updating the git submodule reference in web/php.git
2013-03-15 09:41:34 +01:00
Ferenc Kovacs 9350f45aca explain the step updating the git submodule reference in web/php.git 2013-03-15 09:40:28 +01:00
Dmitry Stogov be020633f2 More accurate restart scheduling 2013-03-15 11:49:33 +04:00
Dmitry Stogov 0ab356c8e5 Autogolobal $GLOBALS has to be pinged even if auto_globals_jit=0 2013-03-15 10:45:49 +04:00
Dmitry Stogov 61ac64b372 Allow only shared O+ build 2013-03-14 23:11:10 +04:00
Anatol Belski 96388c78c9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix zts check
2013-03-14 14:39:47 +01:00
Anatol Belski 5df8cf1975 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix zts check
2013-03-14 14:39:09 +01:00
Anatol Belski e43c5a8395 fix zts check 2013-03-14 14:38:20 +01:00
Dmitry Stogov dd1c358d1b Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  fix the fix
  fix for bug  #63530 	mysqlnd_stmt::bind_one_parameter uses wrong alloc for stmt->param_bind
  Forgot to remove some now unused variables
  Add support for non-scalar Iterator keys in foreach
  fixed headers order
  - Updated to version 2013.2 (2013b)
  fixed the test
  Fixed bug #64370 (microtime(true) less than $_SERVER['REQUEST_TIME_FLOAT'])
  Disable zend_always_inline in debug build
2013-03-14 14:19:41 +04:00
Andrey Hristov c09652c289 fix the fix 2013-03-13 15:56:44 +01:00
Andrey Hristov 7503a4b4a4 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	NEWS
2013-03-13 15:29:40 +01:00
Dmitry Stogov d77c865aff Removed redundand code 2013-03-13 17:51:10 +04:00
Andrey Hristov 0777a18703 Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	NEWS
2013-03-13 14:24:23 +01:00
Andrey Hristov f1e2edff8b fix for bug #63530 mysqlnd_stmt::bind_one_parameter uses wrong alloc for stmt->param_bind 2013-03-13 13:37:51 +01:00
Nikita Popov 28634bf603 Forgot to remove some now unused variables 2013-03-12 17:39:20 +01:00
Nikita Popov fcc6611de9 Add support for non-scalar Iterator keys in foreach
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Anatol Belski 8436342d88 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed headers order
2013-03-12 08:34:48 +01:00
Anatol Belski a328cc452e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fixed headers order
2013-03-12 08:34:16 +01:00
Anatol Belski bdaafe3c7b fixed headers order 2013-03-12 08:33:36 +01:00
Derick Rethans e5c64c0bda Merge branch 'PHP-5.4' into PHP-5.5 2013-03-11 21:36:41 +00:00
Derick Rethans 98bb5f4798 Merge branch 'PHP-5.3' into PHP-5.4 2013-03-11 21:36:37 +00:00
Derick Rethans 50ad2af503 - Updated to version 2013.2 (2013b) 2013-03-11 21:36:36 +00:00
Pascal Borreli 4c5517623c Fixed typos 2013-03-11 18:49:05 +00:00
Anatol Belski 278c4097c6 fixed the test 2013-03-11 16:14:39 +01:00
Anatol Belski 8aaa09636a Fixed bug #64370 (microtime(true) less than $_SERVER['REQUEST_TIME_FLOAT']) 2013-03-11 16:04:37 +01:00
Xinchen Hui 4573405c5d Merge branch 'PHP-5.4' into PHP-5.5 2013-03-11 15:16:47 +08:00
Xinchen Hui 0444708c5c Disable zend_always_inline in debug build
it will be much more easier for debuging
2013-03-11 15:15:22 +08:00
Keyur Govande c7ad92fac7 Adding in NEWS/UPGRADING about process title change support. 2013-03-11 00:20:57 +00:00
Keyur Govande cdacda720c Merge branch 'PHP-5.5' of https://git.php.net/push/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/push/php-src:
  Fix tests after laruence unserialize change
  Fix get_property_ptr_ptr declaration in simplexml
  Update NEWS
  Fixed confused exception message while user threw exception
  Fixed bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
  Fix date
  use NEWS only
  Fixed bug #61025 (__invoke() visibility not honored)
2013-03-11 00:05:49 +00:00
Nikita Popov 9490118fdb Fix tests after laruence unserialize change 2013-03-09 20:21:33 +01:00
Nikita Popov a59b211b2d Fix get_property_ptr_ptr declaration in simplexml
A new parameter was added to the API and simplexml wasn't adjusted,
thus causing crashes.
2013-03-09 20:15:00 +01:00
Xinchen Hui 9d816ba1d3 Update NEWS 2013-03-09 23:11:48 +08:00
Xinchen Hui 1be745ce1b Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	ext/standard/var_unserializer.c
2013-03-09 23:10:48 +08:00
Xinchen Hui 7197f0ffcc Fixed confused exception message while user threw exception 2013-03-09 23:08:14 +08:00
Xinchen Hui f52b2e6a65 Fixed bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
about the __sleep one, since php_serialize_* are all void function,
so,,only check exception at the very begining
2013-03-09 23:00:58 +08:00
Xinchen Hui af5ada3871 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-09 11:38:32 +08:00
Xinchen Hui 6fece94369 Fix date 2013-03-09 11:37:41 +08:00
David Soria Parra 6824dc6b33 use NEWS only 2013-03-08 11:12:35 +01:00
Xinchen Hui 01049ca7ae Fixed bug #61025 (__invoke() visibility not honored) 2013-03-08 10:34:17 +08:00
Keyur Govande 5543035a70 Merge branch 'pull-request/300' into PHP-5.5
* pull-request/300:
  Support for CLI process title (https://wiki.php.net/rfc/cli_process_title)
2013-03-07 23:51:37 +00:00
Ralph Schindler ac73ca6db4 Fix for https://bugs.php.net/bug.php?id=62649 2013-03-07 23:20:11 +01:00
Carson McDonald 0c11cab919 Typo fix: recieved to received 2013-03-07 23:05:05 +01:00
Keyur Govande a0a995cff3 Support for CLI process title (https://wiki.php.net/rfc/cli_process_title)
A new commit into branch 5.5
2013-03-07 18:54:34 +00:00
David Soria Parra e98271f588 News for next beta 2013-03-07 12:14:48 +01:00
David Soria Parra d0ca2430da Do another Alpha instead of Beta because of ZO+ RFC being voted on 2013-03-07 12:14:26 +01:00
Xinchen Hui d2f9804e1f add tests into package 2013-03-07 14:53:22 +08:00
Xinchen Hui bc926f2fbb Add test script for #57 (segfaults in drupal7) 2013-03-07 12:19:30 +08:00
Dmitry Stogov b543511343 fixed memory leaks 2013-03-07 08:13:58 +04:00
David Soria Parra 4923bb579a NEWS for the next beta 2013-03-06 23:51:27 +01:00
David Soria Parra b6ae7cba1e NEWS for PHP 5.5.0 Beta 1 2013-03-06 22:39:54 +01:00
Dmitry Stogov 1143d3b1d0 Fixed Issue #57 (segfaults in drupal7) 2013-03-06 22:32:21 +04:00
Anatol Belski 8589dfb6cc simplified the previous fix for #64359 2013-03-06 16:48:51 +01:00
Dmitry Stogov b34e50cc78 Fixed issue #58 (PHP-5.2 compatibility) 2013-03-06 17:49:47 +04:00
Anatol Belski 371000a877 Fixed bug #64359 strftime crash with VS2012 2013-03-06 12:37:57 +01:00
Stanislav Malyshev 9ed7eab514 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix NEWS
2013-03-06 00:45:26 -08:00
Stanislav Malyshev 38847482c8 fix NEWS 2013-03-06 00:44:43 -08:00
Dmitry Stogov 40ce4127f6 Merge branch 'master' of github.com:zend-dev/ZendOptimizerPlus 2013-03-06 09:42:26 +04:00
Dmitry Stogov 08bfdc75a4 Allows exclusion of large files from being cached 2013-03-06 09:41:59 +04:00
Xinchen Hui be5369be59 Add maintainers inot package.xml
otherwise, when doing release, pecl net will sync the maintianers info
form package.xml
2013-03-06 11:22:20 +08:00
Anatol Belski bfb8b9153b fix ANSI C90 compat 2013-03-05 20:24:58 +01:00
Dmitry Stogov c3c244af81 Fixed test 2013-03-05 22:49:31 +04:00
Dmitry Stogov 6ab1759369 Fixed uninitialized variable 2013-03-05 15:46:21 +04:00
Dmitry Stogov fae0a738df Fixed bug #64353 (Built-in classes can be unavailable with dynamic includes and Optimizer+) 2013-03-05 14:57:50 +04:00
Xinchen Hui 082741814a skip if no IPv6 support 2013-03-05 17:18:13 +08:00
Xinchen Hui e5d0dc24d2 Fix tests temporary
seems IPV6_PKTINFO are not avaiable in some OS
2013-03-05 16:56:00 +08:00
Dmitry Stogov 32904c6043 Merge branch 'master' of github.com:zend-dev/ZendOptimizerPlus 2013-03-05 12:18:57 +04:00
Dmitry Stogov 9c5039eabb Save a stat() call by calling sapi_module.get_stat() 2013-03-05 12:17:18 +04:00
Xinchen Hui 1978dae309 Skip test on Apple 2013-03-05 14:02:28 +08:00
Xinchen Hui 3f67d5ae43 Revert "Fixed Bug #64340 (sockets tests failed) Patch by Reeze"
build break, will only leave the test script fix first

This reverts commit f2246f352f.
2013-03-05 13:58:20 +08:00
Xinchen Hui 3b78c87a36 Fixed #54 (PECL install adds extension= instead of zend_extension= to php.ini) 2013-03-05 13:37:49 +08:00
Xinchen Hui 8f991588b9 Merge pull request #52 from laruence/master
update package.xml for releasing 7.0.0
2013-03-04 05:35:14 -08:00
Pierre Joye 0404c38615 - fix path 2013-03-04 14:14:09 +01:00
Pierre Joye e9a2642c89 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-03-04 14:06:09 +01:00
Xinchen Hui a293bd1c4a release 7.0.0 2013-03-04 19:49:53 +08:00
Dmitry Stogov 2c95834135 Increased version number 2013-03-04 15:29:02 +04:00
Dmitry Stogov 3b0da73d32 Preparaton for pecl release 2013-03-04 15:26:40 +04:00
Pierre Joye 5001f40e82 - add noisy php logo for autocrop with threshold test 2013-03-04 12:05:59 +01:00
Anatol Belski 2635408a0d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed PCRE locale crash in Windows/TS
2013-03-04 09:15:17 +01:00
Anatol Belski 4e46a87392 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed PCRE locale crash in Windows/TS
2013-03-04 09:14:14 +01:00
Stephen A. Zarkos b6fdb60ecf Fixed PCRE locale crash in Windows/TS 2013-03-04 09:09:45 +01:00
Pierre Joye 2024ff3b61 - add test for imagecropauto 2013-03-04 07:26:07 +01:00
Stanislav Malyshev b65d4d1cfc Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  rename NEWS back
  updated NEWS
2013-03-03 13:24:00 -08:00
Stanislav Malyshev 2578f7bcc0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  rename NEWS back
  updated NEWS
2013-03-03 13:20:57 -08:00
Stanislav Malyshev 656fcb67f1 rename NEWS back 2013-03-03 13:18:58 -08:00
Anatol Belski a5b6a0a25b Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files.
  Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files.
  Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files.
2013-03-03 19:23:06 +01:00
Anatol Belski d95faef1a1 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files.
  Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files.
2013-03-03 19:22:35 +01:00
Anatol Belski fe2612d71e Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3
* 'PHP-5.3' of git.php.net:php-src:
  Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files.
2013-03-03 19:21:45 +01:00
Anatol Belski 555d584a40 updated NEWS 2013-03-03 19:16:36 +01:00
Anatol Belski b89c326578 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  This commit was manufactured by cvs2svn to create tag 'NEWS'.
2013-03-03 19:15:37 +01:00
Anatol Belski 00ecc12c0f updated NEWS 2013-03-03 19:14:50 +01:00
Anatol Belski faf14e9b2e Merge commit 'NEWS' into PHP-5.4
* commit 'NEWS':
  This commit was manufactured by cvs2svn to create tag 'NEWS'.
2013-03-03 19:14:17 +01:00
Anatol Belski e1023affc1 updated NEWS 2013-03-03 19:13:38 +01:00
Derick Rethans 1e1de1554f Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files. 2013-03-03 13:10:24 -05:00
Anatol Belski 1cda84a986 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  merged PCRE 8.32
2013-03-03 19:10:12 +01:00
Derick Rethans 47ac3ec1f4 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-03 13:10:07 -05:00
Derick Rethans 6c2564766f Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files. 2013-03-03 13:09:52 -05:00
Derick Rethans 206cce0d8b Merge branch 'PHP-5.3' into PHP-5.4 2013-03-03 13:09:31 -05:00
Derick Rethans b36df28dca Rename to create a NEWS file per version to fix the annoying merging issue with NEWS files. 2013-03-03 13:08:19 -05:00
Anatol Belski ca4a3e6138 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  merged PCRE 8.32
2013-03-03 19:07:49 +01:00
Anatol Belski 357ab3cbad merged PCRE 8.32
- defined HAVE_CONFIG_H to simplify the future merges
- PCRE NEWS http://pcre.org/news.txt
2013-03-03 19:06:22 +01:00
Derick Rethans c596850af6 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	NEWS
2013-03-03 12:58:42 -05:00
Derick Rethans a3f020a4be Merge branch 'PHP-5.3' into PHP-5.4 2013-03-03 12:53:23 -05:00
Derick Rethans c134f2a1a5 - Updated to version 2013.1 (2013a) 2013-03-03 12:53:22 -05:00
Pierre Joye 0a55c4b1dd - (s)rgb distance works way better for now, re enable threshold 2013-03-03 05:30:12 +01:00
Xinchen Hui 46e612ada4 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-03 11:25:29 +08:00
Xinchen Hui fe5ce5cb91 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-03-03 11:25:08 +08:00
Xinchen Hui 9bda6a25a5 Fix test (skip on unable to create socket) 2013-03-03 11:24:45 +08:00
Xinchen Hui 2413fa6fbb Fix test after the convert_to_long be improved, see #64290 2013-03-03 11:13:52 +08:00
Xinchen Hui 505c6ca486 Fixed bug #64290 (behavior change of converting to long)
convert_to_long behavior has been improved
As Cataphrace said in IRC, the test should be fixed.
2013-03-03 10:59:15 +08:00
Xinchen Hui f2246f352f Fixed Bug #64340 (sockets tests failed) Patch by Reeze
Add __APPLE_USE_RFC_3542 for OS X 10.7 because IPv6 options are incompatible with RFC 2292.
2013-03-03 10:51:04 +08:00
Dmitry Stogov 68c265ce37 typo 2013-03-01 22:57:53 +04:00
Dmitry Stogov ecf0cbdf3b Fixed timestamp update on Phar contents modification. 2013-03-01 19:17:25 +04:00
Dmitry Stogov b6656d0ec9 Fixed timestamp update on Phar contents modification. 2013-03-01 19:17:08 +04:00
Pierre Joye 7698bc5735 - disable threshold for now, will enable it again using CIEDE2000 2013-03-01 08:10:49 +01:00
Dmitry Stogov 28cd079adb Added info anout zend_optimizerplus.mmap_base directice 2013-03-01 10:17:41 +04:00
Dmitry Stogov a91292c6e9 Merge branch 'master' of https://github.com/Tyrael/ZendOptimizerPlus into test 2013-03-01 10:03:59 +04:00
Dmitry Stogov aa1e91b130 Merge branch 'patch-1' of https://github.com/patrickallaert/ZendOptimizerPlus into test 2013-03-01 10:00:21 +04:00
Stanislav Malyshev 99b373da25 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.24-dev
  5.3.23RC1
2013-02-28 21:30:02 -08:00
Stanislav Malyshev 03dfa08da9 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  5.4.24-dev
  5.3.23RC1

Conflicts:
	configure.in
	main/php_version.h
2013-02-28 21:29:40 -08:00
Stanislav Malyshev 5c5bc7cf1b 5.4.24-dev 2013-02-28 21:25:36 -08:00
Stanislav Malyshev 8f533d2dfd 5.3.23RC1 2013-02-28 21:22:06 -08:00
Ferenc Kovacs 0a29c8de7a adding the package.xml for pecl 2013-02-28 22:38:09 +01:00
Pierre Joye 22aeb976e0 - add todo for threshold 2013-02-28 19:34:14 +01:00
Pierre Joye 0c32a18d4c - clean and enable threshold 2013-02-28 19:22:06 +01:00
Pierre Joye a991360344 - add image crop support 2013-02-28 17:24:23 +01:00
Patrick Allaert 171843a4e0 Fixed typo 2013-02-28 15:44:58 +01:00
Pierre Joye 82765a0780 - typo 2013-02-27 21:02:47 +01:00
Pierre Joye 74983a45cc - fix name for imageflip constants, consistent witht the other 2013-02-27 20:23:31 +01:00
Pierre Joye 03d0bf633d - add test 2013-02-27 20:22:45 +01:00
Pierre Joye 34adce6c47 - add constants for imageflip 2013-02-27 20:08:26 +01:00
Ilia Alshanetsky 23daa95d10 return false to be consistent 2013-02-27 13:54:56 -05:00
Ilia Alshanetsky 0039f160f2 Make the functions validate input parameters (or lack thereof) 2013-02-27 13:53:03 -05:00
Dmitry Stogov d39a49a534 Correction 2013-02-27 21:35:24 +04:00
Ilia Alshanetsky e1fb6ce365 Added missing calloc() result checks 2013-02-27 10:13:01 -05:00
Pierre Joye efffdb4d7f - add only once 2013-02-27 16:03:17 +01:00
Pierre Joye 98e43de7c5 - add new file for m4 as well 2013-02-27 16:02:54 +01:00
Pierre Joye fa940a60de - add image flip API support 2013-02-27 10:39:25 +01:00
Pierre Joye e6414140e6 - add image flip API support 2013-02-27 10:39:16 +01:00
Pierre Joye af5bf879aa - add image flip API support 2013-02-27 10:39:09 +01:00
Pierre Joye e26ea9df42 - add image flip API support 2013-02-27 10:38:55 +01:00
Pierre Joye 6a3623e199 - add image flip API support 2013-02-27 10:38:33 +01:00
Pierre Joye 246de922e6 - add image flip API support 2013-02-27 10:37:48 +01:00
Stanislav Malyshev 0d65a85cc0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.13 branched, now it's 5.4.14

Conflicts:
	configure.in
	main/php_version.h
2013-02-26 22:26:36 -08:00
Stanislav Malyshev 31a6f8b7f4 5.4.13 branched, now it's 5.4.14 2013-02-26 22:25:33 -08:00
Stanislav Malyshev 84b65cf7ab Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add news for SOAP fixes
2013-02-26 22:20:50 -08:00
Stanislav Malyshev 7ffb77d243 add news for SOAP fixes 2013-02-26 22:20:21 -08:00
Stanislav Malyshev 207d0ee08a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Bug #52861: unset fails with ArrayObject and deep arrays
2013-02-26 22:13:01 -08:00
Stanislav Malyshev 7c08232509 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Bug #52861: unset fails with ArrayObject and deep arrays
2013-02-26 22:12:36 -08:00
Mike Willbanks 61099f8585 Bug #52861: unset fails with ArrayObject and deep arrays
When checking to make into a reference write, readwrite are checked but not unset
2013-02-26 22:11:52 -08:00
Dmitry Stogov a6e115e94e Fixed typo 2013-02-26 23:05:24 +04:00
Remi Collet 7a3933a93b Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add support for ppc64p7 arch (Power7 optimized)
2013-02-26 14:35:47 +01:00
Remi Collet 52d1add0fe add support for ppc64p7 arch (Power7 optimized) 2013-02-26 14:35:34 +01:00
Dmitry Stogov 616214f929 Fixed build instruction 2013-02-26 11:26:51 +04:00
Dmitry Stogov 443a177b34 Emit the same error messages as without O+ (use "dups_fix" hack only for classes) 2013-02-26 01:34:11 +04:00
Dmitry Stogov a7a355c741 Fixed memory leaks (avoid generation of unused results) 2013-02-26 01:32:24 +04:00
Dmitry Stogov 70f1cd9dc5 Execute shared memory initialization/deinitialization under exclusive lock 2013-02-25 16:35:44 +04:00
Dmitry Stogov f463abc508 Fixed function prototypes 2013-02-25 16:06:38 +04:00
Dmitry Stogov 56baf17a17 Merge branch 'master' of https://github.com/laruence/ZendOptimizerPlus
Conflicts:
	Optimizer/block_pass.c
2013-02-25 14:55:27 +04:00
Dmitry Stogov cf102333a2 op_array->brk_count_array has to be kept even if op_array doesn't have BRK/CONT/GOTO opcodes.
It might be used to unlock "loop" or "switch" variable in case of exception.
2013-02-25 14:18:07 +04:00
Xinchen Hui 3da5b830c2 coding style improve 2013-02-25 15:29:54 +08:00
Xinchen Hui c58b899470 remove useless configure option 2013-02-25 14:45:03 +08:00
Dmitry Stogov ce69b86927 Ability to disable O+ per process (or process pool) 2013-02-25 10:35:59 +04:00
Dmitry Stogov 0c220d6fb3 Fixed build in a separate directory (Ilia Alshanetsky) 2013-02-25 10:04:03 +04:00
Dmitry Stogov 0d73c20d87 Fixed compilation, when compiling right into PHP (Ilia Alshanetsky) 2013-02-25 09:59:39 +04:00
Xinchen Hui e75804c34e Merge branch 'PHP-5.4' into PHP-5.5 2013-02-24 12:59:10 +08:00
Xinchen Hui d24ac6953e Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/spl/spl_fixedarray.c
2013-02-24 12:58:39 +08:00
Xinchen Hui 1b58bd39a6 Fixed bug #64264 (SPLFixedArray toArray problem) 2013-02-24 12:55:53 +08:00
Gustavo Lopes 59ec22b370 sendrecvmsg_shutdown function moved to mshutdown
The function php_socket_sendrecvmsg_shutdown() should have been called in
MSHUTDOWN, not RSHUTDOWN.

Bug only on TSRM builds.

Should fix bug #64287.
2013-02-24 03:50:38 +01:00
Gustavo Lopes 189fbfd53b Fix ext/sockets build with phpize
Fixes bug #64285
2013-02-24 00:49:25 +01:00
Gustavo Lopes 97f22702c4 Fix ext/intl build with phpize
Fixes bug #64284.
2013-02-24 00:49:01 +01:00
Gustavo Lopes fa3cb8608c NEWS for 8718755 2013-02-23 18:07:01 +01:00
Gustavo Lopes 12745594a4 Remove trailing whitespace; break long lines 2013-02-23 18:01:52 +01:00
Gustavo Lopes 8718755c9f Merge branch 'dval_to_lval' into PHP-5.5
* dval_to_lval:
  Fix rounding of zend_dval_to_lval
  Fix zend_dval_to_lval outside 64bit integers range
2013-02-23 17:59:28 +01:00
Gustavo Lopes a86fcfbc1d Fix rounding of zend_dval_to_lval
Now rounding is always towards zero; the rounding can be though as if
occurring on the original double. Only relevant for the 32-bit long
variant.
2013-02-23 16:55:50 +00:00
Gustavo Lopes 77566edbaf Fix zend_dval_to_lval outside 64bit integers range
PHP should preserve the least significant bits when casting from double
to long. Zend.m4 contains this:

AC_DEFINE([ZEND_DVAL_TO_LVAL_CAST_OK], 1, [Define if double cast to long preserves least significant bits])

If ZEND_DVAL_TO_LVAL_CAST_OK is not defined, zend_operators.h had an
inline implementation of zend_dval_to_lval() that would do a cast to an
int64_t (when sizeof(long) == 4), then a cast to unsigned long and
finally the cast to long.

While this works well for doubles inside the range of values of the type
used in the first cast (int64_t in the 32-bit version and unsigned long
in the 64-bit version), if outside the range, it is undefined behavior
that WILL give varying and not particularly useful results.

This commit uses fmod() to first put the double in a range that can
safely be cast to unsigned long and then casts this unsigned long to
long. This last cast is implementation defined, but it's very likely
that this gives the expected result (i.e. the internal 2's complement
representation is unchanged) on all platforms that PHP supports. In any
case, the previous implementationa already had this assumption.

This alternative code path is indeed significantly slower than simply
casting the double (almost an order of magnitude), but that should not
matter because casting doubles with a very high absolute value is a
rare event.
2013-02-23 17:23:49 +01:00
Xinchen Hui a1afc0a139 Simplify the install instructions 2013-02-23 15:34:10 +08:00
Dmitry Stogov a9910f3ce2 white spaces 2013-02-22 18:09:26 +04:00
Dmitry Stogov 4fe4b0d593 Fixed memory leak 2013-02-22 17:22:43 +04:00
Dmitry Stogov f2e8465017 Fixed memory leak 2013-02-22 17:10:34 +04:00
Andrey Hristov 64a2a8a753 relax the check 2013-02-22 13:50:04 +01:00
Andrey Hristov 1643d4ed56 Add some parameter checks 2013-02-22 13:17:46 +01:00
Dmitry Stogov 56818541c7 Started Test Suite 2013-02-22 14:06:02 +04:00
Dmitry Stogov f1b76342d8 We build a zend_extension (not a regular PHP module). 2013-02-22 13:38:32 +04:00
Xinchen Hui cddc2c35d9 Codes style improve 2013-02-22 14:56:05 +08:00
Johannes Schlüter b479c2bffb Merge branch 'PHP-5.4' into PHP-5.5 2013-02-21 16:50:59 +01:00
Johannes Schlüter 064c62e4cf Fix #60840 (undefined symbol: mysqlnd_debug_std_no_trace_funcs) 2013-02-21 16:49:28 +01:00
Johannes Schlüter 7b719235b3 Merge branch 'PHP-5.4' into PHP-5.5 2013-02-21 15:10:47 +01:00
Johannes Schlüter 1e9bc56775 Merge branch 'PHP-5.3' into PHP-5.4 2013-02-21 15:10:15 +01:00
Johannes Schlüter fcd4b5335a Fix TSRM (after afc1debb) 2013-02-21 15:08:58 +01:00
Dmitry Stogov 8b7222e22f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  PHAR should modify entry timestamp when it's modified
2013-02-21 16:08:07 +04:00
Dmitry Stogov b5d267aa95 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  PHAR should modify entry timestamp when it's modified
2013-02-21 15:57:26 +04:00
Dmitry Stogov 7b113d789d PHAR should modify entry timestamp when it's modified 2013-02-21 15:55:20 +04:00
Sara Golemon ead2e1708d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  http-stream test requires network connectivity
2013-02-21 03:22:09 -08:00
Sara Golemon c16d6befd4 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  http-stream test requires network connectivity
2013-02-21 03:21:49 -08:00
Sara Golemon bc55a8eb9f http-stream test requires network connectivity 2013-02-21 03:21:23 -08:00
Xinchen Hui f39d12c821 Merge branch 'PHP-5.4' into PHP-5.5 2013-02-21 18:20:48 +08:00
Xinchen Hui 9a44a9806c Fixed bug #64235 (Insteadof not work for class method in 5.4.11)
As we discussed with stefan, we think previous of allowing use with
classes is a bug, should be forbided, anyway, the error message should
be improved.
2013-02-21 18:18:41 +08:00
Anatol Belski 22ae9efe6e added back the older vc9 favours 2013-02-21 10:59:50 +01:00
Anatol Belski 27f8944eaa updated lib versions 2013-02-21 10:32:56 +01:00
Anatol Belski 5ec06a1e5a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated lib versions
  updated lib versions
2013-02-21 10:29:55 +01:00
Anatol Belski bae95bd9d4 updated lib versions 2013-02-21 10:27:37 +01:00
Anatol Belski 07a13fd9fa Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated lib versions
2013-02-21 10:26:38 +01:00
Stanislav Malyshev 76160319a5 news for bug #49348 2013-02-21 00:56:00 -08:00
Stanislav Malyshev d39554ac08 Merge branch 'bug49348' into PHP-5.5
* bug49348:
  fix tests
  fix bug #49348 - issue notice on get_property_ptr_ptr when used for read
2013-02-21 00:52:46 -08:00
Anatol Belski 81e9aa6c8d updated lib versions 2013-02-21 09:46:50 +01:00
Dmitry Stogov 3a06991ffd Added ability to always validate cached script timestamps using zend_optimizerplus.revalidate_freq=0 2013-02-21 12:11:03 +04:00
Dmitry Stogov 20c623c9be Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed external entity loading
2013-02-20 22:30:59 +04:00
Dmitry Stogov c737b89473 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed external entity loading

Conflicts:
	ext/libxml/libxml.c
	ext/libxml/php_libxml.h
2013-02-20 22:27:41 +04:00
Dmitry Stogov 8e76d0404b Fixed external entity loading 2013-02-20 22:14:59 +04:00
Dmitry Stogov 280bbaf301 Avoid unexpected warning messages (ext/standard/tests/file/fopencookie.phpt) 2013-02-20 18:04:07 +04:00
Johannes Schlüter b157e05f57 Merge branch 'PHP-5.4' into PHP-5.5 2013-02-20 11:58:01 +01:00
Johannes Schlüter 021f57ef0e Merge branch 'PHP-5.3' into PHP-5.4 2013-02-20 11:57:11 +01:00
Johannes Schlüter afc1debb2f 5.3.22 NEWS 2013-02-20 11:56:29 +01:00
Dmitry Stogov b95964535c Fixed compilation error 2013-02-20 11:21:15 +04:00
David Soria Parra 7e5f761e82 Start new NEWS section for beta1 2013-02-19 19:42:27 +01:00
David Soria Parra a4bcc15c3b News for PHP 5.5.0 Alpha 5 2013-02-19 19:41:46 +01:00
Dmitry Stogov 1fcdd25e83 Added check for calloc() failure 2013-02-19 18:21:31 +04:00
Dmitry Stogov 6ee2602317 Simplification 2013-02-19 18:15:11 +04:00
Dmitry Stogov 4813a71174 Fixed static analyser warning 2013-02-19 18:07:23 +04:00
Dmitry Stogov 3af305cc50 Removed redundand TSRMLS_FETCH() 2013-02-19 18:04:40 +04:00
Dmitry Stogov 2d87dce1ed Avoid buffer overrun 2013-02-19 18:00:49 +04:00
Anatol Belski 43664e656d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix the test for curl 7.29.0+
2013-02-19 09:05:27 +01:00
Anatol Belski cc34dfce16 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix the test for curl 7.29.0+
2013-02-19 09:04:52 +01:00
Anatol Belski 558c5dbe65 fix the test for curl 7.29.0+ 2013-02-19 09:04:06 +01:00
Stanislav Malyshev dc6f073ce9 fix tests 2013-02-18 23:01:42 -08:00
Stanislav Malyshev 0c6d903ce7 fix bug #49348 - issue notice on get_property_ptr_ptr when used for read 2013-02-18 20:56:02 -08:00
Dmitry Stogov 511b33ccdf Avoid warning about possible precision loss 2013-02-18 13:27:42 +04:00
Dmitry Stogov 40107aa6da Use proper format specifier 2013-02-18 13:19:24 +04:00
Dmitry Stogov 53d4abb16c Avoid static analyzer warning 2013-02-18 13:13:25 +04:00
Dmitry Stogov f18678bbcf Fixed signed/unsigned comparison warnings 2013-02-18 13:03:29 +04:00
Dmitry Stogov e708dce674 Lenght is unsigned 2013-02-18 12:42:56 +04:00
Dmitry Stogov d9ba147e5c Avoid mixing declarations and code 2013-02-18 12:33:58 +04:00
Dmitry Stogov a120178520 Added checks for malloc() failures 2013-02-18 11:34:10 +04:00
Dmitry Stogov 6d999b4379 Added check for CreateMutex() failure 2013-02-18 11:12:20 +04:00
Dmitry Stogov 908fc9dcc4 Fixed inconsistent start_accel_module() prototype and usage 2013-02-18 11:04:58 +04:00
krakjoe 996485e0b2 bug #29 enable cli-server support 2013-02-17 15:48:31 +00:00
Dmitry Stogov 2b6eede1d3 Fixed warning about uninitialized variable (actually, it doesn't have to be initialized). 2013-02-15 18:06:48 +04:00
Dmitry Stogov 6693f1854d Wrong value 2013-02-15 17:59:36 +04:00
Dmitry Stogov bee06002d0 Fixed possible resource leak 2013-02-15 17:46:38 +04:00
Dmitry Stogov 4c97b6c8cf "locked" must be a "module" global (local to thread) 2013-02-15 17:35:58 +04:00
Dmitry Stogov d70ed26aaa Added ZTS lock 2013-02-15 15:08:51 +04:00
Dmitry Stogov bde294f8eb Renamed ZCG(startup_ok) into "accel_startup_ok".
It must be a "true" global to make ZTS work.
(ZTS starts work, but ZTS O+ is not stable anyway)
2013-02-15 13:45:42 +04:00
Dmitry Stogov f579ef5abe Merge branch 'patch-1' of https://github.com/reeze/ZendOptimizerPlus 2013-02-15 10:51:29 +04:00
Reeze Xia 4fec381b3a Typo fix 2013-02-15 13:48:37 +08:00
Daniel Gimenes ddbe1b66ed Fix typo in README 2013-02-15 00:00:40 -02:00
Dmitry Stogov aef92d22d5 Fixed compatibility with 5.2 and 5.3 2013-02-14 18:36:07 +04:00
Dmitry Stogov 5cd7c77545 Added Xdebug compatibility note 2013-02-14 18:20:34 +04:00
Dmitry Stogov d8b84d9f80 Merge branch 'master' of https://github.com/thomasbley/ZendOptimizerPlus 2013-02-14 16:15:55 +04:00
Dmitry Stogov a84b588208 Merge branch 'issue-ini' of https://github.com/remicollet/ZendOptimizerPlus 2013-02-14 16:03:32 +04:00
Thomas Bley a9ff713a56 phpize is already in README 2013-02-14 12:44:07 +01:00
Thomas Bley f0aa77a44d Update README 2013-02-14 12:24:48 +01:00
Thomas Bley 8eb38dacac added travis-ci config (make + load extension) 2013-02-14 12:20:50 +01:00
Dmitry Stogov ded12158cc Fixed phpinfo() output when O+ is not enabled for CLI 2013-02-14 13:19:06 +04:00
Dmitry Stogov 91e775df1b Disabled unsafe optimization pattern 2013-02-14 13:06:30 +04:00
Remi Collet 071ab3cf37 also add load_comments 2013-02-14 09:24:11 +01:00
Remi Collet 92df8e208f missing directives in accelerator_get_configuration 2013-02-14 09:21:45 +01:00
Remi Collet d30b985015 missing directive in README (need doc) 2013-02-14 09:21:45 +01:00
Dmitry Stogov afb43f5650 - Added zend_optimizerplus.load_comments configuration durective, so "Doc comments" may be always stored in SHM, but
restored only by applicaions that really need them.
- Added note, that zend_optimizerplus.save_comments is dangerous and may break applications and frameworks.
2013-02-14 11:59:23 +04:00
Dmitry Stogov 4bc28ae783 Revert renaming (md needs additional formatting tags) 2013-02-14 11:13:51 +04:00
Dmitry Stogov 37de7567b1 Renamed README into README.md 2013-02-14 11:09:36 +04:00
Dmitry Stogov 30ea6e100e Merge branch 'master' of https://github.com/johnl/ZendOptimizerPlus 2013-02-14 11:04:37 +04:00
Dmitry Stogov 54a90b691f Don't completely delete the "enabled condition". 2013-02-14 11:00:04 +04:00
Dmitry Stogov 18904d18c7 Merge branch 'master' of https://github.com/adoy/ZendOptimizerPlus 2013-02-14 10:57:59 +04:00
Dmitry Stogov abb7788093 Merge branch 'master' of https://github.com/pierrejoye/ZendOptimizerPlus 2013-02-14 10:43:50 +04:00
Pierre Joye dfcd77341d - nuke unused variable 2013-02-14 07:41:18 +01:00
Dmitry Stogov 219decd8ec This is a development version yet 2013-02-14 10:38:20 +04:00
Pierre Joye f74c938c95 - fix windows build 2013-02-14 07:24:26 +01:00
Dmitry Stogov 44f892080d Merge branch 'patch-1' of https://github.com/raziel057/ZendOptimizerPlus 2013-02-14 10:07:39 +04:00
Dmitry Stogov bfcbe7849b Avoid compilation of unsupported SHM backends 2013-02-14 10:01:29 +04:00
Pierrick Charron 30c3a59668 Avoid unnecessary code and change the type of accelerator_enabled
accelerator_enabled will always be true when accelerator_get_status
returns an array. Also the accelerator_enabled should be a boolean
and not a long
2013-02-13 14:25:38 -05:00
Thomas Lallement 8847f9107b Fix typo 2013-02-13 19:56:44 +01:00
John Leach 54da28b015 Added LICENSE from http://www.php.net/license/3_01.txt
Closes #2
2013-02-13 18:47:31 +00:00
Dmitry Stogov 7334835143 Fixed zend_optimizerplus.enable_file_override=1 compatibility with PHP-5.3 2013-02-13 21:41:07 +04:00
sasezaki 2ba47175cf typo at Optimizer/block_pass.c 2013-02-14 00:48:18 +09:00
Damien Tournoud 7c0e3ccdb6 Fix typos and grammar issues in README. 2013-02-13 16:08:19 +01:00
Dmitry Stogov aafc1456b0 spelling 2013-02-13 16:33:14 +04:00
Dmitry Stogov 528006a3b4 Open Source Release 2013-02-13 16:26:47 +04:00
Ben Ramsey 3439a098a0 array_column: Removed array_pluck() alias 2013-01-14 10:04:14 -06:00
Ben Ramsey a1876b6846 array_column: Set array_pluck as an alias for array_column 2013-01-11 17:09:34 -06:00
Ben Ramsey 5bc2854b37 array_column: Implement ability to specify an index column 2013-01-11 16:58:31 -06:00
Ben Ramsey 94d5b2519a Cleaning up a memory leak. 2013-01-11 14:16:20 -06:00
Ben Ramsey 20ab30339d array_column: Adding test for IS_OBJECT and converting object to string 2013-01-11 14:16:19 -06:00
Ben Ramsey 66a02eb25e array_column: Using add_next_index_zval() at nikic's recommendation. 2013-01-11 14:16:19 -06:00
Ben Ramsey 5f6b20a44d array_column: Improved tests 2013-01-11 14:16:19 -06:00
Ben Ramsey e921d28ae3 array_column: Cleaning up, as recommended in pull request #56 comments 2013-01-11 14:16:19 -06:00
Ben Ramsey 10da6f00b8 Fixing typo in test for array_column() 2013-01-11 14:16:19 -06:00
Ben Ramsey 6a27b890e6 Simplify the code and use zend_hash_next_index_insert() 2013-01-11 14:16:19 -06:00
Ben Ramsey dc4dfe8ae0 Adding test for columns not present in all rows for array_column(). 2013-01-11 14:16:19 -06:00
Ben Ramsey a811e5b6f7 Adding tests for the negative results of array_column() 2013-01-11 14:16:19 -06:00
Ben Ramsey 9035a1ed24 Implement new array function array_column()
array_column() returns the values of the specified column from a
multi-dimensional array.
2013-01-11 14:16:19 -06:00
SVN Migration 3e94ce6a97 This commit was manufactured by cvs2svn to create tag 'NEWS'. 2008-12-19 02:13:42 +00:00
497 changed files with 141723 additions and 91475 deletions

No files matched your search

+2
View File
@@ -23,6 +23,8 @@ sapi/continuity/capi.c ident
Zend/RFCs/002.txt ident
Zend/RFCs/003.txt ident
NEWS merge=NEWS
UPGRADING merge=NEWS
UPGRADING.INTERNALS merge=NEWS
/ext/bz2/tests/with_strings.phpt -crlf
/ext/dom/tests/bug40836.phpt -crlf
/ext/dom/tests/domelement.phpt -crlf
+2 -2
View File
@@ -8,7 +8,7 @@ notifications:
email: false
env:
- REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=./sapi/cli/php
- REPORT_EXIT_STATUS=1
before_script:
# Compile PHP
@@ -21,4 +21,4 @@ before_script:
- . ./travis/ext/pdo_pgsql/setup.sh
# Run PHPs run-tests.php
script: ./sapi/cli/php run-tests.php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP"
script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff
+2 -2
View File
@@ -147,7 +147,7 @@ STATUS: Working
COMMENT: Tested on phpts and isapi versions
-------------------------------------------------------------------------------
EXTENSION: mysql
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -158,7 +158,7 @@ STATUS: Working
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: mysqlnd
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3
+1 -1
View File
@@ -14,7 +14,7 @@ php_lcov.info: lcov-test
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
-@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
-@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
+236 -23
View File
@@ -1,5 +1,200 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 May 2013, PHP 5.5.0 Release Candidate 2
- Core:
. Fixed bug #64660 (Segfault on memory exhaustion within function definition).
(Stas, reported by Juha Kylmänen)
. Fixed bug #64720 (SegFault on zend_deactivate). (Dmitry)
. Fixed bug #64853 (Use of no longer available ini directives causes crash
on TS build). (Anatol)
- Calendar:
. Fixed bug #64895 (Integer overflow in SndToJewish). (Remi)
- Fileinfo:
. Fixed bug #64830 (mimetype detection segfaults on mp3 file). (Anatol)
- FPM:
. Add --with-fpm-systemd option to report health to systemd, and
systemd_interval option to configure this. The service can now use
Type=notify in the systemd unit file. (Remi)
- mbstring:
. Fixed bug #64769 (mbstring PHPTs crash on Windows x64). (Anatol)
- mysqli:
. Fixed bug #64394 (MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS undeclared when
using Connector/C). (Andrey)
- Sockets:
. Fixed bug #64508 (Fails to build with --disable-ipv6). (Gustavo)
- Zend Engine:
. Fixed bug #64821 (Custom Exceptions crash when internal properties overridden).
(Anatol)
- DateTime
. Fixed bug #64825 (Invalid free when unserializing DateTimeZone).
(Anatol)
09 May 2013, PHP 5.5.0 Release Candidate 1
- FPM:
. Ignore QUERY_STRING when sent in SCRIPT_FILENAME. (Remi)
. Fixed some possible memory or resource leaks and possible null dereference
detected by code coverity scan. (Remi)
. Log a warning when a syscall fails. (Remi)
- GD:
. Fix build with system libgd >= 2.1 which is now the minimal
version required (as build with previous version is broken).
No change when bundled libgd is used. (Ondrej Sury, Remi)
- SNMP:
. Fixed bug #64765 (Some IPv6 addresses get interpreted wrong).
(Boris Lytochkin)
. Fixed bug #64159 (Truncated snmpget). (Boris Lytochkin)
- Streams:
. Fixed bug #64770 (stream_select() fails with pipes returned by proc_open()
on Windows x64). (Anatol)
25 Apr 2013, PHP 5.5.0 Beta 4
- Core:
. Fixed bug #64677 (execution operator `` stealing surrounding arguments).
(Laruence)
- CURL:
. Remove curl stream wrappers. (Pierrick)
- MySQLi:
. Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB
pointer has closed). (Laruence)
- Zip:
. Fixed bug #64342 (ZipArchive::addFile() has to check for file existence).
(Anatol)
- SOAP:
. Added SoapClient constructor option 'ssl_method' to specify ssl method.
(Eric Iversen)
- Streams:
. Fixed Windows x64 version of stream_socket_pair() and improved error
handling. (Anatol Belski)
11 Apr 2013, PHP 5.5.0 Beta 3
- Core:
. Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap:
segfault). (Laruence)
. Fixed bug #64565 (copy doesn't report failure on partial copy). (Remi)
. Fixed bug #64555 (foreach no longer copies keys if they are interned).
(Nikita Popov)
. Fixed bugs #47675 and #64577 (fd leak on Solaris)
- CURL:
. Added CURL_WRAPPERS_ENABLED constant. (Laruence)
- DateTime
. Fixed bug #54567 (DateTimeZone serialize/unserialize) (Lonny
Kapelushnik, Derick)
. Fixed bug #60774 (DateInterval::format("%a") is always zero when an
interval is created using the createFromDateString method) (Lonny
Kapelushnik, Derick)
- General improvements:
. Drop support for bison < 2.4 when building PHP from GIT source.
(Laruence)
- Fileinfo:
. Upgraded libmagic to 5.14. (Anatol)
- OPcache
. Added opcache_invalidate() function. (Dmitry)
. Added ability to disable opcode cahing for current request by setting
opcache.enable=0. (Dmitry)
. Allowed comments in blacklist files started from ';'. (Remi)
. Allowed wilcards in opcache.blacklist_filename. (Remi)
. Fixed opcache reload condition. Now OPcache is not reloaded if it's full,
but wasted memory is less than opcache.max_wasted_percentage. (Dmitry)
. Fixed incorrect file path validation. (Dmitry).
. Optimizer: Fixed Control Flow Graph construction. (Dmitry)
. Optimizer: numeric string constants used as array indeces have to be
converted to long at compile time. (Dmitry)
. Optimizer: Fixed deltion of used literal. (Laruence, Dmitry)
28 Mar 2013, PHP 5.5.0 Beta 2
- Core:
. Fixed bug #64544 (Valgrind warnings after using putenv). (Laruence)
. Fixed bug #64515 (Memoryleak when using the same variablename 2times in
function declaration). (Laruence)
. Fixed bug #64503 (Compilation fails with error: conflicting types for
'zendparse'). (Laruence)
. Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11).
(Dmitry, Laruence)
. Fixed bug #64523, allow XOR in php.ini. (Dejan Marjanovic, Lars)
- Opcache:
. Fixed bug # 64490 (struct flock undefined on FreeBSD). (Joe Watkins)
21 Mar 2013, PHP 5.5.0 Beta 1
- Core:
. Added Zend Opcache extension and enable building it by default.
More details here: https://wiki.php.net/rfc/optimizerplus. (Dmitry)
. Added array_column function which returns a column in a multidimensional
array. https://wiki.php.net/rfc/array_column. (Ben Ramsey)
. Fixed bug #64354 (Unserialize array of objects whose class can't
be autoloaded fail). (Laruence)
. Added support for changing the process's title in CLI/CLI-Server SAPIs.
The implementation is more robust that the proctitle PECL module. More
details here: https://wiki.php.net/rfc/cli_process_title. (Keyur)
. Fixed bug #64370 (microtime(true) less than $_SERVER['REQUEST_TIME_FLOAT']).
(Anatol)
. Added support for non-scalar Iterator keys in foreach
(https://wiki.php.net/rfc/foreach-non-scalar-keys). (Nikita Popov)
- mysqlnd
. Fixed bug #63530 (mysqlnd_stmt::bind_one_parameter crashes, uses wrong alloc
for stmt->param_bind). (Andrey)
- DateTime
. Fixed bug #53437 (Crash when using unserialized DatePeriod instance).
(Gustavo, Derick, Anatol)
. Fixed bug #62852 (Unserialize Invalid Date causes crash). (Anatol)
- SPL:
. Implement FR #48358 (Add SplDoublyLinkedList::add() to insert an element
at a given offset). (Mark Baker, David Soria Parra)
- Zip:
. Bug #64452 (Zip crash intermittently). (Anatol)
07 Mar 2013, PHP 5.5.0 Alpha 6
- Core:
. Fixed bug #61025 (__invoke() visibility not honored). (Laruence)
. Fixed bug #49348 (Uninitialized ++$foo->bar; does not cause a notice).
(Stas)
- Sockets:
. Fixed bug #64287 (sendmsg/recvmsg shutdown handler causes segfault).
(Gustavo)
- PCRE:
. Merged PCRE 8.32. (Anatol)
- DateTime:
. Fixed bug #64359 (strftime crash with VS2012). (Anatol)
- SNMP:
. Fixed bug #61981 (OO API, walk: $suffix_as_key is not working correctly).
(Boris Lytochkin)
21 Feb 2013, PHP 5.5.0 Alpha 5
- Core:
@@ -8,12 +203,16 @@ PHP NEWS
propagated). (Laruence)
. Fixed bug #63830 (Segfault on undefined function call in nested generator).
(Nikita Popov)
. Fixed bug #60833 (self, parent, static behave inconsistently
. Fixed bug #60833 (self, parent, static behave inconsistently
case-sensitive). (Stas, mario at include-once dot org)
. Implemented FR #60524 (specify temp dir by php.ini). (ALeX Kazik).
. Fixed bug #64142 (dval to lval different behavior on ppc64). (Remi)
. Added ARMv7/v8 versions of various Zend arithmetic functions that are
implemented using inline assembler (Ard Biesheuvel)
. Fix undefined behavior when converting double variables to integers.
The double is now always rounded towards zero, the remainder of its division
by 2^32 or 2^64 (depending on sizeof(long)) is calculated and it's made
signed assuming a two's complement representation. (Gustavo)
- CLI server:
. Fixed bug #64128 (buit-in web server is broken on ppc64). (Remi)
@@ -27,8 +226,8 @@ PHP NEWS
to master.
- mysqli
. Added mysqli_begin_transaction()/mysqli::begin_transaction(). Implemented all
options, per MySQL 5.6, which can be used with START TRANSACTION, COMMIT
. Added mysqli_begin_transaction()/mysqli::begin_transaction(). Implemented
all options, per MySQL 5.6, which can be used with START TRANSACTION, COMMIT
and ROLLBACK through options to mysqli_commit()/mysqli_rollback() and their
respective OO counterparts. They work in libmysql and mysqlnd mode. (Andrey)
. Added mysqli_savepoint(), mysqli_release_savepoint(). (Andrey)
@@ -46,6 +245,18 @@ PHP NEWS
- Filter:
. Implemented FR #49180 - added MAC address validation. (Martin)
- Phar:
. Fixed timestamp update on Phar contents modification. (Dmitry)
- SPL:
. Fixed bug #64264 (SPLFixedArray toArray problem). (Laruence)
. Fixed bug #64228 (RecursiveDirectoryIterator always assumes SKIP_DOTS).
(patch by kriss@krizalys.com, Laruence)
. Fixed bug #64106 (Segfault on SplFixedArray[][x] = y when extended).
(Nikita Popov)
. Fixed bug #52861 (unset fails with ArrayObject and deep arrays).
(Mike Willbanks)
- SNMP:
. Fixed bug #64124 (IPv6 malformed). (Boris Lytochkin)
@@ -72,8 +283,8 @@ PHP NEWS
(marc-bennewitz at arcor dot de, Lars)
- Reflection:
. Fixed bug #64007 (There is an ability to create instance of Generator by hand).
(Laruence)
. Fixed bug #64007 (There is an ability to create instance of Generator by
hand). (Laruence)
10 Jan 2013, PHP 5.5.0 Alpha 3
@@ -91,7 +302,7 @@ PHP NEWS
- cURL:
. Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror
curl_pause, curl_reset, curl_share_close, curl_share_init,
curl_pause, curl_reset, curl_share_close, curl_share_init,
curl_share_setopt curl_strerror and curl_unescape. (Pierrick)
. Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION,
CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE,
@@ -164,22 +375,22 @@ PHP NEWS
set_exception_handler. (Nikita Popov)
- cURL:
. Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND,
CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS,
. Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND,
CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS,
CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE,
CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST, CURLOPT_IGNORE_CONTENT_LENGTH,
CURLOPT_CONNECT_ONLY, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE,
CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_SSL_SESSIONID_CACHE,
CURLOPT_FTP_SSL_CCC, CURLOPT_HTTP_CONTENT_DECODING,
CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_PROXY_TRANSFER_MODE,
CURLOPT_ADDRESS_SCOPE, CURLOPT_CRLFILE, CURLOPT_ISSUERCERT,
CURLOPT_USERNAME, CURLOPT_PASSWORD, CURLOPT_PROXYUSERNAME,
CURLOPT_PROXYPASSWORD, CURLOPT_NOPROXY, CURLOPT_SOCKS5_GSSAPI_NEC,
CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPT_TFTP_BLKSIZE,
CURLOPT_SSH_KNOWNHOSTS, CURLOPT_FTP_USE_PRET, CURLOPT_MAIL_FROM,
CURLOPT_MAIL_RCPT, CURLOPT_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_SERVER_CSEQ,
CURLOPT_CONNECT_ONLY, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE,
CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_SSL_SESSIONID_CACHE,
CURLOPT_FTP_SSL_CCC, CURLOPT_HTTP_CONTENT_DECODING,
CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_PROXY_TRANSFER_MODE,
CURLOPT_ADDRESS_SCOPE, CURLOPT_CRLFILE, CURLOPT_ISSUERCERT,
CURLOPT_USERNAME, CURLOPT_PASSWORD, CURLOPT_PROXYUSERNAME,
CURLOPT_PROXYPASSWORD, CURLOPT_NOPROXY, CURLOPT_SOCKS5_GSSAPI_NEC,
CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPT_TFTP_BLKSIZE,
CURLOPT_SSH_KNOWNHOSTS, CURLOPT_FTP_USE_PRET, CURLOPT_MAIL_FROM,
CURLOPT_MAIL_RCPT, CURLOPT_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_SERVER_CSEQ,
CURLOPT_RTSP_SESSION_ID, CURLOPT_RTSP_STREAM_URI, CURLOPT_RTSP_TRANSPORT,
CURLOPT_RTSP_REQUEST, CURLOPT_RESOLVE, CURLOPT_ACCEPT_ENCODING,
CURLOPT_RTSP_REQUEST, CURLOPT_RESOLVE, CURLOPT_ACCEPT_ENCODING,
CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL.
(Pierrick)
. Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant
@@ -187,8 +398,8 @@ PHP NEWS
. Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)
- Datetime
. Fixed bug #61642 (modify("+5 weekdays") returns Sunday).
(Dmitri Iouchtchenko)
. Fixed bug #61642 (modify("+5 weekdays") returns Sunday).
(Dmitri Iouchtchenko)
- Hash
. Added support for PBKDF2 via hash_pbkdf2(). (Anthony Ferrara)
@@ -283,7 +494,8 @@ PHP NEWS
- MySQLi
. Dropped support for LOAD DATA LOCAL INFILE handlers when using libmysql.
Known for stability problems. (Andrey)
. Added support for SHA256 authentication available with MySQL 5.6.6+. (Andrey)
. Added support for SHA256 authentication available with MySQL 5.6.6+.
(Andrey)
- PCRE:
. Deprecated the /e modifier
@@ -308,6 +520,7 @@ PHP NEWS
(Anatoliy)
- General improvements:
. Implemented FR #46487 (Dereferencing process-handles no longer waits on those processes). (Jille Timmermans)
. Implemented FR #46487 (Dereferencing process-handles no longer waits on
those processes). (Jille Timmermans)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
+11 -2
View File
@@ -64,7 +64,8 @@ Do not use abbreviations for alpha and beta.
``git push --tags origin HEAD``
8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure
and build three tarballs (gz,bz2 and xz).
and build three tarballs (gz,bz2 and xz). Make sure you use the same GNU Bison
version as snaps. Recent bison version are known to break ZTS.
9. Copy those three tarballs to www.php.net, in your homedir there should be a
directory "downloads/". Copy them into there, so that the system can generate
@@ -154,7 +155,15 @@ origin <branch>``".
11. run: ``./makedist php 5.4.1``, this will export the tree, create configure
and build two tarballs (one gz and one bz2).
12. Commit those two tarballs to Git (php-distributions.git)
12. Commit those two tarballs to web/php-distributions.git, then update the git
submodule reference in web/php.git:
git submodule init;
git submodule update;
cd distributions;
git pull origin master;
cd ..;
git commit distributions;
git push;
13. Once the release has been tagged, contact the PHP Windows development team
(internals-win@lists.php.net) so that Windows binaries can be created. Once
+98 -33
View File
@@ -30,38 +30,6 @@ PHP 5.5 UPGRADE NOTES
zend_logo_guid() have been removed
- Removal of Logo GUIDs
- extensions can't override zend_execute() any more, they should override
zend_execute_ex() instead. The EG(current_execute_data) is already
initialized in zend_execute_ex(), so for compatibility extensions
may need to use EG(current_execute_data)->prev_execute_data instead.
- removed EG(arg_types_stack), EX(fbc), EX(called_scope), EX(current_object)
- added op_array->nested_calls. It's calculated at compile time.
- added EX(call_slots). It is an array to store information about syntaticaly
nested calls (e.g. foo(bar())). It's preallocated together with execute_data.
- added EX(call) - pointer to a current calling function. Actually an
element of EX(call_slots)
- opcodes INIT_METHOD_CALL, ZEND_INIT_STATIC_METHOD_CALL,
ZEND_INIT_FCALL_BY_NAME, ZEND_INIT_NS_FCALL_BY_NAME use result.num as
an index in EX(call_slots)
- opcode ZEND_NEW uses extended_vallue as an index in EX(call_slots)
- opcoes ZEND_DO_FCALL and ZEND_DO_FCALL_BY_NAME use op2.num as
an index in EX(call_slots)
- added op_array->used_stack. It's calculated at compile time and the
corresponding stack space is preallocated together with execute_data.
ZEND_SEND* and ZEND_DO_FCALL* don't need to check for stack overflow
anymore.
- Removed execute_data->Ts field. The VM temporary variables always allocated
immediately before execute_data structure. Now they are accessed by offset
from the execute_data base pointer (instead of execute_data->Ts). Compiler
stores new offsets in op_array->opcodes[*].op?.num. You can use macros
EX_TMP_VAR() and EX_TMP_VAR_NUM() to access temp_variable by offset or
number. You can convert number to offset using EX_TMP_VAR_NUM(0, num) or
offset to number (EX_TMP_VAR_NUM(0,0)-EX_TMP_VAR(0,offset)).
- Removed execute_data->CVs field. The VM compiled variables always allocated
immediately after execute_data structure. Now they are accessed by offset
from the execute_data base pointer (instead of execute_data->CVs). You can
use macros EX_CV_NUM() to access compiled variables by number.
========================================
2. New Features
========================================
@@ -79,11 +47,21 @@ PHP 5.5 UPGRADE NOTES
(https://wiki.php.net/rfc/generators)
- ClassName::class syntax returning full class name for a class as
a string constant. (https://wiki.php.net/rfc/class_name_scalars)
- Added support for non-scalar Iterator keys in foreach.
(https://wiki.php.net/rfc/foreach-non-scalar-keys).
- Bundled Zend OPcache extension
(https://wiki.php.net/rfc/optimizerplus)
========================================
2. Changes in SAPI modules
========================================
- Support for changing the process's title in CLI/CLI-Server SAPIs. (Keyur)
(https://wiki.php.net/rfc/cli_process_title)
- Support for systemd in php-fpm:
Add --with-fpm-systemd option to report health to systemd, and
systemd_interval option to configure this. The service can now use
Type=notify in the systemd unit file. (Remi)
========================================
3. Deprecated Functionality
@@ -165,6 +143,7 @@ PHP 5.5 UPGRADE NOTES
========================================
- Core:
- array_column()
- boolval()
- password_get_info()
- password_hash()
@@ -174,6 +153,16 @@ PHP 5.5 UPGRADE NOTES
- cURL:
- curl_file_create
- GD
- imageflip
- imagecrop
- imagecropauto
- imagesetinterpolation
- imageaffine
- imageaffinematrixget
- imageaffinematrixconcat
- imagescale
- Hash:
- hash_pbkdf2()
@@ -266,6 +255,12 @@ PHP 5.5 UPGRADE NOTES
- SPL:
- SplFixedArray::__wakeup()
- SplDoublyLinkedList::add()
- Zend OPcache
- opcache_get_configuration()
- opcache_get_status()
- opcache_reset()
========================================
6. New Classes and Interfaces
@@ -304,13 +299,56 @@ PHP 5.5 UPGRADE NOTES
- cURL:
- Added CURLOPT_SAFE_UPLOAD to be used with curl_setopt().
- Added CURL_WRAPPERS_ENABLED to reflect --with-curlwrappers.
- GD
- Added constants for imageflip:
. IMG_FLIP_HORIZONTAL
. IMG_FLIP_VERTICAL
. IMG_FLIP_BOTH
- Added constants for imagecrop
. IMG_CROP_DEFAULT
. IMG_CROP_TRANSPARENT
. IMG_CROP_BLACK
. IMG_CROP_WHITE
. IMG_CROP_SIDES
. IMG_CROP_THRESHOLD
- Added constants for imagesetinterpolation, used by imagescale
imagerotate and imageaffine:
. IMG_BELL
. IMG_BESSEL
. IMG_BILINEAR_FIXED
. IMG_BICUBIC
. IMG_BICUBIC_FIXED
. IMG_BLACKMAN
. IMG_BOX
. IMG_BSPLINE
. IMG_CATMULLROM
. IMG_GAUSSIAN
. IMG_GENERALIZED_CUBIC
. IMG_HERMITE
. IMG_HAMMING
. IMG_HANNING
. IMG_MITCHELL
. IMG_POWER
. IMG_QUADRATIC
. IMG_SINC
. IMG_NEAREST_NEIGHBOUR
. IMG_WEIGHTED4
. IMG_TRIANGLE
- Added constants for imageaffinematrixget
. IMG_AFFINE_TRANSLATE
. IMG_AFFINE_SCALE
. IMG_AFFINE_ROTATE
. IMG_AFFINE_SHEAR_HORIZONTAL
. IMG_AFFINE_SHEAR_VERTICAL
========================================
10. Changes to INI File Handling
========================================
- Core:
- Added sys_temp_dir INI directive, for specifying temp firectory.
- Added sys_temp_dir INI directive, for specifying temp directory.
- Intl:
- Added intl.use_exceptions INI directive, which controls what happens when
@@ -321,6 +359,33 @@ PHP 5.5 UPGRADE NOTES
APIs which use(are built) for mysqlnd. This allows ext/mysqli to be used
with the new auth protocol, although at coarser level.
- Zend OPcache (See ext/opcache/README for more details)
- Added the following directives:
- opcache.enable (default "1")
- opcache.memory_consumption (default "64")
- opcache.interned_strings_buffer (default "4")
- opcache.max_accelerated_files (default "2000")
- opcache.max_wasted_percentage (default "5")
- opcache.use_cwd (default "1")
- opcache.validate_timestamps (default "1")
- opcache.revalidate_freq (default "2")
- opcache.revalidate_path (default "0")
- opcache.save_comments (default "1")
- opcache.load_comments (default "1")
- opcache.fast_shutdown (default "0")
- opcache.enable_file_override (default "0")
- opcache.optimization_level (default "0xffffffff")
- opcache.inherited_hack (default "1")
- opcache.blacklist_filename (default "")
- opcache.max_file_size (default "0")
- opcache.consistency_checks (default "0")
- opcache.force_restart_timeout (default "180")
- opcache.error_log (default "" which means stderr)
- opcache.log_verbosity_level (default "1")
- opcache.preferred_memory_model (default "")
- opcache.protect_memory (default "0")
- opcache.mmap_base (Windows-only)
========================================
11. Windows Support
========================================
+50 -6
View File
@@ -3,9 +3,11 @@ $Id$
UPGRADE NOTES - PHP X.Y
1. Internal API changes
a. Streams pooling API
b. Lowercasing and locales
c. zend_qsort_r
a. Executor changes
b. Streams pooling API
c. Lowercasing and locales
d. zend_qsort_r
e. get_current_key
2. Build system changes
a. Unix build system changes
@@ -16,7 +18,41 @@ UPGRADE NOTES - PHP X.Y
1. Internal API changes
========================
a. Streams pooling API
a. Executor changes
* extensions can't override zend_execute() any more, they should override
zend_execute_ex() instead. The EG(current_execute_data) is already
initialized in zend_execute_ex(), so for compatibility extensions
may need to use EG(current_execute_data)->prev_execute_data instead.
* removed EG(arg_types_stack), EX(fbc), EX(called_scope), EX(current_object)
* added op_array->nested_calls. It's calculated at compile time.
* added EX(call_slots). It is an array to store information about syntaticaly
nested calls (e.g. foo(bar())). It's preallocated together with execute_data.
* added EX(call) - pointer to a current calling function. Actually an
element of EX(call_slots)
* opcodes INIT_METHOD_CALL, ZEND_INIT_STATIC_METHOD_CALL,
ZEND_INIT_FCALL_BY_NAME, ZEND_INIT_NS_FCALL_BY_NAME use result.num as
an index in EX(call_slots)
* opcode ZEND_NEW uses extended_vallue as an index in EX(call_slots)
* opcoes ZEND_DO_FCALL and ZEND_DO_FCALL_BY_NAME use op2.num as
an index in EX(call_slots)
* added op_array->used_stack. It's calculated at compile time and the
corresponding stack space is preallocated together with execute_data.
ZEND_SEND* and ZEND_DO_FCALL* don't need to check for stack overflow
anymore.
* Removed execute_data->Ts field. The VM temporary variables always allocated
immediately before execute_data structure. Now they are accessed by offset
from the execute_data base pointer (instead of execute_data->Ts). Compiler
stores new offsets in op_array->opcodes[*].op?.num. You can use macros
EX_TMP_VAR() and EX_TMP_VAR_NUM() to access temp_variable by offset or
number. You can convert number to offset using EX_TMP_VAR_NUM(0, num) or
offset to number (EX_TMP_VAR_NUM(0,0)-EX_TMP_VAR(0,offset)).
* Removed execute_data->CVs field. The VM compiled variables always allocated
immediately after execute_data structure. Now they are accessed by offset
from the execute_data base pointer (instead of execute_data->CVs). You can
use macros EX_CV_NUM() to access compiled variables by number.
b. Streams pooling API
The streams pooling API has been removed. The following functions no longer
exist:
@@ -28,7 +64,7 @@ PHPAPI int php_stream_context_set_link(php_stream_context *context,
PHPAPI int php_stream_context_del_link(php_stream_context *context,
php_stream *stream);
b. Lowercasing and locales
c. Lowercasing and locales
The lowercasing functions in zend_operators.c were split into those that do
lowercasing according to locale rules and those that do ASCII lowercasing.
@@ -54,7 +90,7 @@ such as strcasecmp, will be using locale rules.
Two new functions - zend_binary_strncasecmp_l and zend_binary_strcasecmp_l - added as
locale-based counterparts to zend_binary_strcasecmp and zend_binary_strncasecmp.
c. zend_qsort_r
d. zend_qsort_r
Added the function zend_qsort_r():
@@ -64,6 +100,14 @@ void zend_qsort_r(void *base, size_t nmemb, size_t siz, compare_r_func_t compare
The extra argument it has (relatively to zend_qsort()) is passed to the
comparison function.
e. get_current_key
The signature of the get_current_key iteration handler has been changed to:
void (*get_current_key)(zend_object_iterator *iter, zval *key TSRMLS_DC);
The key should be written into the zval* using the ZVAL_* macros.
========================
2. Build system changes
========================
+1 -1
View File
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
AC_DEFUN([LIBZEND_BISON_CHECK],[
# we only support certain bison versions
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2"
bison_version_list="2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
+2
View File
@@ -64,6 +64,8 @@ print "\nDone\n";
--EXPECTF--
Notice: String offset cast occurred in %s on line %d
Notice: Uninitialized string offset: %s in %s on line 6
Notice: Uninitialized string offset: 0 in %s on line %d
Notice: Uninitialized string offset: 0 in %s on line %d
+2
View File
@@ -2,6 +2,8 @@
Bug #43450 (Memory leak on some functions with implicit object __toString() call)
--SKIPIF--
<?php if (!function_exists('memory_get_usage')) die('memory_get_usage() not installed'); ?>
--INI--
opcache.enable_cli=0
--FILE--
<?php
error_reporting(E_ALL|E_STRICT);
+12
View File
@@ -35,18 +35,30 @@ Notice: Undefined variable: x in %sbug52041.php on line 3
Warning: Creating default object from empty value in %sbug52041.php on line 8
Notice: Undefined property: stdClass::$a in %sbug52041.php on line 8
Notice: Undefined variable: x in %sbug52041.php on line 3
Notice: Undefined property: stdClass::$a in %sbug52041.php on line 9
Warning: Creating default object from empty value in %sbug52041.php on line 9
Notice: Undefined property: stdClass::$b in %sbug52041.php on line 9
Notice: Undefined variable: x in %sbug52041.php on line 3
Warning: Creating default object from empty value in %sbug52041.php on line 10
Notice: Undefined property: stdClass::$a in %sbug52041.php on line 10
Notice: Undefined variable: x in %sbug52041.php on line 3
Notice: Undefined property: stdClass::$a in %sbug52041.php on line 11
Warning: Creating default object from empty value in %sbug52041.php on line 11
Notice: Undefined property: stdClass::$b in %sbug52041.php on line 11
Notice: Undefined variable: x in %sbug52041.php on line 3
Notice: Undefined variable: x in %sbug52041.php on line 3
+3
View File
@@ -1,5 +1,8 @@
--TEST--
Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php
+5 -3
View File
@@ -3,18 +3,18 @@ Bug #60536 (Traits Segfault)
--FILE--
<?php
trait T { private $x = 0; }
class X {
class X {
use T;
}
class Y extends X {
use T;
function x() {
return ++$this->x;
return ++$this->x;
}
}
class Z extends Y {
function z() {
return ++$this->x;
return ++$this->x;
}
}
$a = new Z();
@@ -22,4 +22,6 @@ $a->x();
echo "DONE";
?>
--EXPECTF--
Notice: Undefined property: Z::$x in %s on line 14
DONE
+1
View File
@@ -4,6 +4,7 @@ test of larger than 8kb text file being parsed by require statement
<?php
file_put_contents('test.php',str_repeat('passed, ',1024));
require('test.php');
unlink('test.php');
?>
--EXPECT--
passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed,Line truncated
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #61025 (__invoke() visibility not honored)
--FILE--
<?php
Interface InvokeAble {
static function __invoke();
}
class Bar {
private function __invoke() {
return __CLASS__;
}
}
$b = new Bar;
echo $b();
echo $b->__invoke();
?>
--EXPECTF--
Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d
Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d
Bar
Fatal error: Call to private method Bar::__invoke() from context '' in %sbug61025.php on line %d
+2
View File
@@ -9,6 +9,8 @@ function add_points($player, $points) {
add_points(NULL, 2);
--EXPECTF--
Warning: Creating default object from empty value in %sbug62005.php on line %d
Notice: Undefined property: stdClass::$energy in %sbug62005.php on line 3
stdClass Object
(
[energy] => 2
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #62343 (Show class_alias In get_declared_classes())
--FILE--
<?php
class a { }
class_alias("a", "b");
$c = get_declared_classes();
var_dump(end($c));
var_dump(prev($c));
?>
--EXPECT--
string(1) "b"
string(1) "a"
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #63976 (Parent class incorrectly using child constant in class property)
--FILE--
<?php
if (1) {
class Foo {
const TABLE = "foo";
public $table = self::TABLE;
}
}
if (1) {
class Bar extends Foo {
const TABLE = "bar";
}
}
$bar = new Bar();
var_dump($bar->table);
?>
--EXPECT--
string(3) "foo"
+28
View File
@@ -0,0 +1,28 @@
--TEST--
Bug #64239 (get_class_methods() changed behavior)
--FILE--
<?php
class A {
use T2 { t2method as Bmethod; }
}
class B extends A {
}
trait T2 {
public function t2method() {
}
}
print_r(get_class_methods("A"));
print_r(get_class_methods("B"));
--EXPECT--
Array
(
[0] => Bmethod
[1] => t2method
)
Array
(
[0] => Bmethod
[1] => t2method
)
+58
View File
@@ -0,0 +1,58 @@
--TEST--
Bug #64239 (debug_backtrace() changed behavior)
--FILE--
<?php
class A {
use T1;
public function test() { $this->backtrace(); }
}
class B {
use T2 { t2method as Bmethod; }
}
class C extends A {
}
trait T1 {
protected function backtrace() {
$b = new B();
$b->Bmethod();
}
}
trait T2 {
public function t2method() {
print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1));
}
}
$a = new A();
$a->test();
$c = new C();
$c->test();
?>
--EXPECTF--
Array
(
[0] => Array
(
[file] => %sbug64239_2.php
[line] => %d
[function] => Bmethod
[class] => B
[type] => ->
)
)
Array
(
[0] => Array
(
[file] => %sbug64239_2.php
[line] => %d
[function] => Bmethod
[class] => B
[type] => ->
)
)
+33
View File
@@ -0,0 +1,33 @@
--TEST--
Bug #64239 (debug_print_backtrace() changed behavior)
--FILE--
<?php
class A {
use T2 { t2method as Bmethod; }
}
class C extends A {
public function Bmethod() {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
}
}
trait T2 {
public function t2method() {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
}
}
$a = new A();
$a->Bmethod();
$a->t2method();
$c = new C();
$c->Bmethod();
$c->t2method();
?>
--EXPECTF--
#0 A->Bmethod() called at [%sbug64239_3.php:%d]
#0 A->t2method() called at [%sbug64239_3.php:%d]
#0 C->Bmethod() called at [%sbug64239_3.php:%d]
#0 A->t2method() called at [%sbug64239_3.php:%d]
+31
View File
@@ -0,0 +1,31 @@
--TEST--
Bug #64239 (debug_print_backtrace() changed behavior)
--FILE--
<?php
class A {
use T2 { t2method as Bmethod; }
}
class C extends A {
public static function Bmethod() {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
}
}
trait T2 {
public static function t2method() {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
}
}
A::Bmethod();
A::t2method();
C::Bmethod();
C::t2method();
?>
--EXPECTF--
#0 A::Bmethod() called at [%sbug64239_4.php:%d]
#0 A::t2method() called at [%sbug64239_4.php:%d]
#0 C::Bmethod() called at [%sbug64239_4.php:%d]
#0 A::t2method() called at [%sbug64239_4.php:%d]
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
--FILE--
<?php
class B implements Serializable {
public function serialize() {
throw new Exception("serialize");
return NULL;
}
public function unserialize($data) {
}
}
$data = array(new B);
try {
serialize($data);
} catch (Exception $e) {
var_dump($e->getMessage());
}
?>
--EXPECTF--
string(9) "serialize"
+39
View File
@@ -0,0 +1,39 @@
--TEST--
Bug #64417 (BC break: ArrayAccess::&offsetGet() in a trait causes fatal error)
--FILE--
<?php
trait aa {
private $container = array();
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
public function &offsetGet($offset) {
$result = null;
if (isset($this->container[$offset])) {
$result = &$this->container[$offset];
}
return $result;
}
}
class obj implements ArrayAccess {
use aa;
}
$o = new obj;
$o['x'] = 1;
++$o['x'];
echo $o['x'], "\n";
--EXPECT--
2
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
--FILE--
<?php
function foo($unused = null, $unused = null, $arg = array()) {
return 1;
}
foo();
echo "okey";
?>
--EXPECT--
okey
+42
View File
@@ -0,0 +1,42 @@
--TEST--
Bug #64555: Array key within interned string gets wrong hash value
--FILE--
<?php
class Foo {
protected $unsetme = 1;
protected $keepme = 2;
public function test() {
$a = get_object_vars($this);
foreach ($a as $k => $v) {
if ($k == 'unsetme') {
echo "Unsetting: $k\n";
unset($a[$k]);
} else if ($k == 'keepme') {
echo "Changing: $k\n";
$a[$k] = 42;
$a['keepme'] = 43;
}
}
var_dump($a, array_keys($a));
}
}
$f = new Foo;
$f->test();
?>
--EXPECT--
Unsetting: unsetme
Changing: keepme
array(1) {
["keepme"]=>
int(43)
}
array(1) {
[0]=>
string(6) "keepme"
}
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #64578 (debug_backtrace in set_error_handler corrupts zend heap: segfault)
--FILE--
<?php
set_error_handler(function($no, $err) { var_dump($err); });
function x($s) { $s['a'] = 1; };
$y = '1';
x($y);
print_r($y);
--EXPECTF--
string(25) "Illegal string offset 'a'"
1
+11
View File
@@ -0,0 +1,11 @@
--TEST--
Bug #64660 (Segfault on memory exhaustion within function definition)
--FILE--
<?php
function a() {
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Line truncated
}
echo "Done\n";
--EXPECTF--
Parse error: memory exhausted in %s on line %d
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #64677 (execution operator `` stealing surrounding arguments)
--FILE--
<?PHP
class cat {
public function show_output($prepend, $output = '') {
}
}
$cat = new cat();
$cat->show_output('Files: ', trim(`cd .`)); // this gives invalid args to shell_exec
$cat->show_output('Files: ', `cd .`); // this causes a segmentation fault
$cat->show_output(`cd .`); // this causes a segmentation fault
function show_outputa($prepend, $output) {
echo "Okey";
}
show_outputa('Files: ', `cd .`); // this works as expected
?>
--EXPECT--
Okey
+48
View File
@@ -0,0 +1,48 @@
--TEST--
Bug #64720 (SegFault on zend_deactivate)
--FILE--
<?php
class Stat {
private static $requests;
public static function getInstance() {
if (!isset(self::$requests[1])) {
self::$requests[1] = new self();
}
return self::$requests[1];
}
public function __destruct() {
unset(self::$requests[1]);
}
}
class Foo {
public function __construct() {
Stat::getInstance();
}
}
class Error {
private $trace;
public function __construct() {
$this->trace = debug_backtrace(1);
}
}
class Bar {
public function __destruct() {
Stat::getInstance();
new Error();
}
public function test() {
new Error();
}
}
$foo = new Foo();
$bar = new Bar();
$bar->test();
?>
--EXPECTF--
Fatal error: Access to undeclared static property: Stat::$requests in %sbug64720.php on line 12
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 1)
--FILE--
<?php
class a extends exception {
public function __construct() {
$this->message = NULL;
$this->string = NULL;
$this->code = array();
$this->line = "hello";
}
}
throw new a;
?>
--EXPECTF--
Fatal error: Uncaught exception 'a' in %s:0
Stack trace:
#0 {main}
thrown in %s on line %d
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 2)
--FILE--
<?php
class a extends exception {
public function __construct() {
$this->line = array();
}
}
throw new a;
?>
--EXPECTF--
Fatal error: Uncaught exception 'a' in %s:0
Stack trace:
#0 {main}
thrown in %s on line %d
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 3)
--FILE--
<?php
class a extends exception {
public function __construct() {
$this->line = array();
$this->file = NULL;
}
}
throw new a;
?>
--EXPECTF--
Fatal error: Uncaught exception 'a' in :0
Stack trace:
#0 {main}
thrown in Unknown on line %d
+32
View File
@@ -0,0 +1,32 @@
--TEST--
zend_dval_to_lval preserves low bits (32 bit long)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4)
die("skip for machines with 32-bit longs");
?>
--FILE--
<?php
/* test doubles around -4e21 */
$values = [
-4000000000000001048576.,
-4000000000000000524288.,
-4000000000000000000000.,
-3999999999999999475712.,
-3999999999999998951424.,
];
/* see if we're rounding negative numbers right */
$values[] = -2147483649.8;
foreach ($values as $v) {
var_dump((int)$v);
}
?>
--EXPECT--
int(-2056257536)
int(-2055733248)
int(-2055208960)
int(-2054684672)
int(-2054160384)
int(2147483647)
+29
View File
@@ -0,0 +1,29 @@
--TEST--
zend_dval_to_lval preserves low bits (64 bit long)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8)
die("skip for machines with 64-bit longs");
?>
--FILE--
<?php
/* test doubles around -4e21 */
$values = [
-4000000000000001048576.,
-4000000000000000524288.,
-4000000000000000000000.,
-3999999999999999475712.,
-3999999999999998951424.,
];
foreach ($values as $v) {
var_dump((int)$v);
}
?>
--EXPECT--
int(2943463994971652096)
int(2943463994972176384)
int(2943463994972700672)
int(2943463994973224960)
int(2943463994973749248)
+7 -24
View File
@@ -1,32 +1,15 @@
--TEST--
Generators can be cloned
Generators cannot be cloned
--FILE--
<?php
function firstN($end) {
for ($i = 0; $i < $end; ++$i) {
yield $i;
}
function gen() {
yield;
}
$g1 = firstN(5);
var_dump($g1->current());
$g1->next();
$g2 = clone $g1;
var_dump($g2->current());
$g2->next();
var_dump($g2->current());
var_dump($g1->current());
$g1->next();
var_dump($g1->current());
$gen = gen();
clone $gen;
?>
--EXPECT--
int(0)
int(1)
int(2)
int(1)
int(2)
--EXPECTF--
Fatal error: Trying to clone an uncloneable object of class Generator in %s on line %d
@@ -1,20 +0,0 @@
--TEST--
Cloning a generator after an object method was called
--FILE--
<?php
class A { public function b() { } }
function gen() {
$a = new A;
$a->b();
yield;
}
$g1 = gen();
$g1->rewind();
$g2 = clone $g1;
echo "Done";
--EXPECT--
Done
@@ -1,33 +0,0 @@
--TEST--
Cloning a generator with a foreach loop properly adds a ref for the loop var
--FILE--
<?php
function gen() {
foreach ([1, 2, 3] as $i) {
yield $i;
}
}
$g1 = gen();
var_dump($g1->current());
$g2 = clone $g1;
var_dump($g2->current());
$g1->next();
$g2->next();
var_dump($g1->current());
var_dump($g2->current());
unset($g1);
$g2->next();
var_dump($g2->current());
?>
--EXPECT--
int(1)
int(1)
int(2)
int(2)
int(3)
@@ -1,18 +0,0 @@
--TEST--
Tests cloning a generator with properties
--FILE--
<?php
function gen() { yield; }
$g1 = gen();
$g1->prop = 'val';
$g2 = clone $g1;
unset($g1);
var_dump($g2->prop);
?>
--EXPECT--
string(3) "val"
@@ -1,18 +0,0 @@
--TEST--
A generator with an active stack can be cloned
--FILE--
<?php
function gen() {
var_dump(str_repeat("x", yield));
}
$g1 = gen();
$g1->rewind();
$g2 = clone $g1;
unset($g1);
$g2->send(10);
?>
--EXPECT--
string(10) "xxxxxxxxxx"
@@ -1,27 +0,0 @@
--TEST--
A generator using a symbol table can be cloned
--FILE--
<?php
function gen() {
// force compiled variable for $foo
$foo = 'foo';
// force symbol table
extract(['foo' => 'bar']);
// interrupt
yield;
var_dump($foo);
}
$g1 = gen();
$g1->rewind();
$g2 = clone $g1;
unset($g1);
$g2->next();
?>
--EXPECT--
string(3) "bar"
@@ -1,24 +0,0 @@
--TEST--
Cloning a generator method (with $this)
--FILE--
<?php
class Test {
protected $foo;
public function gen() {
$this->foo = 'bar';
yield; // interrupt
var_dump($this->foo);
}
}
$g1 = (new Test)->gen();
$g1->rewind(); // goto yield
$g2 = clone $g1;
unset($g1);
$g2->next();
?>
--EXPECT--
string(3) "bar"
@@ -38,8 +38,6 @@ Stack trace:
#1 %s(%d): unserialize('O:9:"Generator"...')
#2 {main}
Notice: unserialize(): Error at offset 19 of 20 bytes in %s on line %d
exception 'Exception' with message 'Unserialization of 'Generator' is not allowed' in %s:%d
Stack trace:
#0 %s(%d): unserialize('C:9:"Generator"...')
@@ -0,0 +1,52 @@
--TEST--
Generators can return non-scalar keys
--FILE--
<?php
function gen() {
yield [1, 2, 3] => [4, 5, 6];
yield (object) ['a' => 'b'] => (object) ['b' => 'a'];
yield 3.14 => 2.73;
yield false => true;
yield true => false;
yield null => null;
}
foreach (gen() as $k => $v) {
var_dump($k, $v);
}
?>
--EXPECT--
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
array(3) {
[0]=>
int(4)
[1]=>
int(5)
[2]=>
int(6)
}
object(stdClass)#3 (1) {
["a"]=>
string(1) "b"
}
object(stdClass)#4 (1) {
["b"]=>
string(1) "a"
}
float(3.14)
float(2.73)
bool(false)
bool(true)
bool(true)
bool(false)
NULL
NULL
@@ -26,10 +26,7 @@ $g2 = gen(new B);
$g2->current();
$g1->next();
$g3 = clone $g2;
unset($g2);
$g3->next();
$g2->next();
?>
--EXPECT--
@@ -22,14 +22,6 @@ $gen = gen();
$gen->rewind();
unset($gen);
// test cloning
$g1 = gen();
$g1->rewind();
$g2 = clone $g1;
unset($g1);
$g2->send('bar');
?>
--EXPECT--
foo
bar
+2
View File
@@ -1,5 +1,7 @@
--TEST--
026: Name ambiguity (class name & namespace name)
--INI--
opcache.optimization_level=0
--FILE--
<?php
namespace Foo;
+34
View File
@@ -0,0 +1,34 @@
--TEST--
Bug #64235 (Insteadof not work for class method in 5.4.11)
--FILE--
<?php
class TestParentClass
{
public function method()
{
print_r('Parent method');
print "\n";
}
}
trait TestTrait
{
public function method()
{
print_r('Trait method');
print "\n";
}
}
class TestChildClass extends TestParentClass
{
use TestTrait
{
TestTrait::method as methodAlias;
TestParentClass::method insteadof TestTrait;
}
}
?>
--EXPECTF--
Fatal error: Class TestParentClass is not a trait, Only traits may be used in 'as' and 'insteadof' statements in %sbug64235.php on line %d
+35
View File
@@ -0,0 +1,35 @@
--TEST--
Bug #64235 (Insteadof not work for class method in 5.4.11)
--FILE--
<?php
class TestParentClass
{
public function method()
{
print_r('Parent method');
print "\n";
}
}
trait TestTrait
{
public function method()
{
print_r('Trait method');
print "\n";
}
}
class TestChildClass extends TestParentClass
{
use TestTrait
{
TestTrait::method as methodAlias;
TestParentClass::method as TestParent;
}
}
?>
--EXPECTF--
Fatal error: Class TestParentClass is not a trait, Only traits may be used in 'as' and 'insteadof' statements in %sbug64235b.php on line %d
+1 -1
View File
@@ -14,4 +14,4 @@ class C {
}
}
--EXPECTF--
Fatal error: Trait T2 is not used in %s on line %d
Fatal error: Required Trait T2 wasn't added to C in %slanguage015.php on line %d
+1 -1
View File
@@ -14,4 +14,4 @@ class C {
}
}
--EXPECTF--
Fatal error: Trait T2 is not used in %s on line %d
Fatal error: Required Trait T2 wasn't added to C in %slanguage016.php on line %d
+1 -1
View File
@@ -14,4 +14,4 @@ class C {
}
}
--EXPECTF--
Fatal error: Trait T2 is not used in %s on line %d
Fatal error: Required Trait T2 wasn't added to C in %slanguage017.php on line %d
+5 -2
View File
@@ -299,7 +299,6 @@ void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((nore
/*
* zval
*/
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_guard {
@@ -365,6 +364,10 @@ struct _zval_struct {
#define Z_UNSET_ISREF(z) Z_UNSET_ISREF_P(&(z))
#define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref)
#if ZEND_DEBUG
#define zend_always_inline inline
#define zend_never_inline
#else
#if defined(__GNUC__)
#if __GNUC__ >= 3
#define zend_always_inline inline __attribute__((always_inline))
@@ -373,7 +376,6 @@ struct _zval_struct {
#define zend_always_inline inline
#define zend_never_inline
#endif
#elif defined(_MSC_VER)
#define zend_always_inline __forceinline
#define zend_never_inline
@@ -381,6 +383,7 @@ struct _zval_struct {
#define zend_always_inline inline
#define zend_never_inline
#endif
#endif /* ZEND_DEBUG */
#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
# define EXPECTED(condition) __builtin_expect(condition, 1)
+127 -2
View File
@@ -1051,6 +1051,41 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destro
}
/* }}} */
static int zval_update_class_constant(zval **pp, int is_static, int offset TSRMLS_DC) /* {{{ */
{
if ((Z_TYPE_PP(pp) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT ||
(Z_TYPE_PP(pp) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT_ARRAY) {
zend_class_entry **scope = EG(in_execution)?&EG(scope):&CG(active_class_entry);
if ((*scope)->parent) {
zend_class_entry *ce = *scope;
HashPosition pos;
zend_property_info *prop_info;
do {
for (zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos);
zend_hash_get_current_data_ex(&ce->properties_info, (void **) &prop_info, &pos) == SUCCESS;
zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
if (is_static == ((prop_info->flags & ZEND_ACC_STATIC) != 0) &&
offset == prop_info->offset) {
int ret;
zend_class_entry *old_scope = *scope;
*scope = prop_info->ce;
ret = zval_update_constant(pp, (void*)1 TSRMLS_CC);
*scope = old_scope;
return ret;
}
}
ce = ce->parent;
} while (ce);
}
return zval_update_constant(pp, (void*)1 TSRMLS_CC);
}
return 0;
}
/* }}} */
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
if ((class_type->ce_flags & ZEND_ACC_CONSTANTS_UPDATED) == 0 || (!CE_STATIC_MEMBERS(class_type) && class_type->default_static_members_count)) {
@@ -1063,7 +1098,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
for (i = 0; i < class_type->default_properties_count; i++) {
if (class_type->default_properties_table[i]) {
zval_update_constant(&class_type->default_properties_table[i], (void**)1 TSRMLS_CC);
zval_update_class_constant(&class_type->default_properties_table[i], 0, i TSRMLS_CC);
}
}
@@ -1104,7 +1139,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
}
for (i = 0; i < class_type->default_static_members_count; i++) {
zval_update_constant(&CE_STATIC_MEMBERS(class_type)[i], (void**)1 TSRMLS_CC);
zval_update_class_constant(&CE_STATIC_MEMBERS(class_type)[i], 1, i TSRMLS_CC);
}
*scope = old_scope;
@@ -1502,6 +1537,40 @@ ZEND_API int add_get_index_stringl(zval *arg, ulong index, const char *str, uint
}
/* }}} */
ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
{
int result;
switch (Z_TYPE_P(key)) {
case IS_STRING:
result = zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &value, sizeof(zval *), NULL);
break;
case IS_NULL:
result = zend_symtable_update(ht, "", 1, &value, sizeof(zval *), NULL);
break;
case IS_RESOURCE:
zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(key), Z_LVAL_P(key));
/* break missing intentionally */
case IS_BOOL:
case IS_LONG:
result = zend_hash_index_update(ht, Z_LVAL_P(key), &value, sizeof(zval *), NULL);
break;
case IS_DOUBLE:
result = zend_hash_index_update(ht, zend_dval_to_lval(Z_DVAL_P(key)), &value, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
result = FAILURE;
}
if (result == SUCCESS) {
Z_ADDREF_P(value);
}
return result;
}
/* }}} */
ZEND_API int add_property_long_ex(zval *arg, const char *key, uint key_len, long n TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3907,6 +3976,62 @@ ZEND_API void zend_restore_error_handling(zend_error_handling *saved TSRMLS_DC)
}
/* }}} */
ZEND_API const char* zend_find_alias_name(zend_class_entry *ce, const char *name, zend_uint len) /* {{{ */
{
zend_trait_alias *alias, **alias_ptr;
alias_ptr = ce->trait_aliases;
alias = *alias_ptr;
while (alias) {
if (alias->alias_len == len &&
!strncasecmp(name, alias->alias, alias->alias_len)) {
return alias->alias;
}
alias_ptr++;
alias = *alias_ptr;
}
return name;
}
/* }}} */
ZEND_API const char* zend_resolve_method_name(zend_class_entry *ce, zend_function *f) /* {{{ */
{
zend_function *func;
HashPosition iterator;
HashTable *function_table;
if (f->common.type != ZEND_USER_FUNCTION ||
*(f->op_array.refcount) < 2 ||
!f->common.scope ||
!f->common.scope->trait_aliases) {
return f->common.function_name;
}
function_table = &ce->function_table;
zend_hash_internal_pointer_reset_ex(function_table, &iterator);
while (zend_hash_get_current_data_ex(function_table, (void **)&func, &iterator) == SUCCESS) {
if (func == f) {
char *name;
uint len;
ulong idx;
if (zend_hash_get_current_key_ex(function_table, &name, &len, &idx, 0, &iterator) != HASH_KEY_IS_STRING) {
return f->common.function_name;
}
--len;
if (len == strlen(f->common.function_name) &&
!strncasecmp(name, f->common.function_name, len)) {
return f->common.function_name;
}
return zend_find_alias_name(f->common.scope, name, len);
}
zend_hash_move_forward_ex(function_table, &iterator);
}
return f->common.function_name;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
+6 -1
View File
@@ -90,7 +90,7 @@ typedef struct _zend_fcall_info_cache {
#define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags)
#define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)
#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0)
#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, zend_name, name, arg_info, 0)
#define ZEND_NS_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0)
#define ZEND_NS_DEP_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)
@@ -426,6 +426,8 @@ ZEND_API int add_get_index_double(zval *arg, ulong idx, double d, void **dest);
ZEND_API int add_get_index_string(zval *arg, ulong idx, const char *str, void **dest, int duplicate);
ZEND_API int add_get_index_stringl(zval *arg, ulong idx, const char *str, uint length, void **dest, int duplicate);
ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value);
ZEND_API int add_property_long_ex(zval *arg, const char *key, uint key_len, long l TSRMLS_DC);
ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRMLS_DC);
ZEND_API int add_property_bool_ex(zval *arg, const char *key, uint key_len, int b TSRMLS_DC);
@@ -519,6 +521,9 @@ ZEND_API void zend_reset_all_cv(HashTable *symbol_table TSRMLS_DC);
ZEND_API void zend_rebuild_symbol_table(TSRMLS_D);
ZEND_API const char* zend_find_alias_name(zend_class_entry *ce, const char *name, zend_uint len);
ZEND_API const char* zend_resolve_method_name(zend_class_entry *ce, zend_function *f);
#define add_method(arg, key, method) add_assoc_function((arg), (key), (method))
ZEND_API ZEND_FUNCTION(display_disabled_function);
+13 -4
View File
@@ -672,7 +672,7 @@ static inline unsigned int zend_mm_high_bit(size_t _size)
#elif defined(__GNUC__) && defined(__x86_64__)
unsigned long n;
__asm__("bsrq %1,%0\n\t" : "=r" (n) : "rm" (_size) : "cc");
__asm__("bsr %1,%0\n\t" : "=r" (n) : "rm" (_size) : "cc");
return (unsigned int)n;
#elif defined(_MSC_VER) && defined(_M_IX86)
__asm {
@@ -700,12 +700,12 @@ static inline unsigned int zend_mm_low_bit(size_t _size)
#elif defined(__GNUC__) && defined(__x86_64__)
unsigned long n;
__asm__("bsfq %1,%0\n\t" : "=r" (n) : "rm" (_size) : "cc");
__asm__("bsf %1,%0\n\t" : "=r" (n) : "rm" (_size) : "cc");
return (unsigned int)n;
#elif defined(_MSC_VER) && defined(_M_IX86)
__asm {
bsf eax, _size
}
}
#elif defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__))
return __builtin_ctzl(_size);
#else
@@ -2485,12 +2485,21 @@ static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
__asm__ ("mulq %3\n\taddq %4,%0\n\tadcq %1,%1"
#ifdef __ILP32__ /* x32 */
# define LP_SUFF "l"
#else /* amd64 */
# define LP_SUFF "q"
#endif
__asm__ ("mul" LP_SUFF " %3\n\t"
"add %4,%0\n\t"
"adc %1,%1"
: "=&a"(res), "=&d" (overflow)
: "%0"(res),
"rm"(size),
"rm"(offset));
#undef LP_SUFF
if (UNEXPECTED(overflow)) {
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset);
return 0;
+48 -10
View File
@@ -1014,7 +1014,7 @@ ZEND_FUNCTION(get_object_vars)
while (zend_hash_get_current_data_ex(properties, (void **) &value, &pos) == SUCCESS) {
if (zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos) == HASH_KEY_IS_STRING) {
if (zend_check_property_access(zobj, key, key_len-1 TSRMLS_CC) == SUCCESS) {
zend_unmangle_property_name_ex(key, key_len - 1, &class_name, &prop_name, &prop_len);
zend_unmangle_property_name_ex(key, key_len - 1, &class_name, &prop_name, (int*) &prop_len);
/* Not separating references */
Z_ADDREF_PP(value);
add_assoc_zval_ex(return_value, prop_name, prop_len + 1, *value);
@@ -1025,6 +1025,13 @@ ZEND_FUNCTION(get_object_vars)
}
/* }}} */
static int same_name(const char *key, const char *name, zend_uint name_len)
{
char *lcname = zend_str_tolower_dup(name, name_len);
int ret = memcmp(lcname, key, name_len) == 0;
efree(lcname);
return ret;
}
/* {{{ proto array get_class_methods(mixed class)
Returns an array of method names for class or class instance. */
@@ -1072,14 +1079,26 @@ ZEND_FUNCTION(get_class_methods)
uint len = strlen(mptr->common.function_name);
/* Do not display old-style inherited constructors */
if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0 ||
mptr->common.scope == ce ||
zend_hash_get_current_key_ex(&ce->function_table, &key, &key_len, &num_index, 0, &pos) != HASH_KEY_IS_STRING ||
zend_binary_strcasecmp(key, key_len-1, mptr->common.function_name, len) == 0) {
if (zend_hash_get_current_key_ex(&ce->function_table, &key, &key_len, &num_index, 0, &pos) != HASH_KEY_IS_STRING) {
MAKE_STD_ZVAL(method_name);
ZVAL_STRINGL(method_name, mptr->common.function_name, len, 1);
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
} else if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0 ||
mptr->common.scope == ce ||
zend_binary_strcasecmp(key, key_len-1, mptr->common.function_name, len) == 0) {
if (mptr->type == ZEND_USER_FUNCTION &&
*mptr->op_array.refcount > 1 &&
(len != key_len - 1 ||
!same_name(key, mptr->common.function_name, len))) {
MAKE_STD_ZVAL(method_name);
ZVAL_STRINGL(method_name, zend_find_alias_name(mptr->common.scope, key, key_len - 1), key_len - 1, 1);
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
} else {
MAKE_STD_ZVAL(method_name);
ZVAL_STRINGL(method_name, mptr->common.function_name, len, 1);
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
}
}
}
zend_hash_move_forward_ex(&ce->function_table, &pos);
@@ -1625,7 +1644,6 @@ ZEND_FUNCTION(restore_exception_handler)
}
/* }}} */
static int copy_class_or_interface_name(zend_class_entry **pce TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
{
zval *array = va_arg(args, zval *);
@@ -1636,7 +1654,13 @@ static int copy_class_or_interface_name(zend_class_entry **pce TSRMLS_DC, int nu
if ((hash_key->nKeyLength==0 || hash_key->arKey[0]!=0)
&& (comply_mask == (ce->ce_flags & mask))) {
add_next_index_stringl(array, ce->name, ce->name_length, 1);
if (ce->refcount > 1 &&
(ce->name_length != hash_key->nKeyLength - 1 ||
!same_name(hash_key->arKey, ce->name, ce->name_length))) {
add_next_index_stringl(array, hash_key->arKey, hash_key->nKeyLength - 1, 1);
} else {
add_next_index_stringl(array, ce->name, ce->name_length, 1);
}
}
return ZEND_HASH_APPLY_KEEP;
}
@@ -2079,7 +2103,14 @@ ZEND_FUNCTION(debug_print_backtrace)
lineno = 0;
}
function_name = ptr->function_state.function->common.function_name;
function_name = (ptr->function_state.function->common.scope &&
ptr->function_state.function->common.scope->trait_aliases) ?
zend_resolve_method_name(
ptr->object ?
Z_OBJCE_P(ptr->object) :
ptr->function_state.function->common.scope,
ptr->function_state.function) :
ptr->function_state.function->common.function_name;
if (function_name) {
if (ptr->object) {
@@ -2260,7 +2291,14 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
filename = NULL;
}
function_name = ptr->function_state.function->common.function_name;
function_name = (ptr->function_state.function->common.scope &&
ptr->function_state.function->common.scope->trait_aliases) ?
zend_resolve_method_name(
ptr->object ?
Z_OBJCE_P(ptr->object) :
ptr->function_state.function->common.scope,
ptr->function_state.function) :
ptr->function_state.function->common.function_name;
if (function_name) {
add_assoc_string_ex(stack_frame, "function", sizeof("function"), (char*)function_name, 1);
+8 -9
View File
@@ -5,7 +5,7 @@
| Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
@@ -88,7 +88,7 @@ ZEND_METHOD(Closure, bind)
RETURN_NULL();
}
closure = (zend_closure *)zend_object_store_get_object(zclosure TSRMLS_CC);
closure = (zend_closure *)zend_object_store_get_object(zclosure TSRMLS_CC);
if ((newthis != NULL) && (closure->func.common.fn_flags & ZEND_ACC_STATIC)) {
zend_error(E_WARNING, "Cannot bind an instance to a static closure");
@@ -152,7 +152,7 @@ static int zend_closure_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */
ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC) /* {{{ */
{
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
zend_function *invoke = (zend_function*)emalloc(sizeof(zend_function));
invoke->common = closure->func.common;
@@ -168,14 +168,14 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC) /* {
ZEND_API const zend_function *zend_get_closure_method_def(zval *obj TSRMLS_DC) /* {{{ */
{
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
return &closure->func;
}
/* }}} */
ZEND_API zval* zend_get_closure_this_ptr(zval *obj TSRMLS_DC) /* {{{ */
{
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
return closure->this_ptr;
}
/* }}} */
@@ -212,7 +212,7 @@ static void zend_closure_write_property(zval *object, zval *member, zval *value,
}
/* }}} */
static zval **zend_closure_get_property_ptr_ptr(zval *object, zval *member, const zend_literal *key TSRMLS_DC) /* {{{ */
static zval **zend_closure_get_property_ptr_ptr(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) /* {{{ */
{
ZEND_CLOSURE_PROPERTY_ERROR();
return NULL;
@@ -291,7 +291,6 @@ static zend_object_value zend_closure_clone(zval *zobject TSRMLS_DC) /* {{{ */
}
/* }}} */
int zend_closure_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval **zobj_ptr TSRMLS_DC) /* {{{ */
{
zend_closure *closure;
@@ -378,7 +377,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
static HashTable *zend_closure_get_gc(zval *obj, zval ***table, int *n TSRMLS_DC) /* {{{ */
{
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
*table = closure->this_ptr ? &closure->this_ptr : NULL;
*n = closure->this_ptr ? 1 : 0;
@@ -474,7 +473,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
zend_error(E_WARNING, "Cannot bind function %s::%s to scope class %s", func->common.scope->name, func->common.function_name, scope->name);
scope = NULL;
}
if(scope && this_ptr && (func->common.fn_flags & ZEND_ACC_STATIC) == 0 &&
if(scope && this_ptr && (func->common.fn_flags & ZEND_ACC_STATIC) == 0 &&
!instanceof_function(Z_OBJCE_P(this_ptr), closure->func.common.scope TSRMLS_CC)) {
zend_error(E_WARNING, "Cannot bind function %s::%s to object of class %s", func->common.scope->name, func->common.function_name, Z_OBJCE_P(this_ptr)->name);
scope = NULL;
-2
View File
@@ -24,8 +24,6 @@
BEGIN_EXTERN_C()
#define ZEND_INVOKE_FUNC_NAME "__invoke"
void zend_register_closure_ce(TSRMLS_D);
extern ZEND_API zend_class_entry *zend_ce_closure;
+20 -6
View File
@@ -288,7 +288,7 @@ ZEND_API zend_bool zend_is_compiling(TSRMLS_D) /* {{{ */
static zend_uint get_temporary_variable(zend_op_array *op_array) /* {{{ */
{
return (zend_uint)EX_TMP_VAR_NUM(0, (op_array->T)++);
return (zend_uint)(zend_uintptr_t)EX_TMP_VAR_NUM(0, (op_array->T)++);
}
/* }}} */
@@ -1621,6 +1621,10 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) {
zend_error(E_WARNING, "The magic method __toString() must have public visibility and cannot be static");
}
} else if ((name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1))) {
if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) {
zend_error(E_WARNING, "The magic method __invoke() must have public visibility and cannot be static");
}
}
} else {
char *class_lcname;
@@ -1677,6 +1681,10 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zend_error(E_WARNING, "The magic method __toString() must have public visibility and cannot be static");
}
CG(active_class_entry)->__tostring = (zend_function *) CG(active_op_array);
} else if ((name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1))) {
if (fn_flags & ((ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC) ^ ZEND_ACC_PUBLIC)) {
zend_error(E_WARNING, "The magic method __invoke() must have public visibility and cannot be static");
}
} else if (!(fn_flags & ZEND_ACC_STATIC)) {
CG(active_op_array)->fn_flags |= ZEND_ACC_ALLOW_STATIC;
}
@@ -1801,7 +1809,7 @@ void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /*
zend_do_return(NULL, 0 TSRMLS_CC);
pass_two(CG(active_op_array) TSRMLS_CC);
zend_release_labels(TSRMLS_C);
zend_release_labels(0 TSRMLS_CC);
if (CG(active_class_entry)) {
zend_check_magic_method_implementation(CG(active_class_entry), (zend_function*)CG(active_op_array), E_COMPILE_ERROR TSRMLS_CC);
@@ -2383,13 +2391,14 @@ void zend_do_goto(const znode *label TSRMLS_DC) /* {{{ */
}
/* }}} */
void zend_release_labels(TSRMLS_D) /* {{{ */
void zend_release_labels(int temporary TSRMLS_DC) /* {{{ */
{
if (CG(context).labels) {
zend_hash_destroy(CG(context).labels);
FREE_HASHTABLE(CG(context).labels);
CG(context).labels = NULL;
}
if (!zend_stack_is_empty(&CG(context_stack))) {
if (!temporary && !zend_stack_is_empty(&CG(context_stack))) {
zend_compiler_context *ctx;
zend_stack_top(&CG(context_stack), (void**)&ctx);
@@ -3823,7 +3832,7 @@ static zend_bool zend_traits_method_compatibility_check(zend_function *fn, zend_
zend_uint other_flags = other_fn->common.scope->ce_flags;
return zend_do_perform_implementation_check(fn, other_fn TSRMLS_CC)
&& zend_do_perform_implementation_check(other_fn, fn TSRMLS_CC)
&& ((other_fn->common.scope->ce_flags & ZEND_ACC_INTERFACE) || zend_do_perform_implementation_check(other_fn, fn TSRMLS_CC))
&& ((fn_flags & (ZEND_ACC_FINAL|ZEND_ACC_STATIC)) ==
(other_flags & (ZEND_ACC_FINAL|ZEND_ACC_STATIC))); /* equal final and static qualifier */
}
@@ -4048,12 +4057,16 @@ static void zend_check_trait_usage(zend_class_entry *ce, zend_class_entry *trait
{
zend_uint i;
if ((trait->ce_flags & ZEND_ACC_TRAIT) != ZEND_ACC_TRAIT) {
zend_error(E_COMPILE_ERROR, "Class %s is not a trait, Only traits may be used in 'as' and 'insteadof' statements", trait->name);
}
for (i = 0; i < ce->num_traits; i++) {
if (ce->traits[i] == trait) {
return;
}
}
zend_error(E_COMPILE_ERROR, "Trait %s is not used", trait->name);
zend_error(E_COMPILE_ERROR, "Required Trait %s wasn't added to %s", trait->name, ce->name);
}
/* }}} */
@@ -5689,6 +5702,7 @@ void zend_do_shell_exec(znode *result, const znode *cmd TSRMLS_DC) /* {{{ */
GET_CACHE_SLOT(opline->op1.constant);
opline->extended_value = 1;
SET_UNUSED(opline->op2);
opline->op2.num = CG(context).nested_calls;
GET_NODE(result, opline->result);
if (CG(context).nested_calls + 1 > CG(active_op_array)->nested_calls) {
+2 -1
View File
@@ -643,7 +643,7 @@ void zend_do_resolve_class_name(znode *result, znode *class_name, int is_static
void zend_do_label(znode *label TSRMLS_DC);
void zend_do_goto(const znode *label TSRMLS_DC);
void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC);
void zend_release_labels(TSRMLS_D);
void zend_release_labels(int temporary TSRMLS_DC);
ZEND_API void function_add_ref(zend_function *function);
@@ -856,6 +856,7 @@ END_EXTERN_C()
#define ZEND_CALLSTATIC_FUNC_NAME "__callstatic"
#define ZEND_TOSTRING_FUNC_NAME "__tostring"
#define ZEND_AUTOLOAD_FUNC_NAME "__autoload"
#define ZEND_INVOKE_FUNC_NAME "__invoke"
/* The following constants may be combined in CG(compiler_options)
* to change the default compiler behavior */
+9 -1
View File
@@ -817,6 +817,10 @@ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {
if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) {
file = zend_read_property(default_exception_ce, EG(exception), "file", sizeof("file")-1, 1 TSRMLS_CC);
line = zend_read_property(default_exception_ce, EG(exception), "line", sizeof("line")-1, 1 TSRMLS_CC);
convert_to_string(file);
file = (Z_STRLEN_P(file) > 0) ? file : NULL;
line = (Z_TYPE_P(line) == IS_LONG) ? line : NULL;
} else {
file = NULL;
line = NULL;
@@ -828,7 +832,11 @@ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {
file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC);
line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC);
zend_error_va(severity, Z_STRVAL_P(file), Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str));
convert_to_string(str);
convert_to_string(file);
convert_to_long(line);
zend_error_va(severity, (Z_STRLEN_P(file) > 0) ? Z_STRVAL_P(file) : NULL, Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str));
} else {
zend_error(severity, "Uncaught exception '%s'", ce_exception->name);
}
+11 -13
View File
@@ -898,13 +898,10 @@ static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value
} else if (EXPECTED(!PZVAL_IS_REF(value))) {
Z_ADDREF_P(value);
*variable_ptr_ptr = value;
if (EXPECTED(variable_ptr != &EG(uninitialized_zval))) {
GC_REMOVE_ZVAL_FROM_BUFFER(variable_ptr);
zval_dtor(variable_ptr);
efree(variable_ptr);
} else {
Z_DELREF_P(variable_ptr);
}
ZEND_ASSERT(variable_ptr != &EG(uninitialized_zval));
GC_REMOVE_ZVAL_FROM_BUFFER(variable_ptr);
zval_dtor(variable_ptr);
efree(variable_ptr);
return value;
} else {
goto copy_value;
@@ -1147,6 +1144,10 @@ convert_to_array:
zend_error_noreturn(E_ERROR, "[] operator not supported for strings");
}
if (type != BP_VAR_UNSET) {
SEPARATE_ZVAL_IF_NOT_REF(container_ptr);
}
if (Z_TYPE_P(dim) != IS_LONG) {
switch(Z_TYPE_P(dim)) {
@@ -1175,9 +1176,6 @@ convert_to_array:
convert_to_long(&tmp);
dim = &tmp;
}
if (type != BP_VAR_UNSET) {
SEPARATE_ZVAL_IF_NOT_REF(container_ptr);
}
container = *container_ptr;
result->str_offset.str = container;
PZVAL_LOCK(container);
@@ -1384,7 +1382,7 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
}
if (Z_OBJ_HT_P(container)->get_property_ptr_ptr) {
zval **ptr_ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr, key TSRMLS_CC);
zval **ptr_ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr, type, key TSRMLS_CC);
if (NULL == ptr_ptr) {
zval *ptr;
@@ -1523,9 +1521,9 @@ void zend_free_compiled_variables(zend_execute_data *execute_data) /* {{{ */
}
/* }}} */
/*
/*
* Stack Frame Layout (the whole stack frame is allocated at once)
* ==================
* ==================
*
* +========================================+
* | zend_execute_data |<---+
+1 -1
View File
@@ -1295,7 +1295,7 @@ void execute_new_code(TSRMLS_D) /* {{{ */
opline++;
}
zend_release_labels(TSRMLS_C);
zend_release_labels(1 TSRMLS_CC);
EG(return_value_ptr_ptr) = NULL;
EG(active_op_array) = CG(active_op_array);
+4 -2
View File
@@ -65,11 +65,13 @@ extern ZEND_API void zend_ensure_fpu_mode(TSRMLS_D);
MS Visual C:
- Since MSVC users tipically don't use autoconf or CMake, we will detect
MSVC via compile time define.
MSVC via compile time define. Floating point precision change isn't
supported on 64 bit platforms, so it's NOP. See
http://msdn.microsoft.com/en-us/library/c9676k6h(v=vs.110).aspx
*/
/* MSVC detection (MSVC people usually don't use autoconf) */
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(_WIN64)
# if _MSC_VER >= 1500
/* Visual C++ 2008 or higher, supports _controlfp_s */
# define HAVE__CONTROLFP_S
+6 -189
View File
@@ -196,175 +196,6 @@ static void zend_generator_free_storage(zend_generator *generator TSRMLS_DC) /*
}
/* }}} */
static zend_object_value zend_generator_clone(zval *object TSRMLS_DC) /* {{{ */
{
zend_generator *orig = zend_object_store_get_object(object TSRMLS_CC);
zend_object_value clone_val = zend_generator_create(Z_OBJCE_P(object) TSRMLS_CC);
zend_generator *clone = zend_object_store_get_object_by_handle(clone_val.handle TSRMLS_CC);
zend_objects_clone_members(
&clone->std, clone_val, &orig->std, Z_OBJ_HANDLE_P(object) TSRMLS_CC
);
clone->execute_data = orig->execute_data;
clone->largest_used_integer_key = orig->largest_used_integer_key;
clone->flags = orig->flags;
if (orig->execute_data) {
/* Create a few shorter aliases to the old execution data */
zend_execute_data *execute_data = orig->execute_data;
zend_op_array *op_array = execute_data->op_array;
HashTable *symbol_table = execute_data->symbol_table;
zend_execute_data *current_execute_data;
zend_op **opline_ptr;
HashTable *current_symbol_table;
zend_vm_stack current_stack;
zval *current_this;
void **stack_frame, **orig_stack_frame;
/* Create new execution context. We have to back up and restore
* EG(current_execute_data), EG(opline_ptr), EG(active_symbol_table)
* and EG(This) here because the function modifies or uses them */
current_execute_data = EG(current_execute_data);
EG(current_execute_data) = execute_data->prev_execute_data;
opline_ptr = EG(opline_ptr);
current_symbol_table = EG(active_symbol_table);
EG(active_symbol_table) = execute_data->symbol_table;
current_this = EG(This);
EG(This) = NULL;
current_stack = EG(argument_stack);
clone->execute_data = zend_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC);
clone->stack = EG(argument_stack);
EG(argument_stack) = current_stack;
EG(This) = current_this;
EG(active_symbol_table) = current_symbol_table;
EG(current_execute_data) = current_execute_data;
EG(opline_ptr) = opline_ptr;
/* copy */
clone->execute_data->opline = execute_data->opline;
clone->execute_data->function_state = execute_data->function_state;
clone->execute_data->object = execute_data->object;
clone->execute_data->current_scope = execute_data->current_scope;
clone->execute_data->current_called_scope = execute_data->current_called_scope;
clone->execute_data->fast_ret = execute_data->fast_ret;
if (!symbol_table) {
int i;
/* Copy compiled variables */
for (i = 0; i < op_array->last_var; i++) {
if (*EX_CV_NUM(execute_data, i)) {
*EX_CV_NUM(clone->execute_data, i) = (zval **) EX_CV_NUM(clone->execute_data, op_array->last_var + i);
**EX_CV_NUM(clone->execute_data, i) = *(zval **) EX_CV_NUM(execute_data, op_array->last_var + i);
Z_ADDREF_PP(*EX_CV_NUM(clone->execute_data, i));
}
}
} else {
/* Copy symbol table */
ALLOC_HASHTABLE(clone->execute_data->symbol_table);
zend_hash_init(clone->execute_data->symbol_table, zend_hash_num_elements(symbol_table), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(clone->execute_data->symbol_table, symbol_table, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
/* Update zval** pointers for compiled variables */
{
int i;
for (i = 0; i < op_array->last_var; i++) {
if (zend_hash_quick_find(clone->execute_data->symbol_table, op_array->vars[i].name, op_array->vars[i].name_len + 1, op_array->vars[i].hash_value, (void **) EX_CV_NUM(clone->execute_data, i)) == FAILURE) {
*EX_CV_NUM(clone->execute_data, i) = NULL;
}
}
}
}
/* Copy nested-calls stack */
if (execute_data->call) {
clone->execute_data->call = clone->execute_data->call_slots +
(execute_data->call - execute_data->call_slots);
} else {
clone->execute_data->call = NULL;
}
memcpy(clone->execute_data->call_slots, execute_data->call_slots, ZEND_MM_ALIGNED_SIZE(sizeof(call_slot)) * op_array->nested_calls);
if (clone->execute_data->call >= clone->execute_data->call_slots) {
call_slot *call = clone->execute_data->call;
while (call >= clone->execute_data->call_slots) {
if (call->object) {
Z_ADDREF_P(call->object);
}
call--;
}
}
/* Copy the temporary variables */
memcpy(EX_TMP_VAR_NUM(clone->execute_data, op_array->T-1), EX_TMP_VAR_NUM(execute_data, op_array->T-1), ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T);
/* Copy arguments passed on stack */
stack_frame = zend_vm_stack_frame_base(clone->execute_data);
orig_stack_frame = zend_vm_stack_frame_base(execute_data);
clone->stack->top = stack_frame + (orig->stack->top - orig_stack_frame);
if (clone->stack->top != stack_frame) {
memcpy(stack_frame, orig_stack_frame, ZEND_MM_ALIGNED_SIZE(sizeof(zval*)) * (orig->stack->top - orig_stack_frame));
while (clone->stack->top != stack_frame) {
Z_ADDREF_PP((zval**)stack_frame);
stack_frame++;
}
}
/* Add references to loop variables */
{
zend_uint op_num = execute_data->opline - op_array->opcodes;
int i;
for (i = 0; i < op_array->last_brk_cont; ++i) {
zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
if (brk_cont->start < 0) {
continue;
} else if (brk_cont->start > op_num) {
break;
} else if (brk_cont->brk > op_num) {
zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
if (brk_opline->opcode == ZEND_SWITCH_FREE) {
temp_variable *var = EX_TMP_VAR(execute_data, brk_opline->op1.var);
Z_ADDREF_P(var->var.ptr);
}
}
}
}
/* Update the send_target to use the temporary variable with the same
* offset as the original generator, but in our temporary variable
* memory segment. */
if (orig->send_target) {
size_t offset = (char *) orig->send_target - (char *)execute_data;
clone->send_target = EX_TMP_VAR(clone->execute_data, offset);
zval_copy_ctor(&clone->send_target->tmp_var);
}
if (execute_data->current_this) {
clone->execute_data->current_this = execute_data->current_this;
Z_ADDREF_P(execute_data->current_this);
}
}
/* The value and key are known not to be references, so simply add refs */
if (orig->value) {
clone->value = orig->value;
Z_ADDREF_P(orig->value);
}
if (orig->key) {
clone->key = orig->key;
Z_ADDREF_P(orig->key);
}
return clone_val;
}
/* }}} */
static zend_object_value zend_generator_create(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
zend_generator *generator;
@@ -755,31 +586,17 @@ static void zend_generator_iterator_get_data(zend_object_iterator *iterator, zva
}
/* }}} */
static int zend_generator_iterator_get_key(zend_object_iterator *iterator, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) /* {{{ */
static void zend_generator_iterator_get_key(zend_object_iterator *iterator, zval *key TSRMLS_DC) /* {{{ */
{
zend_generator *generator = (zend_generator *) iterator->data;
zend_generator_ensure_initialized(generator TSRMLS_CC);
if (!generator->key) {
return HASH_KEY_NON_EXISTANT;
if (generator->key) {
ZVAL_ZVAL(key, generator->key, 1, 0);
} else {
ZVAL_NULL(key);
}
if (Z_TYPE_P(generator->key) == IS_LONG) {
*int_key = Z_LVAL_P(generator->key);
return HASH_KEY_IS_LONG;
}
if (Z_TYPE_P(generator->key) == IS_STRING) {
*str_key = estrndup(Z_STRVAL_P(generator->key), Z_STRLEN_P(generator->key));
*str_key_len = Z_STRLEN_P(generator->key) + 1;
return HASH_KEY_IS_STRING;
}
/* Waiting for Etienne's patch to allow arbitrary zval keys. Until then
* error out on non-int and non-string keys. */
zend_error_noreturn(E_ERROR, "Currently only int and string keys can be yielded");
return HASH_KEY_NON_EXISTANT; /* Nerver reached */
}
/* }}} */
@@ -881,7 +698,7 @@ void zend_register_generator_ce(TSRMLS_D) /* {{{ */
memcpy(&zend_generator_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
zend_generator_handlers.get_constructor = zend_generator_get_constructor;
zend_generator_handlers.clone_obj = zend_generator_clone;
zend_generator_handlers.clone_obj = NULL;
}
/* }}} */
+3 -1
View File
@@ -22,8 +22,8 @@
#define ZEND_GENERATORS_H
BEGIN_EXTERN_C()
extern ZEND_API zend_class_entry *zend_ce_generator;
END_EXTERN_C()
typedef struct _zend_generator_iterator {
zend_object_iterator intern;
@@ -66,6 +66,8 @@ ZEND_API zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC);
ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution TSRMLS_DC);
ZEND_API void zend_generator_resume(zend_generator *generator TSRMLS_DC);
END_EXTERN_C()
#endif
/*
+18
View File
@@ -1171,6 +1171,24 @@ ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, char **str_index,
return HASH_KEY_NON_EXISTANT;
}
ZEND_API void zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos) {
Bucket *p;
IS_CONSISTENT(ht);
p = pos ? (*pos) : ht->pInternalPointer;
if (!p) {
Z_TYPE_P(key) = IS_NULL;
} else if (p->nKeyLength) {
Z_TYPE_P(key) = IS_STRING;
Z_STRVAL_P(key) = estrndup(p->arKey, p->nKeyLength - 1);
Z_STRLEN_P(key) = p->nKeyLength - 1;
} else {
Z_TYPE_P(key) = IS_LONG;
Z_LVAL_P(key) = p->h;
}
}
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos)
{
+3 -1
View File
@@ -170,13 +170,13 @@ ZEND_API int zend_hash_quick_exists(const HashTable *ht, const char *arKey, uint
ZEND_API int zend_hash_index_exists(const HashTable *ht, ulong h);
ZEND_API ulong zend_hash_next_free_element(const HashTable *ht);
/* traversing */
#define zend_hash_has_more_elements_ex(ht, pos) \
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTANT ? FAILURE : SUCCESS)
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, char **str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);
ZEND_API void zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
@@ -199,6 +199,8 @@ ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr);
zend_hash_move_backwards_ex(ht, NULL)
#define zend_hash_get_current_key(ht, str_index, num_index, duplicate) \
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, duplicate, NULL)
#define zend_hash_get_current_key_zval(ht, key) \
zend_hash_get_current_key_zval_ex(ht, key, NULL)
#define zend_hash_get_current_key_type(ht) \
zend_hash_get_current_key_type_ex(ht, NULL)
#define zend_hash_get_current_data(ht, pData) \
+5 -1
View File
@@ -67,6 +67,9 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
case '&':
i_result = i_op1 & i_op2;
break;
case '^':
i_result = i_op1 ^ i_op2;
break;
case '~':
i_result = ~i_op1;
break;
@@ -264,7 +267,7 @@ ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int s
%token BOOL_FALSE
%token END_OF_LINE
%token '=' ':' ',' '.' '"' '\'' '^' '+' '-' '/' '*' '%' '$' '~' '<' '>' '?' '@' '{' '}'
%left '|' '&'
%left '|' '&' '^'
%right '~' '!'
%%
@@ -348,6 +351,7 @@ expr:
var_string_list { $$ = $1; }
| expr '|' expr { zend_ini_do_op('|', &$$, &$1, &$3); }
| expr '&' expr { zend_ini_do_op('&', &$$, &$1, &$3); }
| expr '^' expr { zend_ini_do_op('^', &$$, &$1, &$3); }
| '~' expr { zend_ini_do_op('~', &$$, &$2, NULL); }
| '!' expr { zend_ini_do_op('!', &$$, &$2, NULL); }
| '(' expr ')' { $$ = $2; }
+404 -357
View File
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -340,9 +340,9 @@ NEWLINE ("\r"|"\n"|"\r\n")
TABS_AND_SPACES [ \t]
WHITESPACE [ \t]+
CONSTANT [a-zA-Z_][a-zA-Z0-9_]*
LABEL [^=\n\r\t;|&$~(){}!"\[]+
TOKENS [:,.\[\]"'()|^&+-/*=%$!~<>?@{}]
OPERATORS [&|~()!]
LABEL [^=\n\r\t;&|^$~(){}!"\[]+
TOKENS [:,.\[\]"'()&|^+-/*=%$!~<>?@{}]
OPERATORS [&|^~()!]
DOLLAR_CURLY "${"
SECTION_RAW_CHARS [^\]\n\r]
@@ -350,7 +350,7 @@ SINGLE_QUOTED_CHARS [^']
RAW_VALUE_CHARS [^\n\r;\000]
LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR})))
VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR})
VALUE_CHARS ([^$= \t\n\r;&|^~()!"'\000]|{LITERAL_DOLLAR})
SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
<!*> := yyleng = YYCURSOR - SCNG(yy_text);
+7 -33
View File
@@ -195,7 +195,7 @@ static int zend_user_it_get_current_key_default(zend_object_iterator *_iter, cha
/* }}} */
/* {{{ zend_user_it_get_current_key */
ZEND_API int zend_user_it_get_current_key(zend_object_iterator *_iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC)
ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key TSRMLS_DC)
{
zend_user_iterator *iter = (zend_user_iterator*)_iter;
zval *object = (zval*)iter->it.data;
@@ -203,42 +203,16 @@ ZEND_API int zend_user_it_get_current_key(zend_object_iterator *_iter, char **st
zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_key, "key", &retval);
if (!retval) {
*int_key = 0;
if (!EG(exception))
{
if (retval) {
ZVAL_ZVAL(key, retval, 1, 1);
} else {
if (!EG(exception)) {
zend_error(E_WARNING, "Nothing returned from %s::key()", iter->ce->name);
}
return HASH_KEY_IS_LONG;
}
switch (Z_TYPE_P(retval)) {
default:
zend_error(E_WARNING, "Illegal type returned from %s::key()", iter->ce->name);
case IS_NULL:
*int_key = 0;
zval_ptr_dtor(&retval);
return HASH_KEY_IS_LONG;
case IS_STRING:
*str_key = estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
*str_key_len = Z_STRLEN_P(retval)+1;
zval_ptr_dtor(&retval);
return HASH_KEY_IS_STRING;
case IS_DOUBLE:
*int_key = (long)Z_DVAL_P(retval);
zval_ptr_dtor(&retval);
return HASH_KEY_IS_LONG;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
*int_key = (long)Z_LVAL_P(retval);
zval_ptr_dtor(&retval);
return HASH_KEY_IS_LONG;
ZVAL_LONG(key, 0);
}
}
/* }}} */
/* {{{ zend_user_it_move_forward */
ZEND_API void zend_user_it_move_forward(zend_object_iterator *_iter TSRMLS_DC)
@@ -452,7 +426,7 @@ ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, zend_uint
zval_ptr_dtor(&retval);
}
if (result == FAILURE) {
if (result == FAILURE && !EG(exception)) {
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "%s::serialize() must return a string or NULL", ce->name);
}
return result;
+1 -1
View File
@@ -51,7 +51,7 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend
ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter TSRMLS_DC);
ZEND_API int zend_user_it_valid(zend_object_iterator *_iter TSRMLS_DC);
ZEND_API int zend_user_it_get_current_key(zend_object_iterator *_iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC);
ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key TSRMLS_DC);
ZEND_API void zend_user_it_get_current_data(zend_object_iterator *_iter, zval ***data TSRMLS_DC);
ZEND_API void zend_user_it_move_forward(zend_object_iterator *_iter TSRMLS_DC);
ZEND_API void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS_DC);
+5 -2
View File
@@ -38,8 +38,11 @@ typedef struct _zend_object_iterator_funcs {
/* fetch the item data for the current element */
void (*get_current_data)(zend_object_iterator *iter, zval ***data TSRMLS_DC);
/* fetch the key for the current element (return HASH_KEY_IS_STRING or HASH_KEY_IS_LONG) (optional, may be NULL) */
int (*get_current_key)(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC);
/* fetch the key for the current element (optional, may be NULL). The key
* should be written into the provided zval* using the ZVAL_* macros. If
* this handler is not provided auto-incrementing integer keys will be
* used. */
void (*get_current_key)(zend_object_iterator *iter, zval *key TSRMLS_DC);
/* step forwards to next element */
void (*move_forward)(zend_object_iterator *iter TSRMLS_DC);
+7 -5
View File
@@ -41,17 +41,19 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
#define YYERROR_VERBOSE
#define YYSTYPE znode
#ifdef ZTS
# define YYPARSE_PARAM tsrm_ls
# define YYLEX_PARAM tsrm_ls
#endif
%}
%pure_parser
%expect 3
%code requires {
#ifdef ZTS
# define YYPARSE_PARAM tsrm_ls
# define YYLEX_PARAM tsrm_ls
#endif
}
%token END 0 "end of file"
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%token T_INCLUDE "include (T_INCLUDE)"
+4 -4
View File
@@ -587,7 +587,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
if (compiler_result != 0) { /* parser error */
zend_bailout();
}
compilation_successful=1;
@@ -597,7 +597,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
CG(active_op_array) = original_active_op_array;
if (compilation_successful) {
pass_two(op_array TSRMLS_CC);
zend_release_labels(TSRMLS_C);
zend_release_labels(0 TSRMLS_CC);
} else {
efree(op_array);
retval = NULL;
@@ -762,7 +762,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
SCNG(script_filtered) = NULL;
}
if (compiler_result==1) {
if (compiler_result != 0) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
destroy_op_array(op_array TSRMLS_CC);
@@ -772,7 +772,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
zend_do_return(NULL, 0 TSRMLS_CC);
CG(active_op_array) = original_active_op_array;
pass_two(op_array TSRMLS_CC);
zend_release_labels(TSRMLS_C);
zend_release_labels(0 TSRMLS_CC);
retval = op_array;
}
}
+4 -4
View File
@@ -585,7 +585,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
if (compiler_result != 0) { /* parser error */
zend_bailout();
}
compilation_successful=1;
@@ -595,7 +595,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
CG(active_op_array) = original_active_op_array;
if (compilation_successful) {
pass_two(op_array TSRMLS_CC);
zend_release_labels(TSRMLS_C);
zend_release_labels(0 TSRMLS_CC);
} else {
efree(op_array);
retval = NULL;
@@ -760,7 +760,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
SCNG(script_filtered) = NULL;
}
if (compiler_result==1) {
if (compiler_result != 0) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
destroy_op_array(op_array TSRMLS_CC);
@@ -770,7 +770,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
zend_do_return(NULL, 0 TSRMLS_CC);
CG(active_op_array) = original_active_op_array;
pass_two(op_array TSRMLS_CC);
zend_release_labels(TSRMLS_C);
zend_release_labels(0 TSRMLS_CC);
retval = op_array;
}
}
+2 -2
View File
@@ -35,8 +35,8 @@
#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
long __tmpvar; \
__asm__ ("imulq %3,%0\n" \
"adcq $0,%1" \
__asm__ ("imul %3,%0\n" \
"adc $0,%1" \
: "=r"(__tmpvar),"=r"(usedval) \
: "0"(a), "r"(b), "1"(0)); \
if (usedval) (dval) = (double) (a) * (double) (b); \
+12 -2
View File
@@ -714,7 +714,7 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TS
}
/* }}} */
static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member, const zend_literal *key TSRMLS_DC) /* {{{ */
static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval tmp_member;
@@ -754,7 +754,9 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member, const ze
/* we don't have access controls - will just add it */
new_zval = &EG(uninitialized_zval);
/* zend_error(E_NOTICE, "Undefined property: %s", Z_STRVAL_P(member)); */
if(UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
zend_error(E_NOTICE, "Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
}
Z_ADDREF_P(new_zval);
if (EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
property_info->offset >= 0) {
@@ -1279,6 +1281,14 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *p
}
}
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL) ||
UNEXPECTED(CE_STATIC_MEMBERS(ce)[property_info->offset] == NULL)) {
if (!silent) {
zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
}
return NULL;
}
return &CE_STATIC_MEMBERS(ce)[property_info->offset];
}
/* }}} */
+1 -1
View File
@@ -50,7 +50,7 @@ typedef void (*zend_object_write_dimension_t)(zval *object, zval *offset, zval *
/* Used to create pointer to the property of the object, for future direct r/w access */
typedef zval **(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member, const struct _zend_literal *key TSRMLS_DC);
typedef zval **(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member, int type, const struct _zend_literal *key TSRMLS_DC);
/* Used to set object value. Can be used to override assignments and scalar
write ops (like ++, +=) on the object */
+2 -1
View File
@@ -166,8 +166,9 @@ static inline void cleanup_user_class_data(zend_class_entry *ce TSRMLS_DC)
for (i = 0; i < ce->default_static_members_count; i++) {
if (ce->static_members_table[i]) {
zval_ptr_dtor(&ce->static_members_table[i]);
zval *p = ce->static_members_table[i];
ce->static_members_table[i] = NULL;
zval_ptr_dtor(&p);
}
}
ce->static_members_table = NULL;
+29 -7
View File
@@ -26,6 +26,10 @@
#include <math.h>
#include <assert.h>
#ifdef __GNUC__
#include <stddef.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
@@ -68,22 +72,40 @@ END_EXTERN_C()
#if ZEND_DVAL_TO_LVAL_CAST_OK
# define zend_dval_to_lval(d) ((long) (d))
#elif SIZEOF_LONG == 4 && defined(HAVE_ZEND_LONG64)
#elif SIZEOF_LONG == 4
static zend_always_inline long zend_dval_to_lval(double d)
{
if (d > LONG_MAX || d < LONG_MIN) {
return (long)(unsigned long)(zend_long64) d;
double two_pow_32 = pow(2., 32.),
dmod;
dmod = fmod(d, two_pow_32);
if (dmod < 0) {
/* we're going to make this number positive; call ceil()
* to simulate rounding towards 0 of the negative number */
dmod = ceil(dmod) + two_pow_32;
}
return (long)(unsigned long)dmod;
}
return (long) d;
return (long)d;
}
#else
static zend_always_inline long zend_dval_to_lval(double d)
{
/* >= as (double)LONG_MAX is outside signed range */
if (d >= LONG_MAX) {
return (long)(unsigned long) d;
if (d >= LONG_MAX || d < LONG_MIN) {
double two_pow_64 = pow(2., 64.),
dmod;
dmod = fmod(d, two_pow_64);
if (dmod < 0) {
/* no need to call ceil; original double must have had no
* fractional part, hence dmod does not have one either */
dmod += two_pow_64;
}
return (long)(unsigned long)dmod;
}
return (long) d;
return (long)d;
}
#endif
/* }}} */
@@ -479,7 +501,7 @@ ZEND_API void zend_update_current_locale(void);
/* The offset in bytes between the value and type fields of a zval */
#define ZVAL_OFFSETOF_TYPE \
(__builtin_offsetof(zval,type) - __builtin_offsetof(zval,value))
(offsetof(zval,type) - offsetof(zval,value))
static zend_always_inline int fast_increment_function(zval *op1)
{
+1
View File
@@ -52,6 +52,7 @@ typedef unsigned long zend_uintptr_t;
typedef unsigned int zend_object_handle;
typedef struct _zend_object_handlers zend_object_handlers;
typedef struct _zval_struct zval;
typedef struct _zend_object_value {
zend_object_handle handle;
+62 -82
View File
@@ -363,7 +363,7 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -625,7 +625,7 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -726,7 +726,7 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -1967,13 +1967,6 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
LOAD_OPLINE();
if (fbc->type == ZEND_INTERNAL_FUNCTION) {
temp_variable *ret = &EX_T(opline->result.var);
MAKE_STD_ZVAL(ret->var.ptr);
ZVAL_NULL(ret->var.ptr);
ret->var.ptr_ptr = &ret->var.ptr;
ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
if (fbc->common.arg_info) {
zend_uint i=0;
zval **p = (zval**)EX(function_state).arguments;
@@ -1985,15 +1978,24 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
}
}
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_execute_internal(execute_data, NULL, RETURN_VALUE_USED(opline) TSRMLS_CC);
}
if (EXPECTED(EG(exception) == NULL)) {
temp_variable *ret = &EX_T(opline->result.var);
if (!RETURN_VALUE_USED(opline)) {
zval_ptr_dtor(&ret->var.ptr);
MAKE_STD_ZVAL(ret->var.ptr);
ZVAL_NULL(ret->var.ptr);
ret->var.ptr_ptr = &ret->var.ptr;
ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_execute_internal(execute_data, NULL, RETURN_VALUE_USED(opline) TSRMLS_CC);
}
if (!RETURN_VALUE_USED(opline)) {
zval_ptr_dtor(&ret->var.ptr);
}
}
} else if (fbc->type == ZEND_USER_FUNCTION) {
EX(original_return_value) = EG(return_value_ptr_ptr);
@@ -2839,17 +2841,17 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE == IS_TMP_VAR) {
FREE_OP1();
}
} else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
} else {
if (OP1_TYPE == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
OP1_TYPE == IS_TMP_VAR ||
PZVAL_IS_REF(retval_ptr)) {
zval *ret;
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
if (OP1_TYPE != IS_TMP_VAR) {
zval_copy_ctor(ret);
}
*EG(return_value_ptr_ptr) = ret;
} else if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
@@ -2861,16 +2863,6 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY)
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
}
} else {
zval *ret;
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
FREE_OP1_IF_VAR();
ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
@@ -2886,10 +2878,6 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
SAVE_OPLINE();
do {
if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -3180,7 +3168,9 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
ZEND_VM_NEXT_OPCODE();
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
}
@@ -3274,7 +3264,7 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
zval_ptr_dtor(var_ptr);
*var_ptr = assignment_value;
CHECK_EXCEPTION();
@@ -4245,13 +4235,13 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
zend_free_op free_op1;
zval *array = EX_T(opline->op1.var).fe.ptr;
zval **value;
char *str_key;
uint str_key_len;
ulong int_key;
HashTable *fe_ht;
zend_object_iterator *iter = NULL;
int key_type = 0;
zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY);
zval *key = NULL;
if (opline->extended_value & ZEND_FE_FETCH_WITH_KEY) {
key = &EX_T((opline+1)->result.var).tmp_var;
}
SAVE_OPLINE();
@@ -4262,8 +4252,11 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
case ZEND_ITER_PLAIN_OBJECT: {
const char *class_name, *prop_name;
zend_object *zobj = zend_objects_get_address(array TSRMLS_CC);
int key_type;
char *str_key;
zend_uint str_key_len;
zend_ulong int_key;
fe_ht = Z_OBJPROP_P(array);
zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
@@ -4275,15 +4268,23 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
zend_hash_move_forward(fe_ht);
} while (key_type == HASH_KEY_NON_EXISTANT ||
(key_type != HASH_KEY_IS_LONG &&
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) != SUCCESS));
zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
if (use_key && key_type != HASH_KEY_IS_LONG) {
zend_unmangle_property_name_ex(str_key, str_key_len-1, &class_name, &prop_name, &str_key_len);
str_key = estrndup(prop_name, str_key_len);
str_key_len++;
} while (key_type != HASH_KEY_IS_LONG &&
zend_check_property_access(zobj, str_key, str_key_len - 1 TSRMLS_CC) != SUCCESS);
if (key) {
if (key_type == HASH_KEY_IS_LONG) {
ZVAL_LONG(key, int_key);
} else {
const char *class_name, *prop_name;
int prop_name_len;
zend_unmangle_property_name_ex(
str_key, str_key_len - 1, &class_name, &prop_name, &prop_name_len
);
ZVAL_STRINGL(key, prop_name, prop_name_len, 1);
}
}
zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
break;
}
@@ -4294,8 +4295,8 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
/* reached end of iteration */
ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 1, NULL);
if (key) {
zend_hash_get_current_key_zval(fe_ht, key);
}
zend_hash_move_forward(fe_ht);
zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
@@ -4330,16 +4331,15 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
/* failure in get_current_data */
ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
if (key) {
if (iter->funcs->get_current_key) {
key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC);
iter->funcs->get_current_key(iter, key TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
HANDLE_EXCEPTION();
}
} else {
key_type = HASH_KEY_IS_LONG;
int_key = iter->index;
ZVAL_LONG(key, iter->index);
}
}
break;
@@ -4355,26 +4355,6 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
AI_SET_PTR(&EX_T(opline->result.var), *value);
}
if (use_key) {
zval *key = &EX_T((opline+1)->result.var).tmp_var;
switch (key_type) {
case HASH_KEY_IS_STRING:
Z_STRVAL_P(key) = (char*)str_key;
Z_STRLEN_P(key) = str_key_len-1;
Z_TYPE_P(key) = IS_STRING;
break;
case HASH_KEY_IS_LONG:
Z_LVAL_P(key) = int_key;
Z_TYPE_P(key) = IS_LONG;
break;
default:
case HASH_KEY_NON_EXISTANT:
ZVAL_NULL(key);
break;
}
}
CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
@@ -4961,7 +4941,7 @@ ZEND_VM_HANDLER(144, ZEND_ADD_INTERFACE, ANY, CONST)
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
CACHE_PTR(opline->op2.literal->cache_slot, ce);
CACHE_PTR(opline->op2.literal->cache_slot, iface);
}
if (UNEXPECTED((iface->ce_flags & ZEND_ACC_INTERFACE) == 0)) {
@@ -5411,7 +5391,7 @@ ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ANY, ANY)
USE_OPLINE
if (opline->extended_value &&
UNEXPECTED(EG(prev_exception) != NULL)) {
UNEXPECTED(EG(prev_exception) != NULL)) {
/* in case of unhandled exception jump to catch block instead of finally */
ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE();
+118 -178
View File
@@ -519,13 +519,6 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
LOAD_OPLINE();
if (fbc->type == ZEND_INTERNAL_FUNCTION) {
temp_variable *ret = &EX_T(opline->result.var);
MAKE_STD_ZVAL(ret->var.ptr);
ZVAL_NULL(ret->var.ptr);
ret->var.ptr_ptr = &ret->var.ptr;
ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
if (fbc->common.arg_info) {
zend_uint i=0;
zval **p = (zval**)EX(function_state).arguments;
@@ -537,15 +530,24 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
}
}
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_execute_internal(execute_data, NULL, RETURN_VALUE_USED(opline) TSRMLS_CC);
}
if (EXPECTED(EG(exception) == NULL)) {
temp_variable *ret = &EX_T(opline->result.var);
if (!RETURN_VALUE_USED(opline)) {
zval_ptr_dtor(&ret->var.ptr);
MAKE_STD_ZVAL(ret->var.ptr);
ZVAL_NULL(ret->var.ptr);
ret->var.ptr_ptr = &ret->var.ptr;
ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_execute_internal(execute_data, NULL, RETURN_VALUE_USED(opline) TSRMLS_CC);
}
if (!RETURN_VALUE_USED(opline)) {
zval_ptr_dtor(&ret->var.ptr);
}
}
} else if (fbc->type == ZEND_USER_FUNCTION) {
EX(original_return_value) = EG(return_value_ptr_ptr);
@@ -1404,7 +1406,7 @@ static int ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
zval_ptr_dtor(var_ptr);
*var_ptr = assignment_value;
CHECK_EXCEPTION();
@@ -1477,7 +1479,7 @@ static int ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HAND
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
CACHE_PTR(opline->op2.literal->cache_slot, ce);
CACHE_PTR(opline->op2.literal->cache_slot, iface);
}
if (UNEXPECTED((iface->ce_flags & ZEND_ACC_INTERFACE) == 0)) {
@@ -2333,17 +2335,17 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (IS_CONST == IS_TMP_VAR) {
}
} else if (!0) { /* Not a temp var */
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
} else {
if (IS_CONST == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
IS_CONST == IS_TMP_VAR ||
PZVAL_IS_REF(retval_ptr)) {
zval *ret;
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
if (IS_CONST != IS_TMP_VAR) {
zval_copy_ctor(ret);
}
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
@@ -2355,16 +2357,6 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
}
} else {
zval *ret;
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -2380,10 +2372,6 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HAND
SAVE_OPLINE();
do {
if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -7654,17 +7642,17 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_TMP_VAR == IS_TMP_VAR) {
zval_dtor(free_op1.var);
}
} else if (!1) { /* Not a temp var */
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
} else {
if (IS_TMP_VAR == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
IS_TMP_VAR == IS_TMP_VAR ||
PZVAL_IS_REF(retval_ptr)) {
zval *ret;
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
if (IS_TMP_VAR != IS_TMP_VAR) {
zval_copy_ctor(ret);
}
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
@@ -7676,16 +7664,6 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
}
} else {
zval *ret;
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -7701,10 +7679,6 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLE
SAVE_OPLINE();
do {
if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -12888,17 +12862,17 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_VAR == IS_TMP_VAR) {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
} else if (!0) { /* Not a temp var */
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
} else {
if (IS_VAR == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
IS_VAR == IS_TMP_VAR ||
PZVAL_IS_REF(retval_ptr)) {
zval *ret;
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
if (IS_VAR != IS_TMP_VAR) {
zval_copy_ctor(ret);
}
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
@@ -12910,16 +12884,6 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
}
} else {
zval *ret;
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -12935,10 +12899,6 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLE
SAVE_OPLINE();
do {
if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -13129,7 +13089,9 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
ZEND_VM_NEXT_OPCODE();
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
@@ -13588,13 +13550,13 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
zval *array = EX_T(opline->op1.var).fe.ptr;
zval **value;
char *str_key;
uint str_key_len;
ulong int_key;
HashTable *fe_ht;
zend_object_iterator *iter = NULL;
int key_type = 0;
zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY);
zval *key = NULL;
if (opline->extended_value & ZEND_FE_FETCH_WITH_KEY) {
key = &EX_T((opline+1)->result.var).tmp_var;
}
SAVE_OPLINE();
@@ -13605,8 +13567,11 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
case ZEND_ITER_PLAIN_OBJECT: {
const char *class_name, *prop_name;
zend_object *zobj = zend_objects_get_address(array TSRMLS_CC);
int key_type;
char *str_key;
zend_uint str_key_len;
zend_ulong int_key;
fe_ht = Z_OBJPROP_P(array);
zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
@@ -13618,15 +13583,23 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
zend_hash_move_forward(fe_ht);
} while (key_type == HASH_KEY_NON_EXISTANT ||
(key_type != HASH_KEY_IS_LONG &&
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) != SUCCESS));
zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
if (use_key && key_type != HASH_KEY_IS_LONG) {
zend_unmangle_property_name_ex(str_key, str_key_len-1, &class_name, &prop_name, &str_key_len);
str_key = estrndup(prop_name, str_key_len);
str_key_len++;
} while (key_type != HASH_KEY_IS_LONG &&
zend_check_property_access(zobj, str_key, str_key_len - 1 TSRMLS_CC) != SUCCESS);
if (key) {
if (key_type == HASH_KEY_IS_LONG) {
ZVAL_LONG(key, int_key);
} else {
const char *class_name, *prop_name;
int prop_name_len;
zend_unmangle_property_name_ex(
str_key, str_key_len - 1, &class_name, &prop_name, &prop_name_len
);
ZVAL_STRINGL(key, prop_name, prop_name_len, 1);
}
}
zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
break;
}
@@ -13637,8 +13610,8 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
/* reached end of iteration */
ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 1, NULL);
if (key) {
zend_hash_get_current_key_zval(fe_ht, key);
}
zend_hash_move_forward(fe_ht);
zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
@@ -13673,16 +13646,15 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
/* failure in get_current_data */
ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
if (key) {
if (iter->funcs->get_current_key) {
key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC);
iter->funcs->get_current_key(iter, key TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
HANDLE_EXCEPTION();
}
} else {
key_type = HASH_KEY_IS_LONG;
int_key = iter->index;
ZVAL_LONG(key, iter->index);
}
}
break;
@@ -13698,26 +13670,6 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
AI_SET_PTR(&EX_T(opline->result.var), *value);
}
if (use_key) {
zval *key = &EX_T((opline+1)->result.var).tmp_var;
switch (key_type) {
case HASH_KEY_IS_STRING:
Z_STRVAL_P(key) = (char*)str_key;
Z_STRLEN_P(key) = str_key_len-1;
Z_TYPE_P(key) = IS_STRING;
break;
case HASH_KEY_IS_LONG:
Z_LVAL_P(key) = int_key;
Z_TYPE_P(key) = IS_LONG;
break;
default:
case HASH_KEY_NON_EXISTANT:
ZVAL_NULL(key);
break;
}
}
CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
@@ -14185,7 +14137,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -14446,7 +14398,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -14547,7 +14499,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -16698,7 +16650,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -16960,7 +16912,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -17061,7 +17013,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -18795,7 +18747,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -19057,7 +19009,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -19158,7 +19110,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -20997,7 +20949,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -22417,7 +22369,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -22678,7 +22630,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -22779,7 +22731,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -24375,7 +24327,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -24635,7 +24587,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -24736,7 +24688,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -25790,7 +25742,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -26051,7 +26003,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -26152,7 +26104,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -27111,7 +27063,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -27372,7 +27324,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -27473,7 +27425,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -28433,7 +28385,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -28855,7 +28807,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -29115,7 +29067,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -29216,7 +29168,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -30534,17 +30486,17 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_CV == IS_TMP_VAR) {
}
} else if (!0) { /* Not a temp var */
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
} else {
if (IS_CV == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
IS_CV == IS_TMP_VAR ||
PZVAL_IS_REF(retval_ptr)) {
zval *ret;
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
if (IS_CV != IS_TMP_VAR) {
zval_copy_ctor(ret);
}
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
@@ -30556,16 +30508,6 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
}
} else {
zval *ret;
if (*EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -30581,10 +30523,6 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER
SAVE_OPLINE();
do {
if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -30774,7 +30712,9 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
ZEND_VM_NEXT_OPCODE();
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
@@ -31673,7 +31613,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -31933,7 +31873,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -32034,7 +31974,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -33955,7 +33895,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -34216,7 +34156,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -34317,7 +34257,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -35916,7 +35856,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -36177,7 +36117,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -36278,7 +36218,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -37981,7 +37921,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -39255,7 +39195,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -39515,7 +39455,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
@@ -39616,7 +39556,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
+3 -1
View File
@@ -2342,8 +2342,10 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
fi
if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
if test -n "$OPENSSL_LIBS"; then
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
fi
if test -n "$OPENSSL_INCS"; then
PHP_EVAL_INCLINE($OPENSSL_INCS)
fi
fi
Vendored
+1 -1
View File
@@ -1011,7 +1011,7 @@ case $basic_machine in
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
+2 -2
View File
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=5
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="alpha5"
PHP_EXTRA_VERSION="RC2"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
@@ -784,7 +784,7 @@ if test "$PHP_GCOV" = "yes"; then
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
fi
ltp_version_list="1.5 1.6 1.7 1.9"
ltp_version_list="1.5 1.6 1.7 1.9 1.10"
AC_CHECK_PROG(LTP, lcov, lcov)
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
+2 -1
View File
@@ -272,6 +272,7 @@
#define HALAKIM_PER_METONIC_CYCLE (HALAKIM_PER_LUNAR_CYCLE * (12 * 19 + 7))
#define JEWISH_SDN_OFFSET 347997
#define JEWISH_SDN_MAX 324542846L /* 12/13/887605, greater value raises interger overflow */
#define NEW_MOON_OF_CREATION 31524
#define SUNDAY 0
@@ -559,7 +560,7 @@ void SdnToJewish(
int tishri1After;
int yearLength;
if (sdn <= JEWISH_SDN_OFFSET) {
if (sdn <= JEWISH_SDN_OFFSET || sdn > JEWISH_SDN_MAX) {
*pYear = 0;
*pMonth = 0;
*pDay = 0;
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #64895: Integer overflow in SndToJewish
--SKIPIF--
<?php
include 'skipif.inc';
if (PHP_INT_SIZE == 4) {
die("skip this test is for 64bit platform only");
}
?>
--FILE--
<?php
$a = array(38245310, 324542846, 324542847, 9223372036854743639);
foreach ($a as $x) var_dump(jdtojewish($x));
--EXPECTF--
string(11) "2/22/103759"
string(12) "12/13/887605"
string(5) "0/0/0"
string(5) "0/0/0"
+4 -5
View File
@@ -74,16 +74,15 @@ static void com_iter_get_data(zend_object_iterator *iter, zval ***data TSRMLS_DC
*data = &I->zdata;
}
static int com_iter_get_key(zend_object_iterator *iter, char **str_key, uint *str_key_len,
ulong *int_key TSRMLS_DC)
static void com_iter_get_key(zend_object_iterator *iter, zval *key TSRMLS_DC)
{
struct php_com_iterator *I = (struct php_com_iterator*)iter->data;
if (I->key == (ulong)-1) {
return HASH_KEY_NON_EXISTANT;
ZVAL_NULL(key);
} else {
ZVAL_LONG(key, I->key);
}
*int_key = I->key;
return HASH_KEY_IS_LONG;
}
static int com_iter_move_forwards(zend_object_iterator *iter TSRMLS_DC)
+4 -5
View File
@@ -519,16 +519,15 @@ static void saproxy_iter_get_data(zend_object_iterator *iter, zval ***data TSRML
*data = ptr_ptr;
}
static int saproxy_iter_get_key(zend_object_iterator *iter, char **str_key, uint *str_key_len,
ulong *int_key TSRMLS_DC)
static void saproxy_iter_get_key(zend_object_iterator *iter, zval *key TSRMLS_DC)
{
php_com_saproxy_iter *I = (php_com_saproxy_iter*)iter->data;
if (I->key == -1) {
return HASH_KEY_NON_EXISTANT;
ZVAL_NULL(key);
} else {
ZVAL_LONG(key, I->key);
}
*int_key = (ulong)I->key;
return HASH_KEY_IS_LONG;
}
static int saproxy_iter_move_forwards(zend_object_iterator *iter TSRMLS_DC)
+1 -9
View File
@@ -5,10 +5,6 @@ dnl
PHP_ARG_WITH(curl, for cURL support,
[ --with-curl[=DIR] Include cURL support])
dnl Temporary option while we develop this aspect of the extension
PHP_ARG_WITH(curlwrappers, if we should use cURL for url streams,
[ --with-curlwrappers EXPERIMENTAL: Use cURL for url streams], no, no)
if test "$PHP_CURL" != "no"; then
if test -r $PHP_CURL/include/curl/easy.h; then
CURL_DIR=$PHP_CURL
@@ -145,10 +141,6 @@ int main(int argc, char *argv[])
$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
])
if test "$PHP_CURLWRAPPERS" != "no" ; then
AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])
fi
PHP_NEW_EXTENSION(curl, interface.c multi.c share.c streams.c curl_file.c, $ext_shared)
PHP_NEW_EXTENSION(curl, interface.c multi.c share.c curl_file.c, $ext_shared)
PHP_SUBST(CURL_SHARED_LIBADD)
fi
+1 -2
View File
@@ -13,14 +13,13 @@ if (PHP_CURL != "no") {
&& (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
) {
EXTENSION("curl", "interface.c multi.c share.c streams.c curl_file.c", true);
EXTENSION("curl", "interface.c multi.c share.c curl_file.c", true);
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL');
AC_DEFINE('HAVE_CURL_MULTI_STRERROR', 1, 'Have curl_multi_strerror in cURL');
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB");
// TODO: check for curl_version_info
// AC_DEFINE('PHP_CURL_URL_WRAPPERS', 0, 'Use curl for URL wrappers [experimental]');
} else {
WARNING("curl not enabled; libraries and headers not found");
}
-30
View File
@@ -1221,22 +1221,6 @@ PHP_MINIT_FUNCTION(curl)
return FAILURE;
}
#ifdef PHP_CURL_URL_WRAPPERS
{
curl_version_info_data *info = curl_version_info(CURLVERSION_NOW);
char **p = (char **)info->protocols;
while (*p != NULL) {
/* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
php_unregister_url_stream_wrapper(*p TSRMLS_CC);
php_register_url_stream_wrapper(*p, &php_curl_wrapper TSRMLS_CC);
}
(void) *p++;
}
}
#endif
curlfile_register_class(TSRMLS_C);
return SUCCESS;
@@ -1247,20 +1231,6 @@ PHP_MINIT_FUNCTION(curl)
*/
PHP_MSHUTDOWN_FUNCTION(curl)
{
#ifdef PHP_CURL_URL_WRAPPERS
{
curl_version_info_data *info = curl_version_info(CURLVERSION_NOW);
char **p = (char **)info->protocols;
while (*p != NULL) {
/* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
php_unregister_url_stream_wrapper(*p TSRMLS_CC);
}
(void) *p++;
}
}
#endif
curl_global_cleanup();
#ifdef PHP_CURL_NEED_OPENSSL_TSL
if (php_curl_openssl_tsl) {
-32
View File
@@ -200,38 +200,6 @@ void _php_curl_cleanup_handle(php_curl *);
void _php_curl_multi_cleanup_list(void *data);
int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC);
/* streams support */
extern php_stream_ops php_curl_stream_ops;
#define PHP_STREAM_IS_CURL &php_curl_stream_ops
php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, char *mode,
int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
extern php_stream_wrapper php_curl_wrapper;
struct php_curl_buffer {
off_t readpos, writepos;
php_stream *buf;
};
typedef struct {
CURL *curl;
CURLM *multi;
char *url;
struct php_curl_buffer readbuffer; /* holds downloaded data */
struct php_curl_buffer writebuffer; /* holds data to upload */
fd_set readfds, writefds, excfds;
int maxfd;
char errstr[CURL_ERROR_SIZE + 1];
CURLMcode mcode;
int pending;
zval *headers;
struct curl_slist *headers_slist; /* holds custom headers sent out in the request */
} php_curl_stream;
void curlfile_register_class(TSRMLS_D);
PHP_CURL_API extern zend_class_entry *curl_CURLFile_class;
-542
View File
@@ -1,542 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2013 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
/* This file implements cURL based wrappers.
* NOTE: If you are implementing your own streams that are intended to
* work independently of wrappers, this is not a good example to follow!
**/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_memory_streams.h"
#if HAVE_CURL
#include <stdio.h>
#include <string.h>
#ifdef PHP_WIN32
#include <winsock2.h>
#include <sys/types.h>
#endif
#include <curl/curl.h>
#include <curl/easy.h>
#define SMART_STR_PREALLOC 4096
#include "ext/standard/php_smart_str.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
#include "ext/standard/php_string.h"
#include "php_curl.h"
static size_t on_data_available(char *data, size_t size, size_t nmemb, void *ctx)
{
php_stream *stream = (php_stream *) ctx;
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
size_t wrote;
TSRMLS_FETCH();
/* TODO: I'd like to deprecate this.
* This code is here because until we start getting real data, we don't know
* if we have had all of the headers
* */
if (curlstream->readbuffer.writepos == 0) {
zval *sym;
if (!EG(active_symbol_table)) {
zend_rebuild_symbol_table(TSRMLS_C);
}
MAKE_STD_ZVAL(sym);
*sym = *curlstream->headers;
zval_copy_ctor(sym);
ZEND_SET_SYMBOL(EG(active_symbol_table), "http_response_header", sym);
}
php_stream_seek(curlstream->readbuffer.buf, curlstream->readbuffer.writepos, SEEK_SET);
wrote = php_stream_write(curlstream->readbuffer.buf, data, size * nmemb);
curlstream->readbuffer.writepos = php_stream_tell(curlstream->readbuffer.buf);
return wrote;
}
/* cURL guarantees that headers are written as complete lines, with this function
* called once for each header */
static size_t on_header_available(char *data, size_t size, size_t nmemb, void *ctx)
{
size_t length = size * nmemb;
zval *header;
php_stream *stream = (php_stream *) ctx;
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
TSRMLS_FETCH();
if (length < 2) {
/* invalid header ? */
return length;
}
if (!(length == 2 && data[0] == '\r' && data[1] == '\n')) {
MAKE_STD_ZVAL(header);
Z_STRLEN_P(header) = length;
Z_STRVAL_P(header) = estrndup(data, length);
if (Z_STRVAL_P(header)[length-1] == '\n') {
Z_STRVAL_P(header)[length-1] = '\0';
Z_STRLEN_P(header)--;
if (Z_STRVAL_P(header)[length-2] == '\r') {
Z_STRVAL_P(header)[length-2] = '\0';
Z_STRLEN_P(header)--;
}
}
Z_TYPE_P(header) = IS_STRING;
zend_hash_next_index_insert(Z_ARRVAL_P(curlstream->headers), &header, sizeof(zval *), NULL);
/* based on the header, we might need to trigger a notification */
if (!strncasecmp(data, "Location: ", 10)) {
php_stream_notify_info(stream->context, PHP_STREAM_NOTIFY_REDIRECTED, data + 10, 0);
} else if (!strncasecmp(data, "Content-Type: ", 14)) {
php_stream_notify_info(stream->context, PHP_STREAM_NOTIFY_MIME_TYPE_IS, data + 14, 0);
} else if (!strncasecmp(data, "Context-Length: ", 16)) {
php_stream_notify_file_size(stream->context, atoi(data + 16), data, 0);
php_stream_notify_progress_init(stream->context, 0, 0);
}
}
return length;
}
static int on_progress_avail(php_stream *stream, double dltotal, double dlnow, double ultotal, double ulnow)
{
TSRMLS_FETCH();
/* our notification system only works in a single direction; we should detect which
* direction is important and use the correct values in this call */
php_stream_notify_progress(stream->context, (size_t) dlnow, (size_t) dltotal);
return 0;
}
static size_t php_curl_stream_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
if (curlstream->writebuffer.buf) {
return php_stream_write(curlstream->writebuffer.buf, buf, count);
}
return 0;
}
static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
size_t didread = 0;
if (curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending) {
/* we need to read some more data */
struct timeval tv;
/* fire up the connection */
if (curlstream->readbuffer.writepos == 0) {
while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(curlstream->multi, &curlstream->pending));
}
do {
FD_ZERO(&curlstream->readfds);
FD_ZERO(&curlstream->writefds);
FD_ZERO(&curlstream->excfds);
/* get the descriptors from curl */
curl_multi_fdset(curlstream->multi, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &curlstream->maxfd);
/* if we are in blocking mode, set a timeout */
tv.tv_usec = 0;
tv.tv_sec = 15; /* TODO: allow this to be configured from the script */
/* wait for data */
switch ((curlstream->maxfd < 0) ? 1 :
select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
case -1:
/* error */
return 0;
case 0:
/* no data yet: timed-out */
return 0;
default:
/* fetch the data */
do {
curlstream->mcode = curl_multi_perform(curlstream->multi, &curlstream->pending);
} while (curlstream->mcode == CURLM_CALL_MULTI_PERFORM);
}
} while (curlstream->maxfd >= 0 &&
curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
}
/* if there is data in the buffer, try and read it */
if (curlstream->readbuffer.writepos > 0 && curlstream->readbuffer.readpos < curlstream->readbuffer.writepos) {
php_stream_seek(curlstream->readbuffer.buf, curlstream->readbuffer.readpos, SEEK_SET);
didread = php_stream_read(curlstream->readbuffer.buf, buf, count);
curlstream->readbuffer.readpos = php_stream_tell(curlstream->readbuffer.buf);
}
if (didread == 0) {
stream->eof = 1;
}
return didread;
}
static int php_curl_stream_close(php_stream *stream, int close_handle TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
/* TODO: respect the close_handle flag here, so that casting to a FILE* on
* systems without fopencookie will work properly */
curl_multi_remove_handle(curlstream->multi, curlstream->curl);
curl_easy_cleanup(curlstream->curl);
curl_multi_cleanup(curlstream->multi);
if (curlstream->headers_slist) {
curl_slist_free_all(curlstream->headers_slist);
}
/* we are not closing curlstream->readbuf here, because we export
* it as a zval with the wrapperdata - the engine will garbage collect it */
efree(curlstream->url);
efree(curlstream);
return 0;
}
static int php_curl_stream_flush(php_stream *stream TSRMLS_DC)
{
#ifdef ilia_0
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
#endif
return 0;
}
static int php_curl_stream_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC)
{
/* TODO: fill in details based on Data: and Content-Length: headers, and/or data
* from curl_easy_getinfo().
* For now, return -1 to indicate that it doesn't make sense to stat this stream */
return -1;
}
static int php_curl_stream_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
/* delegate to the readbuffer stream */
return php_stream_cast(curlstream->readbuffer.buf, castas, ret, 0);
}
php_stream_ops php_curl_stream_ops = {
php_curl_stream_write,
php_curl_stream_read,
php_curl_stream_close,
php_curl_stream_flush,
"cURL",
NULL, /* seek */
php_curl_stream_cast, /* cast */
php_curl_stream_stat /* stat */
};
php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, char *mode,
int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC)
{
php_stream *stream;
php_curl_stream *curlstream;
zval *tmp, **ctx_opt = NULL;
curlstream = emalloc(sizeof(php_curl_stream));
memset(curlstream, 0, sizeof(php_curl_stream));
stream = php_stream_alloc(&php_curl_stream_ops, curlstream, 0, mode);
php_stream_context_set(stream, context);
curlstream->curl = curl_easy_init();
curlstream->multi = curl_multi_init();
curlstream->pending = 1;
curlstream->headers_slist = NULL;
/* if opening for an include statement, ensure that the local storage will
* have a FILE* associated with it.
* Otherwise, use the "smart" memory stream that will turn itself into a file
* when it gets large */
#ifndef HAVE_FOPENCOOKIE
if (options & STREAM_WILL_CAST) {
curlstream->readbuffer.buf = php_stream_fopen_tmpfile();
} else
#endif
{
curlstream->readbuffer.buf = php_stream_temp_new();
}
/* curl requires the URL to be valid throughout it's operation, so dup it */
curlstream->url = estrdup(filename);
curl_easy_setopt(curlstream->curl, CURLOPT_URL, curlstream->url);
/* feed curl data into our read buffer */
curl_easy_setopt(curlstream->curl, CURLOPT_WRITEFUNCTION, on_data_available);
curl_easy_setopt(curlstream->curl, CURLOPT_FILE, stream);
/* feed headers */
curl_easy_setopt(curlstream->curl, CURLOPT_HEADERFUNCTION, on_header_available);
curl_easy_setopt(curlstream->curl, CURLOPT_WRITEHEADER, stream);
curl_easy_setopt(curlstream->curl, CURLOPT_ERRORBUFFER, curlstream->errstr);
curl_easy_setopt(curlstream->curl, CURLOPT_VERBOSE, 0);
/* enable progress notification */
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSFUNCTION, on_progress_avail);
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSDATA, stream);
curl_easy_setopt(curlstream->curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, FG(user_agent) ? FG(user_agent) : "PHP/" PHP_VERSION);
/* TODO: read cookies and options from context */
if (context && !strncasecmp(filename, "http", sizeof("http")-1)) {
/* Protocol version */
if (SUCCESS == php_stream_context_get_option(context, "http", "protocol_version", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_DOUBLE) {
if (Z_DVAL_PP(ctx_opt) == 1.1) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0);
}
if (SUCCESS == php_stream_context_get_option(context, "http", "curl_verify_ssl_peer", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 0);
}
/* HTTP(S) */
if (SUCCESS == php_stream_context_get_option(context, "http", "user_agent", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, Z_STRVAL_PP(ctx_opt));
}
if (SUCCESS == php_stream_context_get_option(context, "http", "header", &ctx_opt)) {
if (Z_TYPE_PP(ctx_opt) == IS_ARRAY) {
HashPosition pos;
zval **header = NULL;
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(ctx_opt), &pos);
SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(ctx_opt), (void *)&header, &pos);
zend_hash_move_forward_ex(Z_ARRVAL_PP(ctx_opt), &pos)
) {
if (Z_TYPE_PP(header) == IS_STRING) {
curlstream->headers_slist = curl_slist_append(curlstream->headers_slist, Z_STRVAL_PP(header));
}
}
} else if (Z_TYPE_PP(ctx_opt) == IS_STRING && Z_STRLEN_PP(ctx_opt)) {
char *p, *token, *trimmed, *copy_ctx_opt;
copy_ctx_opt = php_trim(Z_STRVAL_PP(ctx_opt), Z_STRLEN_PP(ctx_opt), NULL, 0, NULL, 3 TSRMLS_CC);
p = php_strtok_r(copy_ctx_opt, "\r\n", &token);
while (p) {
trimmed = php_trim(p, strlen(p), NULL, 0, NULL, 3 TSRMLS_CC);
curlstream->headers_slist = curl_slist_append(curlstream->headers_slist, trimmed);
efree(trimmed);
p = php_strtok_r(NULL, "\r\n", &token);
}
efree(copy_ctx_opt);
}
if (curlstream->headers_slist) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, curlstream->headers_slist);
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "method", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
if (strcasecmp(Z_STRVAL_PP(ctx_opt), "get")) {
if (!strcasecmp(Z_STRVAL_PP(ctx_opt), "head")) {
curl_easy_setopt(curlstream->curl, CURLOPT_NOBODY, 1);
} else {
if (!strcasecmp(Z_STRVAL_PP(ctx_opt), "post")) {
curl_easy_setopt(curlstream->curl, CURLOPT_POST, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_CUSTOMREQUEST, Z_STRVAL_PP(ctx_opt));
}
if (SUCCESS == php_stream_context_get_option(context, "http", "content", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_POSTFIELDS, Z_STRVAL_PP(ctx_opt));
curl_easy_setopt(curlstream->curl, CURLOPT_POSTFIELDSIZE, (long)Z_STRLEN_PP(ctx_opt));
}
}
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "proxy", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_PROXY, Z_STRVAL_PP(ctx_opt));
}
if (SUCCESS == php_stream_context_get_option(context, "http", "max_redirects", &ctx_opt)) {
long mr = 20;
if (Z_TYPE_PP(ctx_opt) != IS_STRING || !is_numeric_string(Z_STRVAL_PP(ctx_opt), Z_STRLEN_PP(ctx_opt), &mr, NULL, 1)) {
if (Z_TYPE_PP(ctx_opt) == IS_LONG) {
mr = Z_LVAL_PP(ctx_opt);
}
}
if (mr > 1) {
if (PG(open_basedir) && *PG(open_basedir)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, mr);
}
} else {
if (PG(open_basedir) && *PG(open_basedir)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, 20L);
}
} else if (context && !strncasecmp(filename, "ftps", sizeof("ftps")-1)) {
if (SUCCESS == php_stream_context_get_option(context, "ftp", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0);
}
if (SUCCESS == php_stream_context_get_option(context, "ftp", "curl_verify_ssl_peer", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 0);
}
}
/* prepare for "pull" mode */
curl_multi_add_handle(curlstream->multi, curlstream->curl);
/* Prepare stuff for file_get_wrapper_data: the data is an array:
*
* data = array(
* "headers" => array("Content-Type: text/html", "Xxx: Yyy"),
* "readbuf" => resource (equivalent to curlstream->readbuffer)
* );
* */
MAKE_STD_ZVAL(stream->wrapperdata);
array_init(stream->wrapperdata);
MAKE_STD_ZVAL(curlstream->headers);
array_init(curlstream->headers);
add_assoc_zval(stream->wrapperdata, "headers", curlstream->headers);
MAKE_STD_ZVAL(tmp);
php_stream_to_zval(curlstream->readbuffer.buf, tmp);
add_assoc_zval(stream->wrapperdata, "readbuf", tmp);
#ifndef HAVE_FOPENCOOKIE
if (options & STREAM_WILL_CAST) {
/* we will need to download the whole resource now,
* since we cannot get the actual FD for the download,
* so we won't be able to drive curl via stdio. */
/* TODO: this needs finishing */
curl_easy_perform(curlstream->curl);
}
else
#endif
{
/* fire up the connection; we need to detect a connection error here,
* otherwise the curlstream we return ends up doing nothing useful. */
CURLMcode m;
CURLMsg *msg;
int msgs_left, msg_found = 0;
while (CURLM_CALL_MULTI_PERFORM == (m = curl_multi_perform(curlstream->multi, &curlstream->pending))) {
; /* spin */
}
if (m != CURLM_OK) {
#if HAVE_CURL_MULTI_STRERROR
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", curl_multi_strerror(m));
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", m);
#endif
goto exit_fail;
}
/* we have only one curl handle here, even though we use multi syntax,
* so it's ok to fail on any error */
while ((msg = curl_multi_info_read(curlstream->multi, &msgs_left))) {
if (msg->data.result == CURLE_OK) {
continue;
} else {
#if HAVE_CURL_EASY_STRERROR
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", curl_easy_strerror(msg->data.result));
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", msg->data.result);
#endif
msg_found++;
}
}
if (msg_found) {
goto exit_fail;
}
}
return stream;
exit_fail:
php_stream_close(stream);
return NULL;
}
static php_stream_wrapper_ops php_curl_wrapper_ops = {
php_curl_stream_opener,
NULL, /* stream_close: curl streams know how to clean themselves up */
NULL, /* stream_stat: curl streams know how to stat themselves */
NULL, /* stat url */
NULL, /* opendir */
"cURL", /* label */
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL /* rmdir */
};
php_stream_wrapper php_curl_wrapper = {
&php_curl_wrapper_ops,
NULL,
1 /* is_url */
};
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
+48
View File
@@ -0,0 +1,48 @@
--TEST--
Check libcurl config on windows
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
die('skip - curl extension not available in this build');
}
if(substr(PHP_OS, 0, 3) != 'WIN' )
die("skip for windows only");
?>
--FILE--
<?php
ob_start();
phpinfo();
$s = ob_get_contents();
ob_end_clean();
preg_match('/curl\n\n(.+)\n\n/siU', $s, $m);
echo $m[1], "\n";
?>
DONE
--EXPECTF--
cURL support => enabled
cURL Information => %s
Age => %d
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => Yes
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => No
SPNEGO => Yes
SSL => Yes
SSPI => Yes
TLS-SRP => No
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host => %s-pc-win32
SSL Version => OpenSSL/%s
ZLib Version => %s
libSSH Version => libssh2/%s
DONE
Loaded 100 of 497 files, more files were not shown because too many files have changed in this diff. Show more