Skip to content

Bug sweep 2: (array) of interface-typed values, array_replace, dynamic new, reflection (#244 #253–#256 #258 #295 #409) - #470

Merged
blacktrs merged 3 commits into
mainfrom
fix/bug-sweep-2026-10-25b
Oct 25, 2026
Merged

blacktrs merged 3 commits into
mainfrom
fix/bug-sweep-2026-10-25b

Conversation

@blacktrs

Copy link
Copy Markdown
Contributor

What

Not done

#467: (array)$exception still has a different key set than php (needs a prelude Exception visibility/layout change).

Risk / gates owed

  • Programs with new $var or computed-name class_exists/ReflectionClass now link the SPL/array/DateTime preludes: binary size and compile time grow (symfony-style apps). Fallback: gate on the names that matter.
  • rmeta layout change (v6) and Exception property reorder (var_dump/serialize order of exceptions): Linux gate, difftest and self-host fixpoint not run locally; targeted -k groups green on each half before the merge.
  • The merged branch was not rebuilt locally; CI is the first check of the combination.
  • docs/builtins.md / docs/design/memory-abi.md (RMETA_SIZE = 104) are stale.

…classed operands; type array_replace's accumulator as mixed

(array) of a value typed by an interface, an abstract class or a class with
subclasses read a layout that static type does not name (garbage / SIGSEGV).
It now takes the same class_id walk an erased receiver does.

array_replace's first copy loop narrowed its accumulator to the first array's
element type, so values from a later cell-typed array were unboxed as int.

Fixes #255
Fixes #256
Fixes #258
…on, constant attributes, Exception reflection

A `new $cls`, `class_exists($n)` or `new ReflectionClass($n)` with a computed
name now pulls the demand-gated built-in families (array/SPL, DateTime) into the
program; literal names in those lookups count as mentions. A raw scalar element
of a spread pack bound to a scalar parameter of another kind is coerced instead
of reaching the callee as a bare word. Class-constant attributes get their own
rmeta table (v6) read by ReflectionClassConstant::getAttributes(). Exception and
Error declare php's property set in php's order and hide the trace storage from
reflection.

Fixes #253
Fixes #254
Fixes #244
Fixes #295
Fixes #409
@blacktrs
blacktrs merged commit d21fefd into main Oct 25, 2026
36 checks passed
@blacktrs
blacktrs deleted the fix/bug-sweep-2026-10-25b branch October 25, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant