Skip to content

Ffi\Ptr::null() and new Ffi\Ptr(...) die with Class "Ffi\Ptr" not found in a user program although docs/ffi.md lists them #400

Closed

Description

@blacktrs

Summary

Ffi\Ptr::null() and new Ffi\Ptr(...) die with Class "Ffi\Ptr" not found in a user program although docs/ffi.md lists them.

Repro

<?php
use Ffi\Ptr;
var_dump(Ptr::null()->isNull());
var_dump((new Ptr(8))->offset(8)->address);

Expected (php)

bool(true)
int(16)

Actual (manticore 844dd6cd, Darwin arm64)


[exit code 255]
PHP Fatal error:  Uncaught Error: Class "Ffi\Ptr" not found

Tracking

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