If you’re reading this book, you probably already know what PHP is—one of the world’s most popular programming languages for Web application development. Widely available and backed by the support of a vociferous and enthusiastic user community, the language was in use on more than 20 million Web sites at the end of 2006…and that number is only expected to grow..!
Personally, I’ve always believed the reason for PHP’s popularity to be fairly simple. It has the unique distinction of being the only open-source server-side scripting language that’s both easy to learn and extremely powerful to use. Unlike most modern server-side languages, PHP uses clear, simple syntax and delights in non-obfuscated code; this makes it easy to read and understand, and encourages rapid application development. And then of course, there’s cost and availability.
PHP is available free of charge on the Internet, for a variety of platforms and architectures, including UNIX, Microsoft Windows, and Mac OS, as well as for most Web servers.
PHP (Hyper text Pre Processor) is a scripting language commonly used for web applications. PHP can be easily embedded in HTML. PHP generally runs on a web server. It is available for free and can be used across a variety of servers, operating systems and platforms.
The echo statement can output one or more string. The echo statement can display anything that can be display to the browser, such as string, variable value, number, the result of expression etc.
Echo is a language construct not actually a function. You can used it without parentheses e.g echo or echo(). If you want to pass more than one parameter to echo, the parameter must not be enclosed within parentheses.
The print statement can also use for displaying the output to the browser. The print is also a language construct not a real function. So can also use it without parentheses like: print or print().
The echo and print both statement are work exactly the same way except that the print statement can only output one string, and always return 1. That’s way the echo statement considered marginally faster than the print statement since is doesn’t return any value.