PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PHP » PHP_Compat » Bug #4857

Add property_exists

Details

Request #4857Add property_exists
Submitted2005-07-19 09:58 UTC
Fromwebmaster at ragnarokonline dot de
Assignedaidan
StatusClosed
PackagePHP_Compat
PHP VersionIrrelevant
OSN/A
Roadmaps(Not assigned)

Comments

[2005-07-19 09:58 UTC] webmaster at ragnarokonline dot de

Description:
------------
Reminder bug to add property_exists to PHP_Compat.

[2005-07-19 14:06 UTC] webmaster at ragnarokonline dot de

Ok, here is the recent version:
http://www.ragnarokonline.de/~stadler/scripts/property_exists.phps

I've removed the part, thats using class_exists($class, false) for PHP >= 5.0.0, since I looked at the source and autoloading is intended.

I've ran a test generated from http://cvs.php.net/php-src/tests/classes/property_exists.phpt (Revision 1.3 atm) with PHP 5.0.4 installed locally. The results are in the same folder as the scripts above. The documentation says, that property_exists should return false for private and protected propertys, but the test expects, that property_exists should return true in that case. Bug in the docs or in the test/source?

Regards,
Christian Stadler