Commit Graph

1522 Commits

Author SHA1 Message Date
Xinchen Hui
4f2acd8cde Update test script to make sure the error occurred 2013-04-04 14:55:17 +08:00
Xinchen Hui
cf0ee2d332 Merge branch 'PHP-5.5' 2013-04-04 14:49:58 +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
Nikita Popov
d1ee0349d6 Merge branch 'PHP-5.5' 2013-04-03 20:30:31 +02: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
8333dcce68 Merge branch 'PHP-5.5' 2013-04-03 19:52:56 +08:00
Xinchen Hui
42f94aa978 Fix test due to opcache 2013-04-03 19:52:09 +08:00
Xinchen Hui
e15a97f924 Merge branch 'PHP-5.5' 2013-04-03 18:51:44 +08:00
Xinchen Hui
bbb4a44f98 Merge branch 'PHP-5.4' into PHP-5.5 2013-04-03 18:51:19 +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
Keyur Govande
415d077e08 Merge branch 'PHP-5.5'
* PHP-5.5: (276 commits)
  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()
  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
  ...
2013-03-29 14:44:35 +00:00
Nikita Popov
8345abcabb Remove support for cloning generators 2013-03-29 11:42:10 +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
1182a3356c Update test script 2013-03-26 11:50:47 +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
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
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
e9641141aa Made test compatible with O+ 2013-03-16 16:11:00 +04: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
Nikita Popov
9490118fdb Fix tests after laruence unserialize change 2013-03-09 20:21:33 +01: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
01049ca7ae Fixed bug #61025 (__invoke() visibility not honored) 2013-03-08 10:34:17 +08:00
Gustavo Lopes
46adc1603c Merge branch 'PHP-5.5'
* PHP-5.5:
  NEWS for 8718755
  Remove trailing whitespace; break long lines
  Fix rounding of zend_dval_to_lval
  Fix zend_dval_to_lval outside 64bit integers range
2013-02-23 18:07:22 +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
6a05c6be41 Merge branch 'PHP-5.5' 2013-02-21 18:21:19 +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
Stanislav Malyshev
4c293bfe91 Merge branch 'PHP-5.5'
* PHP-5.5:
  news for bug #49348
  fix tests
  fix bug #49348 - issue notice on get_property_ptr_ptr when used for read
2013-02-21 00:57:52 -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
Stanislav Malyshev
dc6f073ce9 fix tests 2013-02-18 23:01:42 -08:00
Dmitry Stogov
d7cbc01188 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #64070 (Inheritance with Traits failed with error)
2013-02-18 16:36:25 +04:00
Dmitry Stogov
d77eb411ea Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64070 (Inheritance with Traits failed with error)

Conflicts:
	NEWS
	Zend/zend_compile.c
2013-02-18 16:20:49 +04:00
Dmitry Stogov
42437dd870 Fixed bug #64070 (Inheritance with Traits failed with error) 2013-02-18 16:07:51 +04:00
Xinchen Hui
92046b7ef1 Merge branch 'PHP-5.5' 2013-02-16 22:25:37 +08:00
Xinchen Hui
75742d57eb Exceptions triggered by undefined variable should be handled before FATAL error
this is a enhancement of the fix for bug #64135
2013-02-16 22:22:22 +08:00
Xinchen Hui
5fcae352ed Merge branch 'PHP-5.5' 2013-02-07 23:50:35 +08:00
Xinchen Hui
7948eea6f9 Forgot test script 2013-02-07 23:49:35 +08:00
Xinchen Hui
7fb07acf98 Merge branch 'PHP-5.5' 2013-02-07 23:46:15 +08:00
Xinchen Hui
290509755a Fixed bug #64135 (Exceptions from set_error_handler are not always propagated) 2013-02-07 23:44:46 +08:00
Nikita Popov
86ee2c60c4 Merge branch 'PHP-5.5' 2013-02-01 19:53:23 +01:00
Nikita Popov
114245c1b9 Fix bug #63830: Segfault on undefined function call in nested generator
This also reverses the destruction order of the pushed arguments to
align with how it is done everywhere else.

I'm not exactly sure whether this is the right way to fix it, but it
seems to work fine.
2013-02-01 19:53:04 +01:00
Nikita Popov
5c3c31127e Merge branch 'PHP-5.5' 2013-02-01 18:36:10 +01:00
Nikita Popov
3ee20e450f Fix segfault when cloning generator with properties
Rule of thumb: Always implement the object clone handler rather
than the object storage clone handler. Actually I think we should
drop the latter. It's nearly never usable.
2013-02-01 18:33:26 +01:00
Nikita Popov
ea56a894e8 Merge branch 'PHP-5.5' 2013-01-30 23:55:59 +01:00
Nikita Popov
8b972efe5f Fix potential segfault when finally in a generator is run during shutdown
If a generator is destroyed in a finally block it will resume the generator to run that finally
block before freeing the generator. This was done in the object storage free handler.

Running user code in the free handler isn't safe though because the free handlers may be run
during request shutdown, already after several key components have been shut down.

This is avoided by doing the finally handling in the dtor handler. These handlers are run at the
start of the shutdown sequence.
2013-01-30 23:52:02 +01:00
Stanislav Malyshev
59cc4d7679 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #60833 - self, parent, static behave inconsistently case-sensitive

Conflicts:
	UPGRADING
