Re: [PHP] Execution order of PHP

2010-03-11 Thread Auke van Slooten
Jochem Maas wrote: Op 3/10/10 1:29 PM, Auke van Slooten schreef: Hi, 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, whic

Re: [PHP] Execution order of PHP

2010-03-10 Thread Rene Veerman
You may not care about this, but from a readability perspective, i think relying on $client->system being as special as you describe, is not very readable. If i'd had to read code that does what you describe, i'd be much happier to see a datastructure be passed as was suggested elsewhere in this t

Re: [PHP] Execution order of PHP

2010-03-10 Thread Jochem Maas
Op 3/10/10 1:29 PM, Auke van Slooten schreef: > Hi, > > 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() > ); > > Currently PHP always resolves $client->system (a

Re: [PHP] Execution order of PHP

2010-03-10 Thread Daniel Egeberg
On Wed, Mar 10, 2010 at 14:41, Bob McConnell wrote: > From: Auke van Slooten > >> 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() >> ); >> >> Currently PH

Re: [PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Andrew Ballard wrote: I'm not sure you would want to assign null to $client->system. After all, __set() might not be defined. I agree with Rob here. If order is really crucial, then call the statements in the correct order: system; /** * You should add some handling here to make sure that *

Re: [PHP] Execution order of PHP

2010-03-10 Thread Bruno Fajardo
2010/3/10 Andrew Ballard : > On Wed, Mar 10, 2010 at 9:54 AM, Bruno Fajardo wrote: > [snip] >> 2010/3/10 Auke van Slooten : >>> This is not what I meant. I should perhaps mention that it's an xml-rpc >>> client and the method calls are remote method calls. The multiCall method >>> gathers multiple

Re: [PHP] Execution order of PHP

2010-03-10 Thread Andrew Ballard
On Wed, Mar 10, 2010 at 9:54 AM, Bruno Fajardo wrote: [snip] > 2010/3/10 Auke van Slooten : >> This is not what I meant. I should perhaps mention that it's an xml-rpc >> client and the method calls are remote method calls. The multiCall method >> gathers multiple method calls into a single request

Re: [PHP] Execution order of PHP

2010-03-10 Thread Bruno Fajardo
2010/3/10 Auke van Slooten : > Bruno Fajardo wrote: >> >> 2010/3/10 Auke van Slooten >>> >>> Hi, >>> >>> 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() >>

Re: [PHP] Execution order of PHP

2010-03-10 Thread Robert Cummings
Auke van Slooten wrote: Bob McConnell wrote: From: Auke van Slooten 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() ); Think about it from the parser's point of v

RE: [PHP] Execution order of PHP

2010-03-10 Thread Bob McConnell
From: Sándor Tamás > 2010.03.10. 14:41 keltezéssel, Bob McConnell írta: >> From: Auke van Slooten >> >>> 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(), >>>

Re: [PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Bob McConnell wrote: From: Auke van Slooten 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() ); Think about it from the parser's point of view. It has to evaluate

Re: [PHP] Execution order of PHP

2010-03-10 Thread Ashley Sheridan
On Wed, 2010-03-10 at 15:20 +0100, Sándor Tamás wrote: > > 2010.03.10. 14:41 keltezéssel, Bob McConnell írta: > > From: Auke van Slooten > > > > > >> In a hobby project I'm relying on the order in which the following > >> > > piece > > > >> of PHP code is executed: > >> > >> $client

Re: [PHP] Execution order of PHP

2010-03-10 Thread Sándor Tamás
2010.03.10. 14:41 keltezéssel, Bob McConnell írta: From: Auke van Slooten 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() ); Currently PHP always

Re: [PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Bruno Fajardo wrote: 2010/3/10 Auke van Slooten Hi, 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() ); Can't you call the methods $client->methodOne() and $client->met

RE: [PHP] Execution order of PHP

2010-03-10 Thread Bob McConnell
From: Auke van Slooten > 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() > ); > > Currently PHP always resolves $client->system (and executes the __get on >

Re: [PHP] Execution order of PHP

2010-03-10 Thread Bruno Fajardo
2010/3/10 Auke van Slooten > > Hi, > > 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() > ); > > Currently PHP always resolves $client->system (and executes the __ge

[PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Hi, 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() ); Currently PHP always resolves $client->system (and executes the __get on $client) before resolving the arguments