Skip to content

get_class_vars() is undefined: it traps with "Call to undefined function" instead of returning the scope-visible default properties. #265

Closed

Description

@blacktrs

Summary

get_class_vars() is undefined: it traps with "Call to undefined function" instead of returning the scope-visible default properties.

Repro

<?php
class A { public $x = 1; protected $y = 2; private $z = 3; public int $t; public static $s = 4; public function inside() { return get_class_vars(self::class); } }
echo json_encode(get_class_vars('A')), "\n", json_encode((new A)->inside()), "\n";

Expected (php)

{"x":1,"t":null,"s":4}
{"x":1,"y":2,"z":3,"t":null,"s":4}

Actual (manticore b6110020, Darwin arm64)


[exit code 255]
PHP Fatal error:  Uncaught Error: Call to undefined function get_class_vars()

Tracking

Known-bug repro: tests/aot/repro/wrong/get_class_vars_missing.php — bash tests/aot/xfail.sh -k get_class_vars_missing 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 15, 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