Re: PATCH: debug_backtrace() function for 4.3-dev/ZE1
| From: | Dan Hardiker | Date: | Sun, 18 Aug 2002 19:17:11 +0000 |
| Subject: | Re: PATCH: debug_backtrace() function for 4.3-dev/ZE1 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87031@lists.php.net to get a copy of this message | ||
> look at the opcodes for:
>
> a(b(c()));
>
> function a() {}
> function b() {}
> function c() {}
>
> and tell me which function is called from which scope. unless
> you know something i dont youll see
> a()
> b()
> c()
>
> which is wrong as the correct call-order is
> c()
> b()
> a()
That makes sense to me, as in order to pass a value to a, it must execute
b to get the parameter, and before it can do that it needs to execute c in
order to pass the param to b ... so the it turns out c,b,a.
--
Dan Hardiker [dhardiker@staff.firstcreative.net]
ADAM Software & Systems Engineer
First Creative Ltd