PHP 8.4.24 Released!

Voting

: six minus three?
(Example: nine)

The Note You're Voting On

Nimja
8 years ago
Note that this magic constant DOES NOT load classes. And in fact can work on classes that do not exist.

This means it does not mess with auto-loading.

<?php
    $className = \Foo\Bar::class;
    var_dump($className);
    var_dump(class_exists($className, false));
?>

Will output: 

    string(7) "Foo\Bar"
    bool(false)

<< Back to user notes page

To Top