Annotation of embedaddon/php/ext/standard/tests/class_object/property_exists_variation1.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test property_exists() function : class auto loading  
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : bool property_exists(mixed object_or_class, string property_name)
                      6:  * Description: Checks if the object or class has a property 
                      7:  * Source code: Zend/zend_builtin_functions.c
                      8:  * Alias to functions: 
                      9:  */
                     10: 
                     11: echo "*** Testing property_exists() : class auto loading ***\n";
                     12: 
                     13: function __autoload($class_name) {
                     14:     require_once $class_name . '.inc';
                     15: }
                     16: 
                     17: echo "\ntesting property in autoloaded class\n";
                     18: var_dump(property_exists("AutoTest", "bob"));
                     19: 
                     20: echo "\ntesting __get magic method\n";
                     21: var_dump(property_exists("AutoTest", "foo"));
                     22: 
                     23: ?>
                     24: ===DONE===
                     25: --EXPECTF--
                     26: *** Testing property_exists() : class auto loading ***
                     27: 
                     28: testing property in autoloaded class
                     29: bool(true)
                     30: 
                     31: testing __get magic method
                     32: bool(false)
                     33: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>