Skip to content

property_exists() answers false for a dynamic property of a stdClass, numeric name or not. #120

Closed

Description

@blacktrs

Summary

property_exists() answers false for a dynamic property of a stdClass, numeric name or not.

Repro

<?php
$o = new stdClass();
$o->{'5'} = 1;
$o->{'a'} = 2;
var_dump(property_exists($o, '5'), property_exists($o, 'a'), isset($o->{'5'}));

Expected (php)

bool(true)
bool(true)
bool(true)

Actual (manticore 46bda0f8, Darwin arm64)

bool(false)
bool(false)
bool(true)

Tracking

Known-bug repro: tests/aot/repro/wrong/property_exists_stdclass_dynamic_prop.php — bash tests/aot/xfail.sh -k property_exists_stdclass_dynamic_prop 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 7, 2026
  2. added a commit that references this issue on Oct 11, 2026
    8d472d6
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