Changeset 704
- Timestamp:
- 06/02/07 17:49:24 (2 years ago)
- Files:
-
- trunk/examples/docroot/reflection/annotations.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/examples/docroot/reflection/annotations.php
r701 r704 103 103 checkForFoo('MyClass'); 104 104 checkForFoo('ConstantAnnotation'); 105 //checkForFoo('MyClass2');105 checkForFoo('MyClass2'); 106 106 print "</pre>"; 107 107 … … 114 114 115 115 print "Annotation foo is present:\n"; 116 printf("bar : %s\n", var _export($foo->getBar(), true));117 printf("baz : %s\n", var _export($foo->getBaz(), true));116 printf("bar : %s\n", varToString($foo->getBar())); 117 printf("baz : %s\n", varToString($foo->getBaz(), true)); 118 118 } else { 119 119 print "Annotation foo is *not* present:\n"; … … 122 122 } 123 123 124 function varToString($var) { 125 if (is_object($var)) { 126 return $var->__toString(); 127 } 128 return var_export($var, true); 129 } 124 130 ?>
