Re: Execution order of PHP
| From: | Auke van Slooten | Date: | Thu, 11 Mar 2010 12:50:09 +0000 |
| Subject: | Re: Execution order of PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-302698@lists.php.net to get a copy of this message | ||
Jochem Maas wrote:
Op 3/10/10 1:29 PM, Auke van Slooten schreef:I've decided to rewrite the API so it is more upfront about what it does. Your argument about readability, when the API is unknown, is a valid one. It now works like this: $client->system->multiCall( ripcord::encodeCall('methodOne'), ripcord::encodeCall('methodTwo') ); Thanks for all your input, Auke van Slooten MuzeHi, In a hobby project I'm relying on the order in which the following piece of PHP code is executed: $client->system->multiCall( $client->methodOne(), $client->methodTwo() );but who cares. the code is full of magic, which makes it difficult to understand and maintain ... fix it so that it's explicit about what it's doing so that other developers who read it will grasp the concept without having to dig into your magic methods. this solves the problem of undiscernable magic and possible issues with resolution order in the future as well (which if they happened would be a royal PITA to debug, given the magic methods involved)