#29307 [NEW]: The Reflection Information Is Incorrect
| From: | timothy dot may at gmail dot com | Date: | Wed, 21 Jul 2004 14:42:37 +0000 |
| Subject: | #29307 [NEW]: The Reflection Information Is Incorrect | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-25464@lists.php.net to get a copy of this message | ||
From: timothy dot may at gmail dot com
Operating system: Irrelevant
PHP version: Irrelevant
PHP Bug Type: Website problem
Bug description: The Reflection Information Is Incorrect
Description:
------------
http://www.php.net/zend-engine-2.php
When I scroll to the bottom of the page, I reviewed the changes and the
addition of the reflection API. I decided to test it out and see how it
works. The code used as an example there does not work. The code pasted
has underscores in them which was renamed somewhere in the beta process.
I wanted to alert you so you can keep your content correct.
As a side note, the zend page is also incorrect.
http://www.zend.com/php5/articles/engine2-php5-changes.php
Reproduce code:
---------------
<?php
class Foo {
public $prop;
function Func($name) {
echo "Hello $name";
}
}
reflectionclass::export('Foo');
reflectionobject::export(new Foo);
reflectionmethod::export('Foo', 'func');
reflectionproperty::export('Foo', 'prop');
reflectionextension::export('standard');
?>
Expected result:
----------------
Class [ class Foo ] { @@ C:\web\Apache2\htdocs\test.php 2-7 - Constants
[0] { } - Static properties [0] { } - Static methods [0] { } - Properties
[1] { Property [ public $prop ] } - Methods [1] { Method [ public method
Func ] { @@ C:\web\Apache2\htdocs\test.php 4 - 6 - Parameters [1] {
Parameter #0 [ $name ] } } } } Object of class [ class Foo ] { @@
C:\web\Apache2\htdocs\test.php 2-7 - Constants [0] { } - Static properties
[0] { } - Static methods [0] { } - Properties [1] { Property [ public
$prop ] } - Dynamic properties [0] { } - Methods [1] { Method [ public
method Func ] { @@ C:\web\Apache2\htdocs\test.php 4 - 6 - Parameters [1] {
Parameter #0 [ $name ] } } } } Method [ public method Func ] { @@
etc...
Actual result:
--------------
Fatal error: Class 'reflection_class' not found in
C:\web\Apache2\htdocs\test.php on line 9
--
Edit bug report at http://bugs.php.net/?id=29307&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29307&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29307&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29307&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29307&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29307&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29307&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29307&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29307&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29307&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29307&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29307&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29307&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29307&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29307&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29307&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29307&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29307&r=float