2013-01-27 18:07:42 -08:00
Stanislav Malyshev
184db665eb fix bug #60833 - self, parent, static behave inconsistently case-sensitive 2013-01-27 18:02:51 -08:00
Lars Strojny
087a188702 Merge branch 'PHP-5.5' of git://github.com/php/php-src into PHP-5.5 2013-01-19 01:06:13 +01:00
Lars Strojny
b1ddfcbee3 Merge branch 'PHP-5.5' 2013-01-19 01:01:39 +01:00
Lars Strojny
8991ed016f Class Name Resolution As Scalar Via "class" Keyword 2013-01-19 01:00:47 +01:00
Stanislav Malyshev
f02373fc5a Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #63462 (Magic methods called twice for unset protected properties)
2013-01-18 13:45:40 -08:00
Stanislav Malyshev
deeacc7106 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #63462 (Magic methods called twice for unset protected properties)
  NEWS for bug #64011. See 77ee200
  Fix bug #64011 (get_html_translation_table())
  Fix News
  Update the arguments in the prototype of fpm_socket_unix_test_connect().
  fixed build
  NEWS for bug #63893
  Fixed inconsequential bug in strtr()
  Revert "Apply the fputcsv test fix to SplFileObject_fputcsv.phpt. Mea culpa."
  Revert "Update fputcsv() to escape all characters equally."
  Remove _GNU_SOURCE, add local heap sort
  The compiler can figure this out
  Remove unused block
  strtr() with 2nd param array - optimization
  Refactoring, bugs & leaks
  Optimize strtr w/ 2nd arg array
2013-01-18 13:42:04 -08:00
Stanislav Malyshev
9e7c2e5906 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix bug #63462 (Magic methods called twice for unset protected properties)
2013-01-18 13:35:09 -08:00
Stanislav Malyshev
33b104c778 fix bug #63462 (Magic methods called twice for unset protected properties) 2013-01-18 13:29:43 -08:00
Xinchen Hui
87d5701065 Fix skipif section 2013-01-18 15:12:51 +08:00
Ard Biesheuvel
abb12f5d7b Added test cases for ZEND_SIGNED_MULTIPLY_LONG()
Before making changes to the implementation of
ZEND_SIGNED_MULTIPLY_LONG(), add some test cases
to make sure the various implementations remain
equivalent.
2013-01-17 17:41:58 +01:00
Stanislav Malyshev
30fd25bb49 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #63982: isset() inconsistently produces a fatal error on protected property
  different OSes have different messages, and that's not what the test is about anyway
2013-01-13 17:27:05 -08:00
Stanislav Malyshev
1a96fe0b32 fix bug #63982: isset() inconsistently produces a fatal error on protected property 2013-01-13 17:08:52 -08:00
Stanislav Malyshev
c6203da6c2 different OSes have different messages, and that's not what the test is about anyway 2013-01-13 16:58:27 -08:00
Dmitry Stogov
326f896739 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63882 (zend_std_compare_objects crash on recursion)

Conflicts:
	NEWS
2013-01-09 11:32:40 +04:00
Dmitry Stogov
f9e8678dd3 Fixed bug #63882 (zend_std_compare_objects crash on recursion) 2013-01-09 11:30:50 +04:00
Dmitry Stogov
7625a3b3b4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  spelling
2012-12-25 16:22:07 +04:00
Dmitry Stogov
7e2629635b spelling 2012-12-25 16:21:25 +04:00
Dmitry Stogov
b8c719c068 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Traits refactoring
2012-12-25 10:33:01 +04:00
Dmitry Stogov
3f8c729e69 Traits refactoring 2012-12-25 10:23:08 +04:00
Nikita Popov
be7b0bc3ec Implement Generator::throw() method
Generator::throw($exception) throws an exception into the generator. The
exception is thrown at the current point of suspension within the generator.
It basically behaves as if the current yield statement were replaced with
a throw statement and the generator subsequently resumed.
2012-12-24 00:27:55 +01:00
Nikita Popov
14f133036c Fix crash when last yielded value is a closure
If zend_generator_close is called from within zend_generator_resume (e.g.
due to a return statement) then all the EGs will still be using the values
from the generator. That's why the stack frame has to be the last thing
that is dtored, otherwise some other dtor that is using
EG(current_execute_data) might access the already freed memory segment.
This was the case with the closure dtor.

The fix is to move the dtors for key and value to the start of the handler.
This way the stack frame is the last thing that is freed.
2012-12-21 17:28:20 +01:00
Nikita Popov
3e78c6ad25 Do not add a ref to EX(object) on generator clone
If a ref has to be added it will be already added while walking the call
slots.
2012-12-20 20:33:18 +01:00
Nikita Popov
d53f1bf8ab Fix leak when generator ignores sent value
When the return value of yield wasn't used it was leaked.

