For Programmers: Free Programming Magazines  


Home > Archive > PHP Mirrors > July 2004 > #29130 [Opn]: Reflection API example not correct









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #29130 [Opn]: Reflection API example not correct
nlopess@php.net

2004-07-26, 3:57 pm

ID: 29130
Updated by: nlopess@php.net
Reported By: christopher dot watford at gmail dot com
Status: Open
-Bug Type: Documentation problem
+Bug Type: Website problem
Operating System: Any
PHP Version: 5.0.0
New Comment:

http://php.net/manual/en/language.oop5.php is now up-to-date.
I think you could redirect the zend-engine-2.php page to this manual
page.


Previous Comments:
------------------------------------------------------------------------

[2004-07-14 12:56:44] nlopess@php.net

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).

------------------------------------------------------------------------

[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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com