Tandem Posted March 13, 2007 Share Posted March 13, 2007 If i was to do this: <?php $foo = "random text"; $bar = inner_function(outer_function($foo)); ?> Which of the functions is executed first? The "inner" or the "outer"? Google won't seem to throw up the simple answer i need. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/42553-nested-functions/ Share on other sites More sharing options...
tarun Posted March 13, 2007 Share Posted March 13, 2007 Confused? ??? What Do You Mean Link to comment https://forums.phpfreaks.com/topic/42553-nested-functions/#findComment-206480 Share on other sites More sharing options...
Tandem Posted March 13, 2007 Author Share Posted March 13, 2007 In short: When calling functions from inside of other function calls, what is the order that they are executed in? Link to comment https://forums.phpfreaks.com/topic/42553-nested-functions/#findComment-206491 Share on other sites More sharing options...
tarun Posted March 13, 2007 Share Posted March 13, 2007 I Would Have Thought The Inner_Function But Try A Few Tests Link to comment https://forums.phpfreaks.com/topic/42553-nested-functions/#findComment-206494 Share on other sites More sharing options...
Tandem Posted March 13, 2007 Author Share Posted March 13, 2007 The reason i posted it here is because i am not currently in a position to do a test. Link to comment https://forums.phpfreaks.com/topic/42553-nested-functions/#findComment-206498 Share on other sites More sharing options...
Orio Posted March 13, 2007 Share Posted March 13, 2007 It starts from the inside to the outside. Orio. Link to comment https://forums.phpfreaks.com/topic/42553-nested-functions/#findComment-206504 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.