note 88304 added to language.oop5.overloading
| From: | teddevito at osu1 dot php dot net | Date: | Mon, 19 Jan 2009 22:25:00 +0000 |
| Subject: | note 88304 added to language.oop5.overloading | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149483@lists.php.net to get a copy of this message | ||
would be nice...
class Test {
public $a, $b, $c;
public $opts = array();
function __construct () {
foreach(func_get_args() as $arg => $val) :
if (property_exists($this,$arg)) $this->$arg = $val;
else $this->opts[$arg] => $val;
endforeach;
}
}
anybody know how to do something like this?
----
Server IP: 208.69.120.35
Probable Submitter: 96.40.107.9
----
Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php
Edit -- https://master.php.net/note/edit/88304
Del: integrated -- https://master.php.net/note/delete/88304/integrated
Del: useless -- https://master.php.net/note/delete/88304/useless
Del: bad code -- https://master.php.net/note/delete/88304/bad+code
Del: spam -- https://master.php.net/note/delete/88304/spam
Del: non-english -- https://master.php.net/note/delete/88304/non-english
Del: in docs -- https://master.php.net/note/delete/88304/in+docs
Del: other reasons-- https://master.php.net/note/delete/88304
Reject -- https://master.php.net/note/reject/88304
Search -- https://master.php.net/manage/user-notes.php