informatique:php
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| informatique:php [26/12/2022 07:54] – [Goutte] cyrille | informatique:php [14/07/2026 08:05] (Version actuelle) – [intelephense] cyrille | ||
|---|---|---|---|
| Ligne 6: | Ligne 6: | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | |||
| + | |||
| + | PHP8 Attributes | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| [[/ | [[/ | ||
| - | Installer Php/ | + | |
| + | Installer | ||
| + | < | ||
| + | sudo apt install software-properties-common | ||
| + | sudo add-apt-repository ppa: | ||
| + | sudo apt update | ||
| + | </ | ||
| ===== Application Frameworks ===== | ===== Application Frameworks ===== | ||
| Ligne 23: | Ligne 37: | ||
| ==== Dans les plus connus ==== | ==== Dans les plus connus ==== | ||
| + | * [[informatique: | ||
| + | * [[/ | ||
| * [[http:// | * [[http:// | ||
| - | * [[http:// | ||
| * Prado | * Prado | ||
| - | * [[/informatique/php/laravel|Laravel]] The PHP Framework For Web Artisans. | + | * [[informatique:php:laravel_1|Laravel]] The PHP Framework For Web Artisans. |
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| Ligne 76: | Ligne 91: | ||
| Les generators " | Les generators " | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| + | ===== Syntaxe ===== | ||
| + | |||
| + | Les closures et les classes anonymes | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ==== Les Enums (avec valeurs) ==== | ||
| + | |||
| + | <code php> | ||
| + | enum DocumentFragmentType: | ||
| + | { | ||
| + | case Sujet = ' | ||
| + | case Situation = ' | ||
| + | public function priority() | ||
| + | { | ||
| + | /* pas besoin 😉 | ||
| + | return match ($this) { | ||
| + | DocumentFragmentType:: | ||
| + | DocumentFragmentType:: | ||
| + | }; | ||
| + | */ | ||
| + | return DocumentFragmentTypePriority:: | ||
| + | } | ||
| + | }; | ||
| + | enum DocumentFragmentTypePriority: | ||
| + | { | ||
| + | case Sujet = 1; | ||
| + | case Situation = 3; | ||
| + | }; | ||
| + | |||
| + | </ | ||
| + | |||
| ===== Outillage ===== | ===== Outillage ===== | ||
| Ligne 83: | Ligne 131: | ||
| Eclipse plugin: [[http:// | Eclipse plugin: [[http:// | ||
| + | |||
| + | [[/ | ||
| + | |||
| + | ==== Phpstan ==== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | < | ||
| + | /* @phpstan-ignore-next-line */ | ||
| + | </ | ||
| + | |||
| + | ==== intelephense ==== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | <code php> | ||
| + | /** @disregard [OPTIONAL CODE] [OPTIONAL DESCRIPTION] */ | ||
| + | /** @disregard P1013 method exists on runtime type */ | ||
| + | </ | ||
| + | |||
| ==== phpUnderControl ==== | ==== phpUnderControl ==== | ||
| + | <WRAP center round important 60%> | ||
| + | phpUnderControl c'est terminé. | ||
| + | </ | ||
| + | |||
| + | |||
| + | * [[http:// | ||
| + | * https:// | ||
| - | [[http:// | ||
| * Testing and software metrics, PHPUnit output: Code Coverage, Project Mess Detection and Software Metrics. | * Testing and software metrics, PHPUnit output: Code Coverage, Project Mess Detection and Software Metrics. | ||
| * Documentation: | * Documentation: | ||
| Ligne 114: | Ligne 188: | ||
| ==== FirePHP ==== | ==== FirePHP ==== | ||
| + | <WRAP center round important 60%> | ||
| + | Firebug c'est fini 😩 | ||
| + | </ | ||
| http:// | http:// | ||
| Ligne 121: | Ligne 198: | ||
| ==== SimpleTest ==== | ==== SimpleTest ==== | ||
| + | <WRAP center round important 60%> | ||
| + | SimpleTest c'est fini. | ||
| + | </ | ||
| - | http:// | + | <del>http:// |
| It is a PHP unit test and web test framework. Users of JUnit will be familiar with most of the interface. The JWebUnit style functionality is more complete now. It has support for SSL, forms, frames, proxies and basic authentication. The idea is that common but fiddly PHP tasks, such as logging into a site, can be tested easily. | It is a PHP unit test and web test framework. Users of JUnit will be familiar with most of the interface. The JWebUnit style functionality is more complete now. It has support for SSL, forms, frames, proxies and basic authentication. The idea is that common but fiddly PHP tasks, such as logging into a site, can be tested easily. | ||
| Ligne 165: | Ligne 245: | ||
| ==== PHP_CodeSniffer ==== | ==== PHP_CodeSniffer ==== | ||
| - | http:// | + | * https:// |
| + | * <del>http:// | ||
| - | PHP_CodeSniffer is a PHP5 script that tokenises and " | + | PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. |
| + | |||
| + | PHP_CodeSniffer is a set of two PHP scripts: | ||
| + | |||
| + | * the main '' | ||
| + | * and '' | ||
| ===== Librairies ===== | ===== Librairies ===== | ||
| Ligne 193: | Ligne 279: | ||
| [[http:// | [[http:// | ||
| + | |||
| + | ==== Console ==== | ||
| + | |||
| + | * https:// | ||
| + | * A lightweight, | ||
| + | * Aucune dépendence | ||
| ==== Cron ==== | ==== Cron ==== | ||
| Ligne 288: | Ligne 380: | ||
| ==== Html & DOM scraper ==== | ==== Html & DOM scraper ==== | ||
| + | |||
| + | === Simple HTML DOM === | ||
| + | |||
| + | https:// | ||
| + | |||
| + | === php-html-parser === | ||
| + | |||
| + | https:// | ||
| + | |||
| + | === Goutte === | ||
| + | |||
| + | Goutte is web crawling library for PHP. Goutte fourni un client programmable pour lire et interagir sur des pages html/xml. | ||
| + | |||
| + | http:// | ||
| + | |||
| + | <code php> | ||
| + | // Require the Goutte phar file to use Goutte in a script: | ||
| + | require_once '/ | ||
| + | // Create a Goutte Client instance: | ||
| + | $client = new Client(); | ||
| + | // Make requests | ||
| + | $crawler = $client-> | ||
| + | // Click on links: | ||
| + | $link = $crawler-> | ||
| + | $crawler = $client-> | ||
| + | // Submit forms: | ||
| + | $form = $crawler-> | ||
| + | $crawler = $client-> | ||
| + | //Extract data: | ||
| + | $nodes = $crawler-> | ||
| + | if ($nodes-> | ||
| + | { | ||
| + | die(sprintf(" | ||
| + | } | ||
| + | printf(" | ||
| + | </ | ||
| + | |||
| + | |||
informatique/php.1672037689.txt.gz · Dernière modification : de cyrille
