Skip to content

Commit 2ee6829

Browse files
authored
Merge pull request mouredev#3161 from gabrielmoris/gabrielmoris/php
#00 - php
2 parents 2d1a694 + 71e9ee2 commit 2ee6829

File tree

1 file changed

+67
-0
lines changed
  • Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/php

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
// This is a single line comment: https://www.php.net/manual/en/
4+
5+
/*this
6+
is
7+
a
8+
multiline
9+
comment
10+
*/
11+
12+
// Variables
13+
$variable ="I am a siple basic variable."
14+
// Constants
15+
16+
define("constant", "I am inmutable.");
17+
18+
// Strings
19+
$var = 'String';
20+
$multilineString ='This
21+
is
22+
a
23+
multiline
24+
string';
25+
26+
// Null
27+
$nullType = NULL;
28+
29+
// Boolean
30+
$bool = True;
31+
32+
// Numbers
33+
$decimal = 1234;
34+
$octals = 0123;
35+
$hechadecimal =0x1A;
36+
$binary = 0b11111111;
37+
38+
// Floats
39+
$fl= 3.141632;
40+
41+
// Arrays
42+
$arr =array(
43+
"key" => "value",
44+
"key2" => "value2",
45+
"key3" => "value3",
46+
);
47+
48+
$arr2 = [
49+
"key" => "value",
50+
"key2" => "value2",
51+
"key3" => "value3",
52+
];
53+
54+
// Objects
55+
class obj
56+
{
57+
function do_sth()
58+
{
59+
echo "Hello, Php";
60+
}
61+
};
62+
63+
$object = new obj;
64+
65+
$object->do_sth();
66+
67+
?>

0 commit comments

Comments
 (0)