1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 06:02:23 +02:00
Commit Graph

11621 Commits

Author SHA1 Message Date
Nikita Popov
3ad0e1d6ca Fix static method arg binding in traits 2016-04-08 01:48:21 +02:00
Nikita Popov
75af8150f5 Forbid binding methods to incompatible $this
This prohibits binding closures returned by
ReflectionMethod::getClosure() to a $this, which is not an
instance of the method scope. This restriction was already in
place for internal methods, now it is extended to user methods.

ML discussion: http://markmail.org/message/zepnhdyr3kij6di6
2016-04-08 00:38:44 +02: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
Nikita Popov
2eff141444 Merge branch 'PHP-7.0' 2016-04-07 12:30:06 +02:00
Nikita Popov
aad4ecebf8 Fixed bug #71980 2016-04-07 12:29:59 +02:00
Nikita Popov
5c7903f477 Merge branch 'PHP-7.0' 2016-04-07 05:52:51 +02:00
Nikita Popov
5ab950cb2c Remove __halt_compiler from semi-reserved tokens
token_get_all() is not capable of dealing with this one correctly.
2016-04-07 05:52:32 +02:00
Dmitry Stogov
3c305c14f6 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed build
2016-04-07 01:00:34 +03:00
Dmitry Stogov
088f55ae74 Fixed build 2016-04-07 00:59:21 +03:00
Kalle Sommer Nielsen
fdff901cad Fix the build 2016-04-06 22:25:05 +02:00
Dmitry Stogov
936f161402 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71978 (Existence of return type hint affects other compatibility rules)
2016-04-06 17:20:43 +03:00
Dmitry Stogov
e9d65160e8 Fixed bug #71978 (Existence of return type hint affects other compatibility rules) 2016-04-06 17:17:10 +03:00
Dmitry Stogov
a186ac0e47 IS_CONST operands don't have to be separated. Use reference-counting instead of duplication.
- with opcache all IS_CONST operands are not refcounted (scalars, interned strings or immutable arrays)
- without opcache IS_CONST operands are not shared between processes or threads and may use common reference counters
2016-04-05 20:09:14 +03:00
Dmitry Stogov
32d6ac4ddf RETURN micro optimization 2016-04-05 16:45:15 +03:00
Dmitry Stogov
d0c6c179cd Initialize op_array->run_time_cache on slow path of INIT_FCALL opcode and omit corresponding check on fast path of DO_FCALL. 2016-04-05 00:01:00 +03:00
Dmitry Stogov
e7730fece6 Fised possible use-after-free 2016-04-04 09:35:48 +03:00
Joe Watkins
9a38b2dbce Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0 2016-04-03 12:41:23 +01:00
Joe Watkins
79073743ea Merge branch 'master' of https://github.com/php/php-src 2016-04-03 12:41:08 +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
Xinchen Hui
67476872cd Merge branch 'PHP-7.0' 2016-04-01 22:27:42 +08:00
Xinchen Hui
5b1bb41c0b Fixed bug #71930 (_zval_dtor_func: Assertion `(arr)->gc.refcount <= 1' failed) 2016-04-01 22:27:29 +08:00
Dmitry Stogov
7abfaac901 Merge zend_execute_data->called_scope into zend_execute_data->This.
"called_scope" made sense only for static method calls, for dynamic calls it was always equal to the class of $this.
Now EG(This) may store IS_OBJECT + $this or IS_UNUSED + "called_scope" (of course, "called_scope" may be NULL).
Some code might need to be adopted to support this change.
Checks (Z_OBJ(EX(This))) might need to be converted into (Z_TYPE(EX(This)) == IS_OBJECT).
2016-04-01 16:17:49 +03:00
Dmitry Stogov
86a1aeed22 Flags ZEND_CALL_RELEASE_THIS and ZEND_CALL_CLOSURE should never be set together.
Closures keep responsibility for releasing $this theirselves.
2016-03-31 18:58:13 +03:00
Dmitry Stogov
fcbe1e8edf Use CALL_INFO flag to check if we need to destroy symbol_table.
This saves one memory load on most RETURN opcodes.
2016-03-31 18:47:25 +03:00
Nikita Popov
29bc5a0b0f Merge branch 'PHP-7.0' 2016-03-30 18:32:29 +02:00
Nikita Popov
f95679885f Fix __invoke comparison in closure_get_method
It compared against the wrong variable. Fixed this by getting rid
of lc_name entirely and use equals_literal_ci instead.
2016-03-30 18:32:00 +02:00
Andrea Faulds
6ce873b546 Fix two tests on 32-bit 2016-03-30 13:48:51 +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
Nikita Popov
e514d85915 Merge branch 'PHP-7.0' 2016-03-29 19:29:55 +02:00
Nikita Popov
ed06d130f7 Fixed bug #71922 2016-03-29 19:29:19 +02:00
Nikita Popov
32294a25c8 Fixed bug #62814 2016-03-29 19:08:17 +02:00
Joe Watkins
5074fd9c7c Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0 2016-03-29 11:34:58 +01:00
Joe Watkins
8f1d6c5bb5 Merge branch 'master' of https://github.com/php/php-src 2016-03-29 11:34:46 +01:00
Joe Watkins
8ae3524a13 Merge branch 'PHP-7.0'
* PHP-7.0:
  remove unused param
2016-03-29 11:34:31 +01:00
Joe Watkins
d12ed0c7fa remove unused param 2016-03-29 11:34:18 +01:00
Xinchen Hui
a654e84742 Merge branch 'PHP-7.0'
* PHP-7.0:
  Update tests
2016-03-29 17:53:05 +08:00
Xinchen Hui
256593abcf Update tests 2016-03-29 17:52:58 +08:00
Xinchen Hui
0a2746fb4b Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71914 (Reference is lost in "switch")
2016-03-29 17:14:48 +08:00
Xinchen Hui
2e6d70787c Fixed bug #71914 (Reference is lost in "switch") 2016-03-29 17:14:36 +08:00
Joe Watkins
45035b1b8d Merge branch 'PHP-7.0'
* PHP-7.0:
  fix bug #71428: Validation type inheritance with = NULL
2016-03-29 09:58:06 +01:00
Joe Watkins
dd70c39556 fix bug #71428: Validation type inheritance with = NULL 2016-03-29 09:57:51 +01:00
Joe Watkins
bdd05e7483 Merge branch 'PHP-7.0'
* PHP-7.0:
  Bug #71428 work ... hopefully, fix drupal 8
2016-03-29 09:36:46 +01:00
Joe Watkins
3f56dfe866 Bug #71428 work ... hopefully, fix drupal 8 2016-03-29 09:36:08 +01:00
Joe Watkins
34d8fea1a8 Merge branch 'PHP-7.0'
* PHP-7.0:
  work on #71428
2016-03-28 11:55:03 +01:00
Joe Watkins
ee9a78a033 work on #71428 2016-03-28 11:54:25 +01:00
Joe Watkins
fe559731e2 Merge branch 'PHP-7.0'
* PHP-7.0:
  my commits are bad, and I feel bad (test for bug #71414)
2016-03-27 00:04:30 +00:00
Joe Watkins
32df2210d7 my commits are bad, and I feel bad (test for bug #71414) 2016-03-26 23:59:46 +00:00
Bob Weinand
9600ddbd1a Merge remote-tracking branch 'origin/PHP-7.0' 2016-03-27 00:57:56 +01:00
Joe Watkins
4327370d13 fix #71414 (Interface method override inherited method and implemented in a trait causes fatal error) 2016-03-26 23:47:31 +00:00