RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator
$a ??= $b is $a ?? ($a = $b), with the difference that $a is only
evaluated once, to the degree that this is possible. In particular
in $a[foo()] ?? $b function foo() is only ever called once.
However, the variable access themselves will be reevaluated.
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734, which is a squash of PR #3313.
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
determine whether pass by ref is possible or pass by value is needed.
# This is usefull when functions take array or string parameters as
# expressions. In such a case force by ref is not applicable and the
# executor would copy the variable unnecessarily as soon as it is at least
# once referenced.
- Extensions which delete global variables need to use new special function
- delete_global_variable() (I'm about to rename it) to remove them.
- Will post to internals@ or via commit messages if there's anything else.
a) We specialize opcodes according to op_type fields. Each opcode has to
be marked with which op_type's it uses.
b) We support different execution methods. Function handlers, switch()
and goto dispatching. goto seems to be the fastest but it really
depends on the compiler and how well it optimizes. I suggest playing
around with optimization flags.
- Warning: Things might break so keep us posted on how things are going.
(Dmitry, Andi)