Xinchen Hui
d6e668368d
C89 compatibility
2016-06-14 18:17:49 +08:00
Xinchen Hui
9c8e1c03b9
Only allow single comma in tail
2016-06-14 14:02:34 +08:00
Xinchen Hui
6166c26f1c
Cleanup
2016-06-13 17:36:03 -07:00
Nikita Popov
792e89385c
Fixed bug #72373
2016-06-10 15:57:18 +02:00
Dmitry Stogov
10f056255e
Better fix for bug #70228 (memleak if return in finally block)
2016-06-08 02:20:45 +03:00
Aaron Piotrowski
4da3e77b4c
Covariance on inheriting classes with iterable
2016-06-04 09:44:49 -05:00
Nikita Popov
9ba243b6f3
Forbid ?void
2016-06-04 14:53:50 +02:00
Nikita Popov
73b2f79199
More explicit errors for return; vs return null;
...
Both for "return null" in a void function and "return" in
a nullable return function.
2016-06-04 13:27:11 +02:00
Nikita Popov
fe907562ad
Forbid "return;" for typed returns already at compile-time
...
These would otherwise generate a "none returned" error at runtime.
Catch them early.
2016-06-04 13:27:11 +02:00
Nikita Popov
cb3825a8dc
Small generator-related cleanups
2016-06-04 13:27:11 +02:00
Aaron Piotrowski
bf6a65984b
Fix default argument check
2016-06-03 18:01:56 -05:00
Aaron Piotrowski
72692e9a9c
Add iterable pseudo-type
2016-06-03 17:42:04 -05:00
Dmitry Stogov
b111da96d9
Split ZEND_SEND_VAR_NO_REF into ZEND_SEND_VAR_NO_REF and ZEND_SEND_VAR_NO_REF_EX (similar to ZEND_SEND_VAL) and remove ZEND_ARG_* flags.
2016-05-31 04:06:00 +03:00
Dmitry Stogov
2ae21abdf7
Fixed bug #72213 (Finally leaks on nested exceptions).
...
Squashed commit of the following:
commit 8461b0407f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:34:42 2016 +0300
Rmoved zend_try_catch_element.parent and walk through op_array.try_catch_array backward from the current try_cacth_offset.
commit 0c71e24964
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:04:53 2016 +0300
Move SAVE_OPLINE() to its original place
commit 111432a4df
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:01:10 2016 +0300
Separate the common part of ZEND_HANDLE_EXCEPTION and FAST_RET into zend_dispatch_try_catch_finally_helper.
commit 4f21c06c2e
Author: Nikita Popov <nikic@php.net>
Date: Tue May 24 14:55:27 2016 +0200
Improve finally fix
commit da5c727499
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 10:36:08 2016 +0300
Fixed Zend/tests/try/bug70228_3.phpt and Zend/tests/try/bug70228_4.phpt
commit cfcedf2fb4
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 02:59:27 2016 +0300
Added test
commit 4c6aa93d43
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 00:38:20 2016 +0300
Added tests
commit 8a8f4704b0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon May 23 23:27:34 2016 +0300
Fixed bug #72213 (Finally leaks on nested exceptions)
2016-05-25 01:25:12 +03:00
Dmitry Stogov
0cdbabe558
Merge branch 'nullable_types' of github.com:morrisonlevi/php-src
...
* 'nullable_types' of github.com:morrisonlevi/php-src:
Fix bug #71428
Add nullable parameter types
Implement nullable return types.
2016-05-23 10:14:26 +03:00
Bob Weinand
4f077aee83
Allow for [] = $array; (alias for list())
2016-05-20 01:51:05 +02:00
Dmitry Stogov
be071702b3
Fixed bug #72188 (Nested try/finally blocks losing return value)
2016-05-13 14:38:43 +03:00
Dmitry Stogov
ccf18da450
Eliminated checks for (func->op_array.fn_flags & ZEND_ACC_GENERATOR) in fast path of DO_FCALL* handlers.
...
This slightly improves calls to regular function and method calls in cost of a bit slower generator initialization.
Separate call frame for generators, allocated on heap, now created by ZEND_GENERATOR_CREATE instruction.
2016-05-13 01:40:15 +03:00
Dmitry Stogov
7b94b958cc
Intern some known (and offten used) strings.
2016-05-12 13:47:22 +03:00
Dmitry Stogov
c19cb70dac
Revert "Refactor zval cleanup into single function"
...
This reverts commit bac6fdb0c5
.
2016-05-06 10:47:58 +03:00
Bob Weinand
bac6fdb0c5
Refactor zval cleanup into single function
...
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
2016-05-05 23:31:57 +02:00
Levi Morrison
9662259cb9
Add nullable parameter types
...
This works off of Dmitry's commit for nullable return types
2016-05-05 11:53:32 -06:00
Dmitry Stogov
49fe737e58
Implement nullable return types.
2016-05-05 09:34:16 -06:00
Nikita Popov
bfef17ab65
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_compile.c
2016-05-04 18:43:55 +02:00
Nikita Popov
9af0c96af4
Fix bug #72159
2016-05-04 18:43:11 +02:00
Joe Watkins
dc78e02ad2
Merge branch 'PHP-7.0'
...
* PHP-7.0:
add compiler option to disable builtins (special case function calls)
2016-05-04 10:54:29 +01:00
Joe Watkins
9bbee305e3
add compiler option to disable builtins (special case function calls)
2016-05-04 10:53:59 +01:00
Pierrick Charron
0aed2cc2a4
Allow catching multiple exception types in a single catch statement
...
This commit add the possibility to catch multiple exception types in
a single catch statement to avoid code duplication.
try {
// Some code...
} catch (ExceptionType1 | ExceptionType2 $e) {
// Code to handle the exception
} catch (\Exception $e) {
// ...
}
2016-05-01 18:47:08 -04:00
Nikita Popov
6a9a0f2090
Merge branch 'PHP-7.0'
2016-05-01 13:05:28 +02:00
Nikita Popov
d0069ca6c1
Fix ('\bar')() in namespace
2016-05-01 13:05:14 +02:00
Dmitry Stogov
2578d08033
Fixed compilation warnings
2016-04-29 14:44:56 +03:00
Nikita Popov
4f54c15cb1
Ct bind private/final $this method call args
...
The test covers two edge-cases wrt opcache support.
2016-04-27 17:10:44 +02:00
Bob Weinand
261eb5cc89
Merge branch 'PHP-7.0'
2016-04-21 21:51:50 +02:00
Bob Weinand
69efeb1223
Fix constant expr coaleasce with protected mode opcache
2016-04-21 21:51:00 +02:00
Bob Weinand
ecf6392243
Merge remote-tracking branch 'origin/PHP-7.0'
2016-04-21 02:50:14 +02:00
Bob Weinand
a287c3f776
Fix magic constants (__LINE__) with ?? for constant scalar exprs
...
Also fix general memory leak when root ast gets replaced in compile time evaluation
2016-04-21 02:45:09 +02:00
Bob Weinand
36202ef056
Merge remote-tracking branch 'origin/PHP-7.0'
2016-04-21 01:26:48 +02:00
Márcio Almada
9f3eab44df
allow null coalescing (??) on constant expressions
2016-04-21 01:22:28 +02:00
Adam Harvey
c4f69b6dfd
Fix ZTS builds by adding a missing TSRMLS_FETCH().
2016-04-20 18:58:29 +02:00
Nikita Popov
c9d8dfed60
Merge branch 'PHP-7.0'
2016-04-20 18:43:43 +02:00
Nikita Popov
77bb96d7c9
Fix bug #71737
...
Also improve the error message for $this used in parameters.
2016-04-20 18:38:40 +02:00
Dmitry Stogov
ffc697ac27
Prevent usage in GC after free.
2016-04-19 01:31:49 +03:00
Nikita Popov
ea1f30057b
Fully initialize DECLARE_CLASS/FUNCTION opcodes
2016-04-18 22:46:45 +02:00
Dmitry Stogov
b73517c1a1
Use DO_FCALL_BY_NAME instead of DO_FCALL, if possible
2016-04-14 16:07:28 +03:00
Dmitry Stogov
3444c1ae24
Use return type hints for type inference and eliminate useless VERIFY_RETRUN_TYPE opcodes.
2016-04-07 17:34:53 +03:00
Joe Watkins
14e4c610e9
Fix #69537 : __debugInfo with empty string for key gives error
2016-04-03 12:40:29 +01:00
Joe Watkins
bff13d90a8
Merge branch 'PHP-7.0'
...
* PHP-7.0:
fix #69537 : __debugInfo with empty string for key gives error
2016-04-03 12:38:53 +01:00
Joe Watkins
91c10662c8
fix #69537 : __debugInfo with empty string for key gives error
2016-04-03 12:38:25 +01:00
Andrea Faulds
1e82ad8038
Warn about invalid strings in arithmetic
...
Squashed commit of the following:
commit e05d3b6732
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Mar 30 01:43:35 2016 +0100
UPGRADING and NEWS
commit 6caf1d4585
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Mar 20 21:18:33 2016 +0000
Fixes
commit 6dadb1b0ef
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 02:15:01 2016 +0000
Add test for numeric string errors in assignment
commit bd5f04e8dd
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 23:53:05 2016 +0000
Add test for numeric string errors
commit c72e92f16d
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:28:33 2016 +0000
Add test for scientific notation in integer operations
commit d94c08852d
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:25:57 2016 +0000
Disable optimiser evaluation for numeric string errors
commit 30ee954ed1
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:46:25 2016 +0000
fixup
commit a6403b79e0
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 22:00:27 2016 +0000
Do not convert error-causing numeric strings ahead-of-time
commit f9dc354014
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 19:15:38 2016 +0000
Disable compile-time evaluation for numeric string errors
commit e05b0cc849
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Feb 5 11:42:26 2016 +0000
Make _zval_get_long_func_noisy function for inlining
commit 84d66321a5
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:10:00 2016 +0000
Update tests
commit 5ac4a0cc4b
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 22:08:19 2016 +0000
Use is_numeric_string_ex for zval_get_long etc.
commit c21f088485
Author: Andrea Faulds <ajf@ajf.me>
Date: Thu Jan 7 21:13:04 2016 +0000
Update tests
commit 63e214cf81
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Jan 6 00:28:01 2016 +0000
Warn on non-/bad numeric strings in arithmetic
2016-03-30 01:44:27 +01:00
Bob Weinand
9600ddbd1a
Merge remote-tracking branch 'origin/PHP-7.0'
2016-03-27 00:57:56 +01:00