-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path004-Variables.php
More file actions
22 lines (18 loc) · 892 Bytes
/
004-Variables.php
File metadata and controls
22 lines (18 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
//$variable= cobntenedor que almacena datos de tipo string, integer, double o boolean.
//Inicializacion de una variable=asignar un valor inicial a la variable
$miNombre="Jairo Pairo Wairo Cairo Lairo Saurio"; //string
$edad=55;//integer
$altura=2.2;//double
$hombre=true;//boolean
echo "Jairo Pairo Wairo tiene 16 años, mide 2.2 m y es hombre <br>";
echo '$miNombre es '.$miNombre.'<br>';//Concatenación de bloques de información: mediante el símbolo de puntuación PUNTO (.)
echo $miNombre.' tiene '.$edad.' años , mide '.$altura.' m y es hombre';
echo ' <br> $edad vale '.$edad.' y $altura vale '.$altura.'<hr>';
/*FUNCIONES-------------------------------------------------------------------------*/
echo gettype($miNombre).'<br>';// Devuelve el tipo de la variable de entrada
echo isset($altura);
echo empty($edad);
unset($altura);
echo empty($edad);
?>