This is fixed by using a TMP_VAR return value instead of VAR. TMP_VARs are
automatically freed when they aren't used.
2012-12-18 21:39:02 +01:00
Xinchen Hui
359d91a807 Add test for bug #63741 2012-12-14 16:52:56 +08:00
Johannes Schlüter
2098cc7e9d Merge branch 'PHP-5.4' into PHP-5.5 2012-12-13 22:45:47 +01:00
Johannes Schlüter
ef37055c34 Merge branch 'PHP-5.3' into PHP-5.4 2012-12-13 22:40:23 +01:00
Johannes Schlüter
a11606b18f Fix Bug #63762 Sigsegv when Exception::$trace is changed by user 2012-12-13 22:39:35 +01:00
Dmitry Stogov
6b0b4bf8eb An exception thrown in try or catch block is disacarded by return statement in finally block. 2012-12-13 02:48:51 +04:00
Dmitry Stogov
9c96fe52d9 Restored proper generators behaviour in conjunction with "finally". (Nikita) 2012-12-12 17:47:55 +04:00
Dmitry Stogov
66b8ece02a Fixed bug #63066 (Calling an undefined method in a generator results in a seg fault) (fixed with previous commit). 2012-11-30 14:14:36 +04:00
Dmitry Stogov
3c1888f584 Fixed bug #63635 (Segfault in gc_collect_cycles) 2012-11-29 13:06:12 +04:00
Dmitry Stogov
f877d7fee6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63635 (Segfault in gc_collect_cycles)

Conflicts:
	NEWS
2012-11-29 12:38:34 +04:00
Dmitry Stogov
92e2f29381 Fixed bug #63635 (Segfault in gc_collect_cycles) 2012-11-29 12:25:20 +04:00
Nikita Popov
60871e51ad Fix bug #63596: finally in generators segfaults
EX(fast_ret) wasn't initialized in this case so the code ended up
dereferencing an invalid pointer after the jump.
2012-11-24 19:24:09 +01:00
Dmitry Stogov
8f65c76d2e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63468 (wrong called method as callback with inheritance)

Conflicts:
	NEWS
2012-11-20 12:58:16 +04:00
Dmitry Stogov
111aa9fd2e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63468 (wrong called method as callback with inheritance)

Conflicts:
	NEWS
2012-11-20 12:54:40 +04:00
Dmitry Stogov
396c1e990a Fixed bug #63468 (wrong called method as callback with inheritance) 2012-11-20 12:51:55 +04:00
Xinchen Hui
22d4205783 Update test script 2012-10-23 17:28:52 +08:00
Xinchen Hui
ad476bde9b Merge branch 'PHP-5.4' 2012-10-23 17:29:28 +08:00
Xinchen Hui
70e0624f6f Merge branch 'PHP-5.4' 2012-10-23 16:36:36 +08:00
Xinchen Hui
0b8b264107 Test for #63336, xfail now 2012-10-23 16:35:56 +08:00
Xinchen Hui
0cce2a1e76 Merge branch 'PHP-5.4' 2012-10-23 11:35:20 +08:00
Xinchen Hui
74228c5151 Fixed bug #63305 (zend_mm_heap corrupted with traits) 2012-10-23 11:34:25 +08:00
Xinchen Hui
c018d09c33 Merge branch 'PHP-5.4' 2012-10-19 11:24:56 +08:00
Xinchen Hui
bb51549915 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-19 11:24:15 +08:00
Xinchen Hui
90bd54c46e preg indenpent test script for #63055 2012-10-19 11:22:56 +08:00
Xinchen Hui
4e5e8c9da0 Merge branch 'PHP-5.4' 2012-10-10 10:45:34 +08:00
Xinchen Hui
69a4301f6c Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:45:07 +08:00
Xinchen Hui
1b9e0de2cc Remove executable permission on inc 2012-10-10 10:44:34 +08:00
Xinchen Hui
4b152e5470 Merge branch 'PHP-5.4' 2012-10-10 10:32:38 +08:00
Xinchen Hui
45e938ec34 Remove executable permission on phpt 2012-10-10 10:31:53 +08:00
Xinchen Hui
e081c55fb5 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:31:31 +08:00
Xinchen Hui
610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Xinchen Hui
6cd6a74c5a Merge branch 'PHP-5.4' 2012-10-08 23:00:57 +08:00
Xinchen Hui
67611c67fa Fixed bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion) 2012-10-08 22:59:52 +08:00
Nikita Popov
aaabac2473 Merge branch 'PHP-5.4'
Conflicts:
	Zend/zend_vm_def.h
2012-09-27 18:46:27 +02:00
Nikita Popov
592b232e83 Fix bug #63173: Crash when invoking invalid array callback
The code did not check whether the zend_hash_index_find calls succeded,
so PHP crashed when an array callback was called that contains two elements
which don't have the indices 0 and 1.
2012-09-27 18:40:00 +02:00
Nikita Popov
f28c128b20 Return previous error handler when resetting the error handler
set_error_handler(null) and set_exception_handler(null) now return the
previous error/exception handler instead of just returning bool(true).
This is consistent with the behavior of these functions with non-null
values.
2012-09-22 21:46:18 +02:00
Nikita Popov
c815dd74bc Allow resetting the error handler
This allows the error handler to be reset using set_error_handler(null).
As the code suggests this behavior was already previously intended, but
the callback check was done too strictly.
2012-09-22 21:46:02 +02:00
Nikita Popov
4954aba2ed Revert error/exception handler changes
This reverts the following two commits:

 * 6ba2e662e4
 * d8f8e98d8e

Laruence already did some partial changes to set_error_handler and
set_exception_handler. I'm reverting those modifications to apply the full
set of changes. (The modifications changed the code structure in a way that
would lead to more duplication with the new behavior.)
2012-09-22 21:41:51 +02:00
Nikita Popov
a31fa55b44 Fixed bug #63132
EG(arg_types_stack) is now also backed up when generators are used. This
allows the use of yield in nested method calls.

