Re: Codebabes: PHP

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

 



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).

-- 
Christoph M. Becker

-- 
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