PHP

Data Types

PHP Data Types

PHP data types are divided in two main categories: scalar and composite.

Language Comments

One of the most important parts in any programming language is comments. Is a very good practice to comment every part of the code (variables, functions, classes, etc).

PHP has several types of comments:

Single line comment:

//Comment goes here

Single line comment (another option):

#Comment goes here

Multi line comment:

/*
Comment goes here
*/

API Documentation:

/**
* Function Description
*
* @param string $my_var
*/

function my_function($my_var) {
   "code goes here"
}

PHP Tags

The code in PHP must be inserted into a text file using a special tags, then PHP will process everything between those tags, the rest is just ignored. There are the types of tags:

Syndicate content