You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 != between null and a var, string or array to PHP's loose comparison, where false, 0, 0.0, "" and [] equal null, reported by the new loose-null-comparison warning; use === to test for null#2820
Changed __METHOD__ to PHP's Class::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::x or X::x skips the property lookup #2805
Raised the minimum ext-zephir_parser to 2.11.0 for the X::class parameter 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 with new, running the method another object's class resolved to #2790
Fixed a computed bool in an array literal, such as ["k": a > b], being stored as false#2771
Fixed a computed bool argument to a PHP function, such as intval(a > b), failing to compile #2771
Fixed == and === between a bool local or computed bool and a var always comparing the var with false, which broke switch true { case x: }#2771
Fixed a switch true case such as typeof x == "string" never matching #2771
Fixed a bool or null compared with a number being compared as numbers instead of as bool values #2771
Fixed <, <=, > and >= between a bool and a var, and comparisons of a bool local with an int local or another bool, or of a native local with null, failing to compile #2771
Fixed comparing a var with a double crashing the compiler, or failing to load because zephir_compare_strict_double() was missing #2771
Fixed a double compared with an integer or a var being truncated to an integer, and === between an integer and a double being true #2771
Fixed > and >= against a var holding NAN being true #2771
Fixed a char extension 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 bool constants such as ZEND_THREAD_SAFE and "boolean" extension globals failing to compile #2771
Fixed <, <=, > and >= between null and a var, string or array comparing types instead of values #2820
Fixed null compared with an array local or a string or array literal failing to compile #2820
Fixed an explicit null passed to a nullable array or string parameter becoming [] or ""#2820
Fixed fetch and empty on an empty array element writing into the source array, corrupting OPcache shared memory and Zephir array constants #2826
Fixed X::class of a global class, such as DateTime::class, and parent::class of a global parent starting with a backslash #2825
Fixed X::class failing to compile for a class unknown at compile time, and not keeping the case it is written in #2825
Fixed a use alias written in another case, such as datetime after use 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, parent and static in a closure resolving against the closure class instead of the class it is written in and its called class #2825
Fixed self, parent and static in a closure written in a function not throwing PHP's Error #2825
Fixed let this->prop[] = value in a closure failing to compile #2825
Fixed new parent() and instanceof parent with 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::class or 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 becoming 0#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 or X::class as 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 isset of a static property, and of a property named by a string such as this->{"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 as o->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->x calling __isset() before __get(), and reading null when __isset() returned false #2831
Fixed reading a protected or private property from outside its class giving null instead 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 null instead of throwing PHP's Error #2831
Fixed empty o->x calling __get() on an object without __isset(), where PHP treats the property as empty #2831
Fixed isset o->x->y and empty o->x->y raising a notice when o or o->x is not an object #2831
Fixed o->{n} with a non-string n, such as an int, always reading null and failing isset instead of converting the name as PHP does #2831
Fixed code after a property read, isset or empty that throws still running #2831
Fixed isset of a property in one block of a method and of the same property after that block generating C that does not compile #2831
This discussion was created from the release 1.8.0.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
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__METHOD__to PHP'sClass::method, with the namespace, the declaring trait of a trait method and the namespaced name in a function #2825__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 #2825self::x,parent::xorX::xskips the property lookup #2805ext-zephir_parserto 2.11.0 for theX::classparameter default grammar and the closure start line PHP 8.4 names a closure after #2825Fixed
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 #2790boolin an array literal, such as["k": a > b], being stored asfalse#2771boolargument to a PHP function, such asintval(a > b), failing to compile #2771==and===between aboollocal or computedbooland avaralways comparing thevarwithfalse, which brokeswitch true { case x: }#2771switch truecase such astypeof x == "string"never matching #2771boolornullcompared with a number being compared as numbers instead of asboolvalues #2771<,<=,>and>=between abooland avar, and comparisons of aboollocal with anintlocal or anotherbool, or of a native local withnull, failing to compile #2771varwith adoublecrashing the compiler, or failing to load becausezephir_compare_strict_double()was missing #2771doublecompared with an integer or avarbeing truncated to an integer, and===between an integer and adoublebeing true #2771>and>=against avarholdingNANbeing true #2771charextension global in a comparison being emitted as a multi-character C constant #2771self::ON, failing to compile #2771boolconstants such asZEND_THREAD_SAFEand"boolean"extension globals failing to compile #2771<,<=,>and>=betweennulland avar,stringorarraycomparing types instead of values #2820nullcompared with anarraylocal or a string or array literal failing to compile #2820nullpassed to a nullablearrayorstringparameter becoming[]or""#2820fetchandemptyon an empty array element writing into the source array, corrupting OPcache shared memory and Zephir array constants #2826X::classof a global class, such asDateTime::class, andparent::classof a global parent starting with a backslash #2825X::classfailing to compile for a class unknown at compile time, and not keeping the case it is written in #2825usealias written in another case, such asdatetimeafteruse DateTime, not naming the imported class #2825self::class,X::class,__CLASS__,__NAMESPACE__and__METHOD__corrupting a namespace segment that starts like a C escape, such as\nested#2825__METHOD__,__CLASS__and__NAMESPACE__in a function crashing the compiler, and__TRAIT__being unsupported #2825self,parentandstaticin a closure resolving against the closure class instead of the class it is written in and its called class #2825self,parentandstaticin a closure written in a function not throwing PHP's Error #2825let this->prop[] = valuein a closure failing to compile #2825new parent()andinstanceof parentwith a namespaced PHP parent class failing to compile #2825self::method()of a non-static method from a static context crashing instead of throwing PHP's Error #2825X::classor PHP constant as an array constant element or key, or as a typed or trait property default, failing to compile #2825null#2825\Attribute::TARGET_*as an array constant key becoming0#2825static::in a class constant being accepted, where PHP refuses it #2825self::against the reading class #2825PHP_EOL, in a declaration producing invalid C #2825X::class, and a class constant orX::classas an array key, failing to parse as a parameter default #2825'Stub\\\\Constants'#2825+=,-=,*=or.=, not throwing PHP's Error #2805issetof a static property, and of a property named by a string such asthis->{"x"}, always being true #2805__get(), such aso->x, leaking the value it returned #2805o->xcalling__isset()before__get(), and readingnullwhen__isset()returned false #2831nullinstead of throwing PHP's Error #2784nullinstead of throwing PHP's Error #2831empty o->xcalling__get()on an object without__isset(), where PHP treats the property as empty #2831isset o->x->yandempty o->x->yraising a notice whenooro->xis not an object #2831o->{n}with a non-stringn, such as anint, always readingnulland failingissetinstead of converting the name as PHP does #2831issetoremptythat throws still running #2831issetof a property in one block of a method and of the same property after that block generating C that does not compile #2831This discussion was created from the release 1.8.0.
All reactions