Variables are pieces of memory allocated on the computer so that any item is rendered using them, it exists to help programmers of all languages ​​to store and manipulate data of all types.

When dealing with variables in PHP realize how much they have peculiarities, his statement is given by the symbol dollar sign ($) and do not have specific types. A variable in PHP can take any type of data in any time of programming, in addition, they are case sensitive, this means that a variable name written in uppercase or lowercase are different.

Below are some examples that clearly show these peculiarities of language:

$var1 = “test”;

$Var1 = “test”;

PHP is case sensitive each of these variables are allocated separately in memory and are treated distinctly.

$ var1 = “test“; (String Types)

$ var1 = 0; types (Integer)

$ var1 = 1.2; (type Decimal, the separation of thousands in PHP uses the American model)

$ var1 = true; types (Boolean)

As noted above, PHP has no type declaration variable, so the same variable can assume different data types. This is good because it streamlines the process of development in certain aspects, but also opens a very big possibility for errors.

php

The variable declaration is part of everyday life for any programmer and when we talk about PHP that item needs special attention. It is very easy to get lost in the volume of variables depending on the size of the application and therefore have a tool that can help you to have more control of the project is essential. Therefore, use Scriptcase in their PHP projects. With it you have much more control over your project and the resources used also saves time in developing your applications. Download the free version now and discover a world of possibilities.

You might also like…

PROCESAMIENTO AJAX EN SCRIPTCASE

Ajax en los formularios de Scriptcase puede usarse para recargar un campo de tipo de select basado e...

IMPORTAR IMAGENES DE LA BASE DE DATOS Y UTILIZAR CLASES DE BOOSTRAP

Como muchas personas ya saben, Bootstrap es una biblioteca de front-end libre y de código abierto p...

TENDENCIAS DE DESARROLLO WEB PARA 2017

Usted verá en este post tendencias para 2017 en Diseño Web, en el medio digital y en el desarrollo...

Comment this post

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.