note 93336 deleted from language.oop5.overloading by danbrown
| From: | danbrown@php.net | Date: | Thu, 03 Sep 2009 19:24:47 +0000 |
| Subject: | note 93336 deleted from language.oop5.overloading by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160204@lists.php.net to get a copy of this message | ||
Note Submitter: info /a/ nopticon /dot/ com
----
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);
}
?>