note 93336 added to language.oop5.overloading
| From: | info/a/nopticon/dot/com at osu1 dot php dot net | Date: | Thu, 03 Sep 2009 18:38:07 +0000 |
| Subject: | note 93336 added to language.oop5.overloading | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160200@lists.php.net to get a copy of this message | ||
Code from kexianbin at diyism dot com is very useful, but if you want to use this syntax:
<?php
$o('abcd')->substr(this, 2, 2)->strlen()->echo();
$o()->substr('abcd', 1, 3)->strlen()->echo();
?>
(Note that 'this' was removed from strlen and echo)
Before this line:
<?php
foreach ($pars as &$v)
?>
Add the following code:
<?php
if (!count($pars))
{
$pars = array(this);
}
?>
----
Server IP: 200.110.240.132
Probable Submitter: 200.49.167.170
----
Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php
Edit -- https://master.php.net/note/edit/93336
Del: integrated -- https://master.php.net/note/delete/93336/integrated
Del: useless -- https://master.php.net/note/delete/93336/useless
Del: bad code -- https://master.php.net/note/delete/93336/bad+code
Del: spam -- https://master.php.net/note/delete/93336/spam
Del: non-english -- https://master.php.net/note/delete/93336/non-english
Del: in docs -- https://master.php.net/note/delete/93336/in+docs
Del: other reasons-- https://master.php.net/note/delete/93336
Reject -- https://master.php.net/note/reject/93336
Search -- https://master.php.net/manage/user-notes.php