note 88392 added to overload.examples.basic
| From: | ly dot sitthykun at yahoo dot com | Date: | Thu, 22 Jan 2009 05:47:50 +0000 |
| Subject: | note 88392 added to overload.examples.basic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149643@lists.php.net to get a copy of this message | ||
<?php
class Foo{
public function method(){
echo "call Method no paramater";
}
public function method($par){
echo "call Method has a paramater";
}
}
$foo = new Foo();
echo $foo->method("param");]
?>
#output:
Fatal error: Cannot redeclare Foo::method() in class_overload.php on line 6
why?
we can not create the same method name.
----
Server IP: 69.147.83.197
Probable Submitter: 124.108.48.2 (proxied: 124.108.52.49)
----
Manual Page -- http://www.php.net/manual/en/overload.examples.basic.php
Edit -- https://master.php.net/note/edit/88392
Del: integrated -- https://master.php.net/note/delete/88392/integrated
Del: useless -- https://master.php.net/note/delete/88392/useless
Del: bad code -- https://master.php.net/note/delete/88392/bad+code
Del: spam -- https://master.php.net/note/delete/88392/spam
Del: non-english -- https://master.php.net/note/delete/88392/non-english
Del: in docs -- https://master.php.net/note/delete/88392/in+docs
Del: other reasons-- https://master.php.net/note/delete/88392
Reject -- https://master.php.net/note/reject/88392
Search -- https://master.php.net/manage/user-notes.php