aboutsummaryrefslogtreecommitdiff
path: root/files/vi/tu-dien-thuat-ngu/php/index.html
blob: f75d0f07e7a07aacf21119be8a497bdf0f54bc9d (plain)
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
---
title: PHP
slug: Tu-dien-thuat-ngu/PHP
translation_of: Glossary/PHP
---
<p>PHP (a recursive initialism for PHP: Hypertext Preprocessor) is an open-source server-side scripting language that can be embedded into HTML to build web applications and dynamic websites.</p>

<h2 id="Examples">Examples</h2>

<h3 id="Basic_syntax">Basic syntax</h3>

<pre class="brush: php notranslate">  // start of PHP code
&lt;?php
     // PHP code goes here
 ?&gt;
// end of PHP code</pre>

<h3 id="Printing_data_on_screen">Printing data on screen</h3>

<pre class="brush: php notranslate">&lt;?php
   echo "Hello World!";
?&gt;</pre>

<h3 id="PHP_variables">PHP variables</h3>

<pre class="brush: php notranslate">​​​​​​​&lt;?php
 // variables
 $nome='Danilo';
 $sobrenome='Santos';
 $pais='Brasil';
 $email='danilocarsan@gmailcom';
​​​​​​​
 // printing the variables
 echo $nome;
 echo $sobrenome;
 echo $pais;
 echo $email;
?&gt;</pre>

<section class="Quick_links" id="Quick_Links">
<ol>
 <li><a href="http://php.net/">Official website</a></li>
 <li>{{Interwiki("wikipedia", "PHP")}} on Wikipedia</li>
 <li><a href="https://en.wikibooks.org/wiki/PHP_Programming">PHP</a> on Wikibooks</li>
 <li><a href="/en-US/docs/Glossary">MDN Web Docs Glossary</a>
  <ol>
   <li>{{Glossary("Java")}}</li>
   <li>{{Glossary("JavaScript")}}</li>
   <li>{{Glossary("Python")}}</li>
   <li>{{Glossary("Ruby")}}</li>
  </ol>
 </li>
</ol>
</section>