Re: Codebabes: PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14-04-29 09:38 AM, Christoph Becker wrote:
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).

One of the most popular constructs has a return value: isset.

Cheers,
Rob.
--
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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux