Qu'est ce que PHP ?

Selon Wikipedia

PHP (PHP: Hypertext Preprocessor), est un langage de programmation libre, principalement utilisé pour produire des pages Web dynamiques via un serveur HTTP mais pouvant également fonctionner comme n'importe quel langage interprété de façon locale. PHP est un langage impératif orienté objet.

 

Typage : Dynamique, Faible

A quoi ressemble PHP ?


<table>
  <tr>
    <th>Nom</th>
    <th>Classe</th>
    <th colspan="12">Notes</th>
    <th>Moyenne</th>
  </tr>
  <?php foreach($eleves as $eleve): ?>
  <tr>
    <td><strong><?= $eleve['name'] ?></strong></td>
    <td><?= $eleve['class'] ?></td>
    <?php foreach($eleve['notes'] as $note): ?>
      <td><?= $note ?>/20</td>
    <?php endforeach; ?>
    <td><strong><?= round(array_sum($eleve['notes']) / count($eleve['notes'])) ?></strong>/20
  </tr>
  <?php endforeach; ?>
</table>

Les gens me disent que PHP c'est nul !

De quoi ai-je besoin ?

  • Prérequis : HTML / Algorithmique
  • Logiciels : Visual Studio Code

Installation

PHP

By Jonathan Boyer

PHP

  • 39,416