This commit adds two new functions to the zend_ptr_stack API:

    zend_ptr_stack_push_from_memory
    zend_ptr_stack_pop_into_memory

both taking the following arguments:

    zend_ptr_stack *stack, int count, void **pointers
2012-09-22 19:15:53 +02:00
Dmitry Stogov
274cbe5238 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #63111 (is_callable() lies for abstract static method)
  Fix folding

Conflicts:
	NEWS
2012-09-21 15:14:29 +04:00
Dmitry Stogov
ed3a2eec9c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63111 (is_callable() lies for abstract static method)

Conflicts:
	NEWS
2012-09-21 14:18:37 +04:00
Dmitry Stogov
4db74b7f19 Fixed bug #63111 (is_callable() lies for abstract static method) 2012-09-21 13:07:14 +04:00
Xinchen Hui
fd0b3ea663 Fixed bug #61442 (exception threw in __autoload can not be catched) 2012-09-19 19:40:59 +08:00
Dmitry Stogov
d4d82aac39 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #61767 (Shutdown functions not called in certain error situation) - Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)

Conflicts:
	NEWS
2012-09-06 14:03:22 +04:00
Dmitry Stogov
6ba376f552 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #61767 (Shutdown functions not called in certain error situation) - Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)

Conflicts:
	NEWS
	Zend/zend_object_handlers.c
2012-09-06 12:14:29 +04:00
Dmitry Stogov
b29dc146b9 - Fixed bug #61767 (Shutdown functions not called in certain error situation)
- Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)
2012-09-06 11:26:40 +04:00
Dmitry Stogov
bceec038c8 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62907 (Double free when use traits)

Conflicts:
	NEWS
2012-09-05 10:01:04 +04:00
Dmitry Stogov
6c0508f8d5 Fixed bug #62907 (Double free when use traits) 2012-09-05 09:58:22 +04:00
Dmitry Stogov
72473962a9 Fixed bug #62991 (Segfault with generator and closure) 2012-09-05 09:50:55 +04:00
Nikita Popov
dffffdeb3d Fix leak when yielding array as key
The code was copy-pasted and I forgot to change OP1 to OP2 in that one
place.
2012-09-01 20:31:40 +02:00
Gustavo Lopes
53351d087d Merge branch 'generators'
* generators: (70 commits)
  Fix typos
  Fix segfault when traversing a by-ref generator twice
  Make sure that exception is thrown on rewind() after closing too
  Remove implementation stubs for yield delegation
  Fix several issues and allow rewind only at/before first yield
  Run finally if generator is closed before finishing
  Finally with return now works in generators too
  Add dedicated opcode for returns from a generator
  Disallow serialization and unserialization
  Fix zts build (typo)
  Drop Generator::close() method
  Forgot to add test
  Support trivial finally in generators (no yield, no return)
  Fix implementation of Iterator interface
  Add T_YIELD in tokenizer_data.c
  Throw error also for return occuring before yield
  Fix throwing of exceptions within a generator
  Remove reference restrictions from foreach
  Require parenthesis around yield expressions
  Add some more tests
  ...
2012-09-01 19:07:20 +02:00
Nikita Popov
bef79588d5 Fix segfault when traversing a by-ref generator twice
If you try to traverse an already closed generator an exception will now be
thrown.

Furthermore this changes the error for traversing a by-val generator by-ref
from an E_ERROR to an Exception.
2012-08-29 20:46:56 +02:00
Nikita Popov
cc07038fa9 Make sure that exception is thrown on rewind() after closing too 2012-08-29 20:31:34 +02:00
Lars Strojny
6b1073a3a7 Bug #62956: fixing private method signature validation
In inheritance, if both methods are private, don not enforce the same
signature.
2012-08-28 14:10:25 +02:00
Lars Strojny
f82dd2c774 Bug #62956: fixing private method signature validation
In inheritance, if both methods are private, don not enforce the same
signature.
2012-08-28 14:06:18 +02:00
Nikita Popov
d60e3c6ef5 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Conflicts:
	Zend/zend_language_parser.y
	Zend/zend_vm_execute.skl
2012-08-26 13:03:55 +02:00
Xinchen Hui
14c88ff82c Merge branch 'PHP-5.4' 2012-08-26 18:28:58 +08:00
Xinchen Hui
e24194d157 Add test for #62907 2012-08-26 18:28:15 +08:00
Xinchen Hui
5ebbdecfea Fixed bug #62930, and more tests 2012-08-26 13:05:33 +08:00
Nikita Popov
f53225a99e Fix several issues and allow rewind only at/before first yield
* Trying to resume a generator while it is already running now throws a
   fatal error.
 * Trying to use yield in finally while the generator is being force-closed
   (by GC) throws a fatal error.
 * Rewinding after the first yield now throws an Exception
