Echo (PHP) vs Print (PHP)

echo() and print() are not functions but language constructs in PHP. They are both used to output strings and there are very minor differences between echo and print in PHP.

Comparison chart</> EMBED THIS CHART

Echo (PHP) Print (PHP)
Parameters: echo can take more than one parameter when used without parentheses. The syntax is echo expression [, expression[, expression] … ]. Note that echo ($arg1,$arg2) is invalid. print only takes one parameter.
Return value: echo does not return any value print always returns 1 (integer)
Syntax: void echo ( string $arg1 [, string $… ] ) int print ( string $arg )
What is it?: In PHP, echo is not a function but alanguage construct. In PHP, print is not a really function but a language construct. However, it behaves like a function in that it returns a value.

Cấu hình xdebug trong NetBeans

1. Khi cài XAMPP đã có sẵn xdebug, không cần phải download xdebug bản mới

2. Cấu hình file php.ini như sau:

[XDebug]
zend_extension = “C:\xampp\php\ext\php_xdebug.dll”
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000

3. Khởi động lại Apache.

Done.