Skip to content

A nullsafe call with a variable method name on null ($n?->$h(1)) does not yield null. #391

Closed

Description

@blacktrs

Summary

A nullsafe call with a variable method name on null ($n?->$h(1)) does not yield null.

Repro

<?php
$n = null;
$h = "m";
var_dump($n?->$h(1));

Expected (php)

NULL

Actual (manticore 96d0daa4, Darwin arm64)

float(0)

Tracking

Known-bug repro: tests/aot/repro/wrong/nullsafe_dynmethod_null.php — bash tests/aot/xfail.sh -k nullsafe_dynmethod_null reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    wrong-answer
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions