forked from assembler-institute/php-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.php
More file actions
56 lines (28 loc) · 607 Bytes
/
types.php
File metadata and controls
56 lines (28 loc) · 607 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
#Boolean
$boolean = true;
echo "This is a boolean: $boolean";
echo "<br>";
#Integer
$integer = 99;
echo "This is a integer: $integer";
echo "<br>";
#Float
$float = 2.13;
echo "This is a float: $float";
echo "<br>";
#String
$string = "Soy un String";
echo "This is a string: $string";
echo "<br>";
#Array
$array = array("playstation", "xbox", "switch");
echo "This is an array: $array[0]";
echo "<br>";
#Object
$object = (object)["drink1"=>"cocacola", "drink2"=>"fanta", "drink3"=>"appletiser"];
echo "This is an object: $object->drink3";
echo "<br>";
#Null
$null = null;
?>