2012-08-25 17:40:08 +02:00
Xinchen Hui
35951d4be0 Support list in foreach
RFC: https://wiki.php.net/rfc/foreachlist
2012-08-25 22:23:57 +08:00
Nikita Popov
4d8edda341 Run finally if generator is closed before finishing 2012-08-24 19:10:09 +02:00
Nikita Popov
7cdf6367a5 Finally with return now works in generators too 2012-08-24 13:52:16 +02:00
Nikita Popov
6517ed0215 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2012-08-24 13:29:40 +02:00
Xinchen Hui
b8800d1701 Merge branch 'PHP-5.4' 2012-08-23 15:45:06 +08:00
Xinchen Hui
6d1bebfcb0 Fixed bug #62358 (Segfault when using traits a lot) 2012-08-23 15:41:49 +08:00
Felipe Pena
596e855feb Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #62892 (ReflectionClass::getTraitAliases crashes on importing trait methods as private)
2012-08-22 10:51:06 -03:00
Felipe Pena
7a56ac00a0 - Fixed bug #62892 (ReflectionClass::getTraitAliases crashes on importing trait methods as private) 2012-08-22 10:50:50 -03:00
Xinchen Hui
60a29791e4 Fixed bug that jmp in try block jmp over finally block
Refactor the implemention,  make codes clear
2012-08-22 18:32:03 +08:00
Nikita Popov
f45a0f31c8 Disallow serialization and unserialization 2012-08-20 16:01:16 +02:00
Nikita Popov
1823b16fa1 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Merging master to fix Windows build

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
2012-08-20 13:37:53 +02:00
Nikita Popov
05f10480c5 Drop Generator::close() method 2012-08-20 12:53:18 +02:00
Xinchen Hui
72b9b8f380 Make the codes clearer, and also check continue statement 2012-08-18 11:44:09 +08:00
Xinchen Hui
f2a8912e61 Refactor examing of jumping out of finally block 2012-08-18 00:16:34 +08:00
Xinchen Hui
0312d0a262 Prevents goto out of a finally block 2012-08-16 18:17:26 +08:00
Xinchen Hui
154fe7486d typo 2012-08-14 14:17:27 +08:00
Xinchen Hui
f82be0550b add test for alone try block, and update test scripts summary 2012-08-14 14:08:38 +08:00
Nikita Popov
7195a5b376 Forgot to add test 2012-08-13 19:24:44 +02:00
Nikita Popov
f4ce364628 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
This is just an intial merge. It does not yet make generators and finally
work together.

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	Zend/zend_vm_execute.skl
	Zend/zend_vm_opcodes.h
2012-08-13 16:54:53 +02:00
Xinchen Hui
80d5ae3cea Implemented 'finally' keywords for php
RFC: https://wiki.php.net/rfc/finally
FR: https://bugs.php.net/bug.php?id=32100
and I have got some improvment ideas(performance), will implemented
later. thanks
2012-08-13 21:48:39 +08:00
Xinchen Hui
253760bb6b Merge branch 'PHP-5.4' 2012-08-12 21:00:01 +08:00
Xinchen Hui
dda0565b53 Merge branch 'PHP-5.3' into PHP-5.4 2012-08-12 20:58:45 +08:00
Xinchen Hui
4970926e45 Fixed bug #62763 (register_shutdown_function and extending class) 2012-08-12 20:58:09 +08:00
Xinchen Hui
32c1c5a19f Revert "Test for bug 62328"
This reverts commit 222ab9da1a.
2012-08-12 12:02:02 +08:00
Leigh
222ab9da1a Test for bug 62328 2012-08-10 11:43:53 +01:00
Xinchen Hui
b412df1e67 Merge branch 'PHP-5.4' 2012-07-31 10:52:26 +08:00
Xinchen Hui
572d6437bc expect pass for 5.4 2012-07-31 10:51:18 +08:00
Xinchen Hui
c730329bb0 Merge branch 'PHP-5.3' into PHP-5.4 2012-07-31 10:51:04 +08:00
Xinchen Hui
645f84e41b Test for bug #62680 2012-07-31 10:49:13 +08:00
Xinchen Hui
32c05f772e Merge branch 'PHP-5.4'
* PHP-5.4:
  Skip test while zend_mm is disabled
2012-07-29 12:20:05 +08:00
Xinchen Hui
11e84180ef Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Skip test while zend_mm is disabled
2012-07-29 12:19:28 +08:00
Xinchen Hui
015ee3b2c8 Skip test while zend_mm is disabled 2012-07-29 12:17:43 +08:00
Nikita Popov
268740d984 Fix implementation of Iterator interface
It looks like you have to implement the Iterator interface *before*
assigning get_iterator. Otherwise the structure for user iterators isn't
correctly zeroed out.

Additionaly I'm setting class_entry->iterator_funcs.funcs now. Not sure if
this is strictly necessary, but better safe than sorry ;)
2012-07-26 17:13:25 +02:00
Xinchen Hui
80497ea7df Merge branch 'PHP-5.4' 2012-07-26 13:58:01 +08:00
Xinchen Hui
302ad0d648 Fix test, committed in wrong folder 2012-07-26 13:57:04 +08:00
Xinchen Hui
eae0610042 Fixed bug #62653: (unset($array[$float]) causes a crash)
the reason why jpauli and I can not reproduce is (it's silly):
I typo "USE_ZEND_ALLOC *&&* valgrind" at the first time, then I always ctrl+r
and jpauli copied my command from the pastbin :)

thanks
2012-07-26 13:53:06 +08:00
Nikita Popov
134089372b Throw error also for return occuring before yield
Previously only an error was thrown when return occured after yield. Also
returns before the first yield would fail for by-ref generators.

