Repository navigation
Changed
- Added an inline cache to each method and static call site, so a call on the same class from the same class runs the method it resolved before without looking it up again #2790
- Changed
==and!=betweennulland avar,stringorarrayto PHP's loose comparison, wherefalse,0,0.0,""and[]equalnull, reported by the newloose-null-comparisonwarning; use===to test fornull#2820 - Changed
__METHOD__to PHP'sClass::method, with the namespace, the declaring trait of a trait method and the namespaced name in a function #2825 - Changed
__FUNCTION__and__METHOD__in a closure to the name PHP gives it,Ns\{closure}before PHP 8.4 and{closure:Class::method():LINE}from 8.4 #2825 - Added a cache record to each static property access, so a repeated read or write of
self::x,parent::xorX::xskips the property lookup #2805 - Raised the minimum
ext-zephir_parserto 2.11.0 for theX::classparameter default grammar and the closure start line PHP 8.4 names a closure after #2825
Fixed
- Fixed a recursive
this->m()in a loop, and a call in a loop on a local first assigned withnew, running the method another object's class resolved to #2790 - Fixed a computed
boolin an array literal, such as["k": a > b], being stored asfalse#2771 - Fixed a computed
boolargument to a PHP function, such asintval(a > b), failing to compile #2771 - Fixed
==and===between aboollocal or computedbooland avaralways comparing thevarwithfalse, which brokeswitch true { case x: }#2771 - Fixed a
switch truecase such astypeof x == "string"never matching #2771 - Fixed a
boolornullcompared with a number being compared as numbers instead of asboolvalues #2771 - Fixed
<,<=,>and>=between abooland avar, and comparisons of aboollocal with anintlocal or anotherbool, or of a native local withnull, failing to compile #2771 - Fixed comparing a
varwith adoublecrashing the compiler, or failing to load becausezephir_compare_strict_double()was missing #2771 - Fixed a
doublecompared with an integer or avarbeing truncated to an integer, and===between an integer and adoublebeing true #2771 - Fixed
>and>=against avarholdingNANbeing true #2771 - Fixed a
charextension global in a comparison being emitted as a multi-character C constant #2771 - Fixed a property default array key that is a constant or an expression, such as
self::ON, failing to compile #2771 - Fixed PHP
boolconstants such asZEND_THREAD_SAFEand"boolean"extension globals failing to compile #2771 - Fixed
<,<=,>and>=betweennulland avar,stringorarraycomparing types instead of values #2820 - Fixed
nullcompared with anarraylocal or a string or array literal failing to compile #2820 - Fixed an explicit
nullpassed to a nullablearrayorstringparameter becoming[]or""#2820 - Fixed
fetchandemptyon an empty array element writing into the source array, corrupting OPcache shared memory and Zephir array constants #2826 - Fixed
X::classof a global class, such asDateTime::class, andparent::classof a global parent starting with a backslash #2825 - Fixed
X::classfailing to compile for a class unknown at compile time, and not keeping the case it is written in #2825 - Fixed a
usealias written in another case, such asdatetimeafteruse DateTime, not naming the imported class #2825 - Fixed
self::class,X::class,__CLASS__,__NAMESPACE__and__METHOD__corrupting a namespace segment that starts like a C escape, such as\nested#2825 - Fixed
__METHOD__,__CLASS__and__NAMESPACE__in a function crashing the compiler, and__TRAIT__being unsupported #2825 - Fixed names in a method, property or constant merged from a trait resolving against the using class's file instead of the trait's #2825
- Fixed
self,parentandstaticin a closure resolving against the closure class instead of the class it is written in and its called class #2825 - Fixed
self,parentandstaticin a closure written in a function not throwing PHP's Error #2825 - Fixed
let this->prop[] = valuein a closure failing to compile #2825 - Fixed
new parent()andinstanceof parentwith a namespaced PHP parent class failing to compile #2825 - Fixed a class redefining a constant of its parent failing at module startup #2825
- Fixed
self::method()of a non-static method from a static context crashing instead of throwing PHP's Error #2825 - Fixed a class constant,
X::classor PHP constant as an array constant element or key, or as a typed or trait property default, failing to compile #2825 - Fixed a property default reading a single-quoted string constant being
null#2825 - Fixed
\Attribute::TARGET_*as an array constant key becoming0#2825 - Fixed
static::in a class constant being accepted, where PHP refuses it #2825 - Fixed a class constant read from another class resolving
self::against the reading class #2825 - Fixed a PHP string constant with a control character, such as
PHP_EOL, in a declaration producing invalid C #2825 - Fixed
X::class, and a class constant orX::classas an array key, failing to parse as a parameter default #2825 - Fixed a non-empty array parameter default being empty, or failing to compile on an untyped parameter #2825
- Fixed Reflection reporting no default for an untyped parameter and the wrong default for an array, a union-typed or an escaped string parameter #2825
- Fixed IDE stubs escaping a string constant twice, such as
'Stub\\\\Constants'#2825 - Fixed reading an uninitialized typed static property, alone or in
+=,-=,*=or.=, not throwing PHP's Error #2805 - Fixed
issetof a static property, and of a property named by a string such asthis->{"x"}, always being true #2805 - Fixed a copy read from a property or static property that PHP code holds by reference changing the property #2805
- Fixed code after a static property assignment that throws, such as a TypeError, still running #2805
- Fixed a property read answered by
__get(), such aso->x, leaking the value it returned #2805 - Fixed a static property read in some methods freeing the property's value at the end of the method #2805
- Fixed a property read such as
o->xcalling__isset()before__get(), and readingnullwhen__isset()returned false #2831 - Fixed reading a protected or private property from outside its class giving
nullinstead of throwing PHP's Error #2784 - Fixed reading an undefined property, or a property of a non-object, not raising PHP's warning #2808
- Fixed reading an uninitialized typed property giving
nullinstead of throwing PHP's Error #2831 - Fixed
empty o->xcalling__get()on an object without__isset(), where PHP treats the property as empty #2831 - Fixed
isset o->x->yandempty o->x->yraising a notice whenooro->xis not an object #2831 - Fixed
o->{n}with a non-stringn, such as anint, always readingnulland failingissetinstead of converting the name as PHP does #2831 - Fixed code after a property read,
issetoremptythat throws still running #2831 - Fixed
issetof a property in one block of a method and of the same property after that block generating C that does not compile #2831