Re: Codebabes: PHP

From: Date: Wed, 30 Apr 2014 07:08:20 +0000
Subject: Re: Codebabes: PHP
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-323229@lists.php.net to get a copy of this message
2014-04-29 15:38 GMT+02:00 Christoph Becker <cmbecker69@gmx.de>: > Kumar Saurabh Sinha wrote: > > > Difference between Language Construct & Functions: > > > > *Language Constructs* > > Constructs are elements that are built-into the language and, therefore, > > follow special > > rules. > > ACK. > > > 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: > > print is a language construct and not a function. Try e.g. > > call_user_func('print', 'foo'); > > However, it's interesting that print nonetheless has a return value > (which always is 1). > like "require" and "include" has too. > > -- > Christoph M. Becker > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- github.com/KingCrunch

« previous php.general (#323229) next »