Now the error message is handled in pass_two, so all returns are checked.
2012-07-22 20:11:09 +02:00
Nikita Popov
94b2ccae9c Fix throwing of exceptions within a generator
If a generator threw an exception and was iterated using foreach (i.e. not
manually) an infinite loop was triggered. The reason was that the exception
was not properly rethrown using zend_throw_exception_internal.
2012-07-22 17:46:46 +02:00
Nikita Popov
de80e3ce4b Remove reference restrictions from foreach
foreach only allowed variables to be traversed by reference. This never
really made sense because

    a) Expressions like array(&$a, &$b) can be meaningfully iterated by-ref
    b) Function calls can return by-ref (so they can also be meaningfully
       iterated)
    c) Iterators could at least in theory also be iterated by-ref (not
       sure if any iterator makes use of this)

With by-ref generators the restriction makes even less sense, so I removed
it altogether.
2012-07-22 14:33:25 +02:00
Nikita Popov
80748631aa Require parenthesis around yield expressions
If yield is used in an expression context parenthesis are now required.
This ensures that the code is unambiguos.

Yield statements can still be used without parenthesis (which should be
the most common case).

Also yield expressions without value can be used without parenthesis,
too (this should be the most common case for coroutines).

If the yield expression is used in a context where parenthesis are required
anyway, no additional parenthesis have to be inserted.

Examples:

    // Statements don't need parenthesis
    yield $foo;
    yield $foo => $bar;

    // Yield without value doesn't need parenthesis either
    $data = yield;

    // Parentheses don't have to be duplicated
    foo(yield $bar);
    if (yield $bar) { ... }

    // But we have to use parentheses here
    $foo = (yield $bar);

This commit also fixes an issue with by-ref passing of $foo[0] like
variables. They previously weren't properly fetched for write.

Additionally this fixes valgrind warnings which were caused by access to
uninitialized memory in zend_is_function_or_method_call().
2012-07-22 01:22:22 +02:00
Nikita Popov
1f70a4c5fe Add some more tests 2012-07-20 17:40:04 +02:00
Nikita Popov
c9709bfbd7 Remove asterix modifier (*) for generators
Generators are now automatically detected by the presence of a `yield`
expression in their body.

This removes the ZEND_SUSPEND_AND_RETURN_GENERATOR opcode. Instead
additional checks for ZEND_ACC_GENERATOR are added to the fcall_common
helper and zend_call_function.

This also adds a new function zend_generator_create_zval, which handles
the actual creation of the generator zval from an op array.

I feel like I should deglobalize the zend_create_execute_data_from_op_array
code a bit. It currently changes EG(current_execute_data) and
EG(opline_ptr) which is somewhat confusing (given the name).
2012-07-20 16:09:06 +02:00
Nikita Popov
85f077cea1 Add support by yielding by-reference 2012-07-17 13:29:56 +02:00
Stanislav Malyshev
bd340b7296 add NEWS/UPGRADING 2012-07-14 15:03:51 -07:00
Stanislav Malyshev
c164e6b5a3 add test 2012-07-14 14:50:50 -07:00
Stanislav Malyshev
a3322f8927 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed the common misspelling of the word occurred (occured -> occurred)
2012-06-30 17:00:25 -07:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Nikita Popov
5a9bddba66 Forgot to git add two tests 2012-06-25 21:41:50 +02:00
Nikita Popov
d939d2dee5 Add sceleton for yield* expression
This does not yet actually implement any delegation.
2012-06-19 00:37:31 +02:00
Nikita Popov
f169b26dd7 Fix backtraces and func_get_args()
To make the generator function show up in backtraces one has to insert an
additional execute_data into the chain, as prev_execute_data->function_state
is used to determine the called function.

Adding the additional stack frame is also required for func_get_args(), as
the arguments are fetched from there too. The arguments have to be copied
in order to keep them around. Due to the way they are saved doing so is
quite ugly, so I added another function zend_copy_arguments to zend_execute.c
which handles this.
2012-06-09 00:40:47 +02:00
Nikita Popov
40760ecb90 Fix cloning of generator methods
Forgot to add a reference to the this variable
2012-06-05 14:00:31 +02:00
Nikita Popov
bf82f46ea9 Properly handle yield during method calls 2012-06-03 02:16:29 +02:00
Nikita Popov
7b3bfa5784 Improve backtraces from generators
The current situation is still not perfect, as the generator function itself
does not appear in the stack trace. This makes sense in some way, but it
would probably be more helpful if it would show up (with the bound arguments)
after the $generator->xyz() call. This could be misleading too though as the
function is not *really* called there.
2012-06-03 02:00:11 +02:00
Nikita Popov
6117f4c7c0 Add cloning support for generators
Generators can now be cloned. I'm pretty sure that my current code does not
yet cover all the edge cases of cloning the execution context, so there are
probably a few bugs in there :)
2012-06-02 20:40:58 +02:00
Nikita Popov
1477be9aa8 Make $generator->send() return the current value
This makes the API easier to use (and is consistent with Python and JS).
2012-05-31 20:03:18 +02:00
Nikita Popov
ee89e228f6 Allow yielding during function calls
During function calls arguments are pushed onto the stack. Now these are
backed up on yield and restored on resume. This requires memcpy'ing them,
but there doesn't seem to be any better way to do it.

Also this fixes the issue with exceptions thrown during function calls.
2012-05-31 00:00:30 +02:00
Nikita Popov
0033a52521 Allow throwing exceptions from generators
The missing piece is how one can find the next stack frame, which is
required for dtor'ing arguments pushed to the stack. As the generator
execute_data does not live on the stack one can't use it to figure out the
start of the next stack frame. So there must be some other method.
2012-05-30 16:28:33 +02:00
Stanislav Malyshev
ec2029a894 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix test
  fix test
