#29307 [Opn->Bgs]: The Reflection Information Is Incorrect
| From: | nlopess@php.net | Date: | Mon, 26 Jul 2004 13:21:30 +0000 |
| Subject: | #29307 [Opn->Bgs]: The Reflection Information Is Incorrect | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969362168@lists.php.net to get a copy of this message | ||
ID: 29307
Updated by: nlopess@php.net
Reported By: timothy dot may at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
duplicate of #29130
Previous Comments:
------------------------------------------------------------------------
[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