#29307 [Com]: The Reflection Information Is Incorrect
| From: | gpopmail at gmail dot com | Date: | Mon, 09 Aug 2004 18:27:21 +0000 |
| Subject: | #29307 [Com]: The Reflection Information Is Incorrect | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969362993@lists.php.net to get a copy of this message | ||
ID: 29307
Comment by: gpopmail at gmail dot com
Reported By: timothy dot may at gmail dot com
Status: Bogus
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
Same problem here...
Fatal error: Class 'reflection_class' not found in
C:\apachefriends\xampp\htdocs\PHP\Delegate\index.php on line 9
Previous Comments:
------------------------------------------------------------------------
[2004-07-26 15:21:29] nlopess@php.net
duplicate of #29130
------------------------------------------------------------------------
[2004-07-21 16:42:36] timothy dot may at gmail dot com
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 this bug report at http://bugs.php.net/?id=29307&edit=1