2012-05-29 23:53:01 -07:00
Stanislav Malyshev
abe6362716 fix test 2012-05-29 23:52:47 -07:00
Nikita Popov
8790160235 Add auto-increment keys
When no key is explicitely yielded PHP will used auto-incrementing keys
as a fallback. They behave the same as with arrays, i.e. the key is the
successor of the largest previously used integer key.
2012-05-30 05:05:49 +02:00
Nikita Popov
bc08c2cf94 Add support for yielding keys
Keys are yielded using the

    yield $key => $value

syntax. Currently this is implemented as a statement only and not as an
expression, because conflicts arise considering nesting and use in arrays:

    yield yield $a => $b;
    // could be either
    yield (yield $a) => $b;
    // or
    yield (yield $a => $b);

Once I find some way to resolve these conflicts this should be available
as an expression too.

Also the key yielding code is rather copy-and-past-y for the value yielding
code, so that should be factored out.
2012-05-30 02:44:06 +02:00
Nikita Popov
72a91d08e7 Add $generator->close() method
Calling $generator->close() is equivalent to executing a return statement
at the current position in the generator.
2012-05-29 18:11:18 +02:00
Nikita Popov
12e928314f Fix segfault when send()ing to a closed generator 2012-05-29 18:01:08 +02:00
Nikita Popov
ad525c288a Allow to use yield without value
If the generator is used as a coroutine it often doesn't make sense to yield
anything. In this case one can simply receive values using

    $value = yield;

The yield here will simply yield NULL.
2012-05-29 17:53:11 +02:00
Nikita Popov
3600914ced Add support for $generator->send()
Yield now is an expression and the return value is the value passed to
$generator->send(). By default (i.e. if ->next() is called) the value is
NULL.

Unlike in Python ->send() can be run without priming the generator with a
->next() call first.
2012-05-29 17:34:33 +02:00
Nikita Popov
4aab08b64c Properly free resources when generator return value not used
To keep things clean two new functions are introduced:

zend_clean_and_cache_symbol_table(HashTable *symbol_table)
zend_free_compiled_variables(zval ***CVs, int num)
2012-05-28 06:43:18 +02:00
Nikita Popov
bcc7d976f3 Set EG(current_execute_data)
This fixes several issues. In particular it makes method generators work
properly and also allows generators using a symbol table.
2012-05-28 06:06:30 +02:00
Nikita Popov
9f52c5c226 Fix generator creation when execute_data is not nested
This happens primarily when the generator is invoked from some internal
place like a dynamic function call.
2012-05-27 22:48:21 +02:00
Nikita Popov
64a643a4e3 Free loop variables
If the generator is closed before it has finished running, it may happen
that some FREE or SWITCH_FREE opcodes haven't been executed and memory is
leaked.

This fixes it by walking the brk_cont_array and manually freeing the
variables.
2012-05-27 17:14:20 +02:00
Nikita Popov
39d3d5ec13 Add first real generator test
The test implements an xrange() function (the generator version of range()).
2012-05-27 00:50:27 +02:00
Nikita Popov
5bb3a995c2 Implement return for generators
For generators ZEND_RETURN directly calls ZEND_VM_RETURN(), thus passing
execution back to the caller (zend_generator_resume).

This commit also adds a check that only return; is used in generators and
not return $value;.
2012-05-26 23:07:40 +02:00
Stanislav Malyshev
b187c35f23 Merge branch 'pull-request/54'
* pull-request/54:
  Allow arbitrary expressions for empty()

    This change is as per RFC https://wiki.php.net/rfc/empty_isset_exprs.

    The change allows passing the result of function calls and other
    expressions to the empty() language construct. This is accomplished by
    simply rewriting empty(expr) to !expr.

    The change does not affect the suppression of errors when using empty()
    on variables. empty($undefinedVar) will continue not to throw errors.
    When an expression is used inside empty() on the other hand, errors will
    not be suppressed. Thus empty($undefinedVar + $somethingElse) *will*
    throw a notice.

    The change also does not make empty() into a real function, so using
    'empty' as a callback is still not possible.

    In addition to the empty() changes the commit adds nicer error messages
    when isset() is used on function call results or other expressions.
2012-05-24 14:18:12 -05:00
Gustavo André dos Santos Lopes
d4fd95e292 Merge branch '5.4' 2012-05-24 11:09:18 +02:00
Gustavo André dos Santos Lopes
acd711685a Fixed bug #62097
This fixes the fix for bug #54547 in 32-bit machines by accepting
float comparisons in 32-bit machines as long as the integer is
not larger than the mantissa.
2012-05-23 18:55:36 -05:00
Dmitry Stogov
c8f47a8e7c Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 13:46:07 +04:00
Dmitry Stogov
7632a32ef9 Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 12:53:21 +04:00
Nikita Popov
46fa26ab85 Make generator functions return a Generator object
Right now generator functions simply immediately return a new Generator
object (no suspension yet).
2012-05-20 14:45:01 +02:00
Nikita Popov
40b7533576 Add some boilerplate code for Generator class
The Generator class now uses a zend_generator struct, so it'll be able to
store additional info.

