#29130 [Opn]: Reflection API example not correct
| From: | nlopess@php.net | Date: | Wed, 14 Jul 2004 10:56:46 +0000 |
| Subject: | #29130 [Opn]: Reflection API example not correct | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969361849@lists.php.net to get a copy of this message | ||
ID: 29130
Updated by: nlopess@php.net
Reported By: christopher dot watford at gmail dot com
Status: Open
Bug Type: Documentation problem
Operating System: Any
PHP Version: 5.0.0
New Comment:
http://www.php.net/zend-engine-2.php is still
linked from the download
page, and it shouldn't be IMHO, as this page was integrated in the
migration chapter (that will be replaced when the new OOP5 chapter is
ready).
the migration5.oop.php file is more up-to-date than the original one,
as I've updated a couple of things there.
Full reflection documentation will be avaliable in the next manual
build (docs already in CVS).
Previous Comments:
------------------------------------------------------------------------
[2004-07-14 01:57:53] christopher dot watford at gmail dot com
Description:
------------
The Reflection API listed on http://www.php.net/zend-engine-2.php has
the wrong class names. The link offsite contains the wrong
documentation too, however, since it is out of your control its not
such a big deal.
Moreover, your page on Migrating to PHP5
(http://www.php.net/manual/en/migration5.oop.php) has the correct
documentation. But also has the link to the conflicting class names
offsite.
Reproduce code:
---------------
Actual Documentation:
<?php
class Foo {
public $prop;
function Func($name) {
echo "Hello $name";
}
}
reflection_class::export('Foo');
reflection_object::export(new Foo);
reflection_method::export('Foo', 'func');
reflection_property::export('Foo', 'prop');
reflection_extension::export('standard');
?>
Expected result:
----------------
Expected Documentation:
<?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');
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29130&edit=1