PHP 8.5.0 Alpha 2 available for testing

Voting

: min(one, nine)?
(Example: nine)

The Note You're Voting On

Stefan W
11 years ago
If you are in a namespaced file, and you want to pass the class name as a string, you will have to include the full namespace for the class name - even from inside the same namespace:

<?
namespace MyNS;

class A {
public $foo;
}

property_exists("A", "foo"); // false
property_exists("\\MyNS\\A", "foo"); // true
?>

<< Back to user notes page

To Top