Define Hello World in PHP: A Step-by-Step Guide to Your First Program

PHP is one of the most popular server side scripting language use for web development for making Dynamic web pages. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. 

Features of PHP

  • PHP stands for Hypertext Preprocessor.
  • PHP is an interpreted language, i.e., there is no need for compilation.
  • PHP is faster than other scripting languages, for example, ASP and JSP.
  • PHP is a server-side scripting language, which is used to manage the dynamic content of the website.
  • PHP can be embedded into HTML.
  • PHP is an object-oriented language.
  • PHP is an open-source scripting language.
  • PHP is simple and easy to learn language
  • Simple and fast
  • Efficient
  • Secured
  • Flexible

Go to your project and and paste this code.

What is Comment in PHP and how to Write?

Comment is a text not executed as a part of the program. Comments can be used to: Let others understand your code.  It will help you and others in the future to understand what you were written to do with the PHP code.

Comment is also useful for any projects its help to debuggin if you want to check some code is working or not then simply comment those code and check.

Types of Comment:-

  1. OneLine Comment :- One line comment means If it’s after a code statement, whatever text following it is regarded as the comment. The // symbol begins a code single-line comment, which tells the compiler to ignore everything from the // symbol to the end of the line. For example:

2. Multiline Comment:- Multiline comments are used for large text descriptions Multi-line comments have one or more lines of narrative within a set of comment. The /* and */ pair of symbols denotes a C-style multi-line comment. Everything in between the symbols is ignored.

Here Doucument :- Here Document is another way to print text in PHP. Here Document is just some text inserted directly in a php page.

String Interpolation:- String Interpolation provides facility to write code without Concate and comma and put code directly double quoute, interpolation is adding variables in between when specifying a string literal.

Amit Kumar
Tagged : / / /

Leave a Reply