For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > August 2005 > #34095 [Opn->Csd]: language/oop5/static.xml unclear about methods









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 #34095 [Opn->Csd]: language/oop5/static.xml unclear about methods
vrana@php.net

2005-08-30, 6:56 pm

ID: 34095
Updated by: vrana@php.net
Reported By: simp@php.net
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: All
PHP Version: Irrelevant
New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

It's possible but not recommended: "Calling non-static methods
statically generates an E_STRICT level warning."


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

[2005-08-12 12:28:31] simp@php.net

Description:
------------
Manual is a bit unclear about static methods. It doesn't imply that
calling non-static methods in a static context (using the paamayim
nekudotayim operator) is still valid.

Reproduce code:
---------------
<?php
class Foo {
public function __construct() {
}

public function fromObject() {
echo 'A call from the object <br/>';
}

public static function fromStatic() {
echo 'A static call <br/>';
}
}

Foo::fromObject();
Foo::fromStatic();
?>



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


--
Edit this bug report at http://bugs.php.net/?id=34095&edit=1
Sponsored Links







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

Copyright 2008 codecomments.com