Re: Codebabes: PHP
| From: | Robert Cummings | Date: | Tue, 29 Apr 2014 14:41:42 +0000 |
| Subject: | Re: Codebabes: PHP | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323224@lists.php.net to get a copy of this message | ||
Send me her number and I'll ask ;)
On 14-04-29 10:32 AM, Marc Guay wrote:
I can't help but wonder what Leia thinks of all this. On 29 April 2014 10:09, Shawn McKenzie <shawn@mckenzies.net> wrote:-- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.Also, they cannot be called using variable functions. Notice however that though echo doesn't return a value, print does. On Tue, Apr 29, 2014 at 7:46 AM, Kumar Saurabh Sinha < sinha.ksaurabh@gmail.com> wrote:Difference between Language Construct & Functions: *Language Constructs* Constructs are elements that are built-into the language and, therefore, follow special rules. Perhaps the most common of them is the echo statement, which allows you to write data to the script’s output: echo 10; // will output 10 It’s important to understand that echo is not a function and, as such, it does not have a return value. If you need to output data through a function, you can use print() instead: echo 10;print (10); Another very important construct is die(), which is itself an alias of exit(). It allows you to terminate the script’s output and either output a string or return a numeric status to the process that called the script. Thanks & Regards *Kumar Saurabh Sinha* +91-9971047719 | +91-8595436700 On Tue, Apr 29, 2014 at 6:03 PM, Tedd Sperling <tedd@sperling.com> wrote:On Apr 28, 2014, at 3:32 PM, Robert Cummings <robert@interjinn.com>wrote:overhead.On 14-04-28 03:30 PM, Robert Cummings wrote:They should push the use of echo over print since it's a language construct and not a function thus it benefits from no functionDidn't it used to be?Cheers, Rob.I'd like to retract this comment :) Apparent print is not a function.Cheers, Rob. --Nope, you can't retract it. :-) As for "print" being a function or construct, I dunno -- what's the difference? Cheers, tedd _______________ tedd sperling tedd@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php