This commit also ensures that Generator cannot be directly instantiated
and extended. The error tests are now in a separate folder from the
(yet-to-come) functional tests.
2012-05-20 14:19:16 +02:00
Nikita Popov
fd2a109f86 Add error if yield is used outside a generator
The yield statement can only be used in generator functions, which are
marked with an asterix.
2012-05-19 18:49:27 +02:00
Stanislav Malyshev
d03900dc92 fix bug #61782 - __clone/__destruct do not match other methods when checking access controls 2012-05-14 11:03:21 -07:00
Stanislav Malyshev
47db8a9aa1 fix bug #54547 2012-05-14 11:03:20 -07:00
Stanislav Malyshev
a0dff6fdca fix bug #61782 - __clone/__destruct do not match other methods when checking access controls 2012-05-13 14:40:44 -07:00
Stanislav Malyshev
9344bf193c fix bug #54547 2012-05-13 14:40:44 -07:00
Nikita Popov
ec061a93c5 Allow arbitrary expressions for empty()
This change is as per RFC https://wiki.php.net/rfc/empty_isset_exprs.

The change allows passing the result of function calls and other
expressions to the empty() language construct. This is accomplished by
simply rewriting empty(expr) to !expr.

The change does not affect the suppression of errors when using empty()
on variables. empty($undefinedVar) will continue not to throw errors.
When an expression is used inside empty() on the other hand, errors will
not be suppressed. Thus empty($undefinedVar + $somethingElse) *will*
throw a notice.

The change also does not make empty() into a real function, so using
'empty' as a callback is still not possible.

In addition to the empty() changes the commit adds nicer error messages
when isset() is used on function call results or other expressions.
2012-05-13 14:56:51 +02:00
Xinchen Hui
5852e5f48d Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
  fix stack overflow in php_intlog10abs()
  fix stack overflow in php_intlog10abs()
2012-05-12 13:21:49 +08:00
Xinchen Hui
6a5095582a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
  fix stack overflow in php_intlog10abs()

Conflicts:
	Zend/zend_execute.c
2012-05-12 13:19:55 +08:00
Xinchen Hui
3332943c9d Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object) 2012-05-12 13:13:44 +08:00
Xinchen Hui
e022bfe34a Merge remote-tracking branch 'origin/PHP-5.4'
* origin/PHP-5.4:
  Fixed test bug #61892
2012-05-03 20:00:10 +08:00
Xinchen Hui
d74d88fbb9 Fixed test bug #61892 2012-05-03 19:56:49 +08:00
Xinchen Hui
6b9e88d9e6 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash)
2012-04-18 18:15:29 +08:00
Xinchen Hui
da6465a268 Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash) 2012-04-18 18:13:27 +08:00
Xinchen Hui
565892d4c0 Implement const array/string dereference
RFC:https://wiki.php.net/rfc/constdereference
2012-04-17 10:06:17 +08:00
Nikita Popov
b233de098d Fix bug #61681: Malformed grammar
Generate T_STRING_VARNAME only if it actually is one. This is only the case
for "${varname}" and "${varname[offset]}" so we can just add a check for
} or [ after the LABEL.
2012-04-09 18:26:38 +02:00
Xinchen Hui
6ba2e662e4 Implemented FR #60738 (Allow 'set_error_handler' to handle NULL)
The previous commit was reverted as Stas ask, so only commit this
to Truk now.
2012-03-24 19:41:11 +08:00
Xinchen Hui
aa7cdcd13d Merge branch 'PHP-5.4' of ../php-5.4 2012-03-24 19:28:43 +08:00
Xinchen Hui
872fdd153e Merge branch 'PHP-5.3' of ../php-5.3 into PHP-5.4 2012-03-24 19:26:27 +08:00
Xinchen Hui
9c99a89e8e Revert "Implemented FR #60738 (Allow 'set_error_handler' to handle NULL)"
This reverts commit fcae164ea6.
2012-03-24 19:26:02 +08:00
Xinchen Hui
690afaffc8 Merge branch 'PHP-5.4' of ../php-5.4 2012-03-24 15:16:51 +08:00
Xinchen Hui
7ffc442927 Merge branch 'PHP-5.3' of ../php-5.3 into PHP-5.4 2012-03-24 15:15:27 +08:00
Xinchen Hui
fcae164ea6 Implemented FR #60738 (Allow 'set_error_handler' to handle NULL) 2012-03-24 15:13:10 +08:00
Xinchen Hui
3813f987d5 Merge branch 'PHP-5.4'
* PHP-5.4:
  Remove empty lines
2012-03-24 11:35:29 +08:00
Xinchen Hui
114d662d12 Remove empty lines 2012-03-24 11:35:13 +08:00
Xinchen Hui
943a4fed4e reduce memory usage 2012-03-12 14:52:02 +00:00
Xinchen Hui
438a30f1e7 reduce memory usage 2012-03-12 14:52:02 +00:00
Xinchen Hui
d845cfb12e reduce memory usage 2012-03-12 14:52:02 +00:00
Ilia Alshanetsky
2cc64c28f0 Fixed bug #60569 (Nullbyte truncates Exception $message). 2012-03-11 18:15:13 +00:00
Ilia Alshanetsky
d4f05fbffc Fixed bug #60569 (Nullbyte truncates Exception $message). 2012-03-11 18:15:13 +00:00
Ilia Alshanetsky
3d9824a798 Fixed bug #60569 (Nullbyte truncates Exception $message). 2012-03-11 18:15:13 +00:00