Biske94 Posted January 5, 2018 Report Share Posted January 5, 2018 What is the difference between statements and functions? For instance why dont we type include('somefile.php') or echo('Hello World') ? Thanks! Quote Link to comment Share on other sites More sharing options...
MNS45 Posted January 31, 2018 Report Share Posted January 31, 2018 Are you talking about the difference between language construct and functions in PHP? I don't exactly understand the difference but I found a helpful post on stackoverflow. https://stackoverflow.com/questions/1180184/what-is-the-difference-between-a-language-construct-and-a-built-in-function-in Supposedly, language constructs can't be used in call backs. It's the second post by Pascal Martin, he has example code. Quote Link to comment Share on other sites More sharing options...
administrator Posted February 4, 2018 Report Share Posted February 4, 2018 Functions do something ... they process. You can think of functions as being like mini programs. Statement just state something .... there is no processing. That is a non nerd way of describing it. Think of a statement like a verbal statement. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.