php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29130 Reflection API example not correct
Submitted: 2004-07-14 01:57 UTC Modified: 2004-10-16 03:55 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: christopher dot watford at gmail dot com Assigned:
Status: Closed Package: Website problem
PHP Version: 5.0.0 OS: Any
Private report: No CVE-ID: None
 [2004-07-14 01:57 UTC] 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');
?> 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-14 12:56 UTC] 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-26 13:53 UTC] nlopess@php.net
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.
 [2004-07-26 14:30 UTC] goba@php.net
At least a new manual build is needed before. Look:
  http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
 [2004-10-16 03:55 UTC] curt@php.net
http://www.php.net/zend-engine-2.php now redirects to the proper docs.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 24 12:00:02 2025 UTC