SlideShare a Scribd company logo
1 of 48
Download to read offline
Nouveautés PHP 5.3  ,[object Object],#   « he who doesn't do anything, doesn't go wrong » Zeev Suraski
[object Object],[object Object],[object Object],[object Object],Sommaire #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Introduction #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Rappel : Historique de PHP #
[object Object],[object Object],[object Object],[object Object],Sommaire #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Installation PHP 5.3 #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tester PHP 5.3 #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tester PHP 5.3 #
Sommaire  ,[object Object],[object Object],[object Object],[object Object],#
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],PHP 5.3 : Namespaces #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Namespaces : fonctions #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Namespaces : classes #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Namespaces : « use » et alias #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Namespaces : ordre de résolution #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Namespaces : __autoload #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Namespaces : sucre syntaxique #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Amélioration perfs / mémoire #
[object Object],Performances #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],GC – Garbage Collector  #
[object Object],[object Object],[object Object],GC – Garbage Collector  #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],mySQLnd #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],__callStatic #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Appels statiques dynamiques #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Late Static Binding #   1 2 3 (5.2)‏ 3 (5.3)‏
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saut inconditionnel : « goto » #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Syntaxe NOWDOC #
Lambdas et Closures  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],#
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Lambdas et Closures #
Lambdas et Closures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],#
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Lambdas et Closures #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],intl – Internationalisation  #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Intl – Internationalisation #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],PHAR – PHP Archive #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Nouveautés « diverses » #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Nouveautés « diverses » #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Nouveautés « diverses » #
[object Object],[object Object],[object Object],[object Object],Sommaire #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],PHP 6 #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],PHP.next #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Traits #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Traits #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Performances #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Type Hinting #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Divers #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Unicode ? #   function   маймуница()   { echo   " 文字化け " ;} маймуница();   //  文字化け
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Conclusion #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Sources / A Lire #
[object Object],[object Object],[object Object],#

More Related Content

What's hot

PHP #1 : introduction
PHP #1 : introductionPHP #1 : introduction
PHP #1 : introductionJean Michel
 
Formation PHP
Formation PHPFormation PHP
Formation PHPkemenaran
 
PHP 7.0 : aperçu des nouveautés
PHP 7.0 : aperçu des nouveautésPHP 7.0 : aperçu des nouveautés
PHP 7.0 : aperçu des nouveautésDidcode
 
Coat::Persistent at FPW2009
Coat::Persistent at FPW2009Coat::Persistent at FPW2009
Coat::Persistent at FPW2009Alexis Sukrieh
 
Monitoring d'applications/environnements PHP: APM et Pinba
Monitoring d'applications/environnements PHP: APM et PinbaMonitoring d'applications/environnements PHP: APM et Pinba
Monitoring d'applications/environnements PHP: APM et PinbaPatrick Allaert
 
Performance et optimisation de PrestaShop
Performance et optimisation de PrestaShopPerformance et optimisation de PrestaShop
Performance et optimisation de PrestaShopPrestaShop
 
Introduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINE
Introduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINEIntroduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINE
Introduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINEMarouan OMEZZINE
 
Presentation langage go_19022015
Presentation langage go_19022015Presentation langage go_19022015
Presentation langage go_19022015Stéphane Legrand
 
Php 7 Think php7
Php 7 Think php7Php 7 Think php7
Php 7 Think php7neuros
 
PHP 1 - Apprendre les bases
PHP 1 - Apprendre les basesPHP 1 - Apprendre les bases
PHP 1 - Apprendre les basesPierre Faure
 
Pratique de la programmation en go
Pratique de la programmation en goPratique de la programmation en go
Pratique de la programmation en gokader15
 
Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016Jean-Michel Doudoux
 
PHP - get started
PHP - get startedPHP - get started
PHP - get startedmazenovi
 
Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)Martin Latrille
 

What's hot (20)

PHP #1 : introduction
PHP #1 : introductionPHP #1 : introduction
PHP #1 : introduction
 
Nouveautés php 7
Nouveautés php 7Nouveautés php 7
Nouveautés php 7
 
Formation PHP
Formation PHPFormation PHP
Formation PHP
 
PHP 7.0 : aperçu des nouveautés
PHP 7.0 : aperçu des nouveautésPHP 7.0 : aperçu des nouveautés
PHP 7.0 : aperçu des nouveautés
 
Coat::Persistent at FPW2009
Coat::Persistent at FPW2009Coat::Persistent at FPW2009
Coat::Persistent at FPW2009
 
Monitoring d'applications/environnements PHP: APM et Pinba
Monitoring d'applications/environnements PHP: APM et PinbaMonitoring d'applications/environnements PHP: APM et Pinba
Monitoring d'applications/environnements PHP: APM et Pinba
 
Performance et optimisation de PrestaShop
Performance et optimisation de PrestaShopPerformance et optimisation de PrestaShop
Performance et optimisation de PrestaShop
 
Introduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINE
Introduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINEIntroduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINE
Introduction au langage PHP (1ere partie) élaborée par Marouan OMEZZINE
 
Etes vous-pret pour php8 ?
Etes vous-pret pour php8 ?Etes vous-pret pour php8 ?
Etes vous-pret pour php8 ?
 
Presentation langage go_19022015
Presentation langage go_19022015Presentation langage go_19022015
Presentation langage go_19022015
 
Cours php
Cours phpCours php
Cours php
 
Php 7 Think php7
Php 7 Think php7Php 7 Think php7
Php 7 Think php7
 
PHP 1 - Apprendre les bases
PHP 1 - Apprendre les basesPHP 1 - Apprendre les bases
PHP 1 - Apprendre les bases
 
Pratique de la programmation en go
Pratique de la programmation en goPratique de la programmation en go
Pratique de la programmation en go
 
PHP Training
PHP TrainingPHP Training
PHP Training
 
Mysql
MysqlMysql
Mysql
 
Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016
 
PHP - get started
PHP - get startedPHP - get started
PHP - get started
 
Dynamic Languages
Dynamic LanguagesDynamic Languages
Dynamic Languages
 
Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)
 

Viewers also liked

Modulo 3 Gestión del Riesgo y Recomendaciones
Modulo 3 Gestión del Riesgo y RecomendacionesModulo 3 Gestión del Riesgo y Recomendaciones
Modulo 3 Gestión del Riesgo y RecomendacionesAcademia Telecentros Chile
 
Auditorias de imagen, trabajo
Auditorias de imagen, trabajo Auditorias de imagen, trabajo
Auditorias de imagen, trabajo elizabets
 
Modulo 3 Cómo enfrentar situaciones de catástrofe y recomendaciones
Modulo 3 Cómo enfrentar situaciones de catástrofe y recomendacionesModulo 3 Cómo enfrentar situaciones de catástrofe y recomendaciones
Modulo 3 Cómo enfrentar situaciones de catástrofe y recomendacionesAcademia Telecentros Chile
 
Proceso cautelar,ejecucion.no contencioso
Proceso cautelar,ejecucion.no contenciosoProceso cautelar,ejecucion.no contencioso
Proceso cautelar,ejecucion.no contenciosoLeandro Gauna H
 
Manual de convivencia icct 2013
Manual de convivencia icct 2013Manual de convivencia icct 2013
Manual de convivencia icct 2013PRACTICAS ICCT
 
AI07 Auditoria proceso desarrollo software
AI07 Auditoria proceso desarrollo softwareAI07 Auditoria proceso desarrollo software
AI07 Auditoria proceso desarrollo softwarePedro Garcia Repetto
 
Innovando en clase
Innovando en claseInnovando en clase
Innovando en claseFranco Mana
 
Bibliotecas ante el siglo XXI: nuevos medios y caminos
Bibliotecas ante el siglo XXI: nuevos medios y caminosBibliotecas ante el siglo XXI: nuevos medios y caminos
Bibliotecas ante el siglo XXI: nuevos medios y caminosJulián Marquina
 
Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...
Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...
Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...Kelvin Hoogeboom
 
HID&V presentation class #1
HID&V presentation class #1HID&V presentation class #1
HID&V presentation class #1Paul Kahn
 
Unidad Didáctica: Los sectores ecónomicos
Unidad Didáctica: Los sectores ecónomicosUnidad Didáctica: Los sectores ecónomicos
Unidad Didáctica: Los sectores ecónomicosmarina valverde
 
Modelo Plan de emergencia
Modelo Plan de emergenciaModelo Plan de emergencia
Modelo Plan de emergenciaJacke Garcia
 
Anthony robbins -_Mensaje_a_un_Amig@
Anthony robbins -_Mensaje_a_un_Amig@Anthony robbins -_Mensaje_a_un_Amig@
Anthony robbins -_Mensaje_a_un_Amig@Gladis Calderon
 
Amag guía de actuación del juez en el ncpp
Amag   guía de actuación del juez en el ncppAmag   guía de actuación del juez en el ncpp
Amag guía de actuación del juez en el ncppHenry Zevallos
 

Viewers also liked (20)

Modulo 3 Gestión del Riesgo y Recomendaciones
Modulo 3 Gestión del Riesgo y RecomendacionesModulo 3 Gestión del Riesgo y Recomendaciones
Modulo 3 Gestión del Riesgo y Recomendaciones
 
Ucd火花集
Ucd火花集Ucd火花集
Ucd火花集
 
Ucd火花集
Ucd火花集Ucd火花集
Ucd火花集
 
Auditorias de imagen, trabajo
Auditorias de imagen, trabajo Auditorias de imagen, trabajo
Auditorias de imagen, trabajo
 
Modulo 3 Cómo enfrentar situaciones de catástrofe y recomendaciones
Modulo 3 Cómo enfrentar situaciones de catástrofe y recomendacionesModulo 3 Cómo enfrentar situaciones de catástrofe y recomendaciones
Modulo 3 Cómo enfrentar situaciones de catástrofe y recomendaciones
 
Proceso cautelar,ejecucion.no contencioso
Proceso cautelar,ejecucion.no contenciosoProceso cautelar,ejecucion.no contencioso
Proceso cautelar,ejecucion.no contencioso
 
Digesto docentes final
Digesto docentes finalDigesto docentes final
Digesto docentes final
 
Manual de convivencia icct 2013
Manual de convivencia icct 2013Manual de convivencia icct 2013
Manual de convivencia icct 2013
 
Guia del Premio
Guia del PremioGuia del Premio
Guia del Premio
 
AI07 Auditoria proceso desarrollo software
AI07 Auditoria proceso desarrollo softwareAI07 Auditoria proceso desarrollo software
AI07 Auditoria proceso desarrollo software
 
Innovando en clase
Innovando en claseInnovando en clase
Innovando en clase
 
Bibliotecas ante el siglo XXI: nuevos medios y caminos
Bibliotecas ante el siglo XXI: nuevos medios y caminosBibliotecas ante el siglo XXI: nuevos medios y caminos
Bibliotecas ante el siglo XXI: nuevos medios y caminos
 
Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...
Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...
Hoe veilig is het werken in een verontreinigde bodem(compleet)_K.Hoogeboom_16...
 
HID&V presentation class #1
HID&V presentation class #1HID&V presentation class #1
HID&V presentation class #1
 
Unidad Didáctica: Los sectores ecónomicos
Unidad Didáctica: Los sectores ecónomicosUnidad Didáctica: Los sectores ecónomicos
Unidad Didáctica: Los sectores ecónomicos
 
Modelo Plan de emergencia
Modelo Plan de emergenciaModelo Plan de emergencia
Modelo Plan de emergencia
 
Anthony robbins -_Mensaje_a_un_Amig@
Anthony robbins -_Mensaje_a_un_Amig@Anthony robbins -_Mensaje_a_un_Amig@
Anthony robbins -_Mensaje_a_un_Amig@
 
Speciale 2. udgave
Speciale 2. udgaveSpeciale 2. udgave
Speciale 2. udgave
 
Amag guía de actuación del juez en el ncpp
Amag   guía de actuación del juez en el ncppAmag   guía de actuación del juez en el ncpp
Amag guía de actuación del juez en el ncpp
 
Pensamiento Critico
Pensamiento CriticoPensamiento Critico
Pensamiento Critico
 

Similar to PHP 5.3, PHP Next

Tester les applications Zend Framework
Tester les applications Zend FrameworkTester les applications Zend Framework
Tester les applications Zend FrameworkMickael Perraud
 
Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...
Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...
Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...fdussert
 
Tout pour se préparer à PHP 7.4
Tout pour se préparer à PHP 7.4Tout pour se préparer à PHP 7.4
Tout pour se préparer à PHP 7.4Damien Seguy
 
Php 7.4 2020-01-28 - afup
Php 7.4   2020-01-28 - afupPhp 7.4   2020-01-28 - afup
Php 7.4 2020-01-28 - afupJulien Vinber
 
laravel.sillo.org-Cours Laravel 10 les bases installation et organisation.pdf
laravel.sillo.org-Cours Laravel 10  les bases  installation et organisation.pdflaravel.sillo.org-Cours Laravel 10  les bases  installation et organisation.pdf
laravel.sillo.org-Cours Laravel 10 les bases installation et organisation.pdfHeartKing10
 
Les principes de base de PHP
 Les principes de base de PHP  Les principes de base de PHP
Les principes de base de PHP EL JAOUARI Ahmed
 
Patterns and OOP in PHP
Patterns and OOP in PHPPatterns and OOP in PHP
Patterns and OOP in PHPjulien pauli
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovyguest6e3bed
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation GroovyJS Bournival
 
Cours php -partie 1.pdf
Cours php -partie 1.pdfCours php -partie 1.pdf
Cours php -partie 1.pdfssuserc46a93
 
Réu technodejs
Réu technodejsRéu technodejs
Réu technodejsnaholyr
 

Similar to PHP 5.3, PHP Next (20)

Tester les applications Zend Framework
Tester les applications Zend FrameworkTester les applications Zend Framework
Tester les applications Zend Framework
 
Php 5.3
Php 5.3Php 5.3
Php 5.3
 
Spring 3.0
Spring 3.0Spring 3.0
Spring 3.0
 
Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...
Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...
Atoum, le framework de tests unitaires pour PHP 5.3 simple, moderne et intuit...
 
Tout pour se préparer à PHP 7.4
Tout pour se préparer à PHP 7.4Tout pour se préparer à PHP 7.4
Tout pour se préparer à PHP 7.4
 
Cours Php
Cours PhpCours Php
Cours Php
 
Cours Php
Cours PhpCours Php
Cours Php
 
Php 7.4 2020-01-28 - afup
Php 7.4   2020-01-28 - afupPhp 7.4   2020-01-28 - afup
Php 7.4 2020-01-28 - afup
 
laravel.sillo.org-Cours Laravel 10 les bases installation et organisation.pdf
laravel.sillo.org-Cours Laravel 10  les bases  installation et organisation.pdflaravel.sillo.org-Cours Laravel 10  les bases  installation et organisation.pdf
laravel.sillo.org-Cours Laravel 10 les bases installation et organisation.pdf
 
Les principes de base de PHP
 Les principes de base de PHP  Les principes de base de PHP
Les principes de base de PHP
 
Php cours
Php coursPhp cours
Php cours
 
Patterns and OOP in PHP
Patterns and OOP in PHPPatterns and OOP in PHP
Patterns and OOP in PHP
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovy
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovy
 
Initiation au langage PHP
Initiation au langage PHPInitiation au langage PHP
Initiation au langage PHP
 
Ruby Pour RoR
Ruby Pour RoRRuby Pour RoR
Ruby Pour RoR
 
Cours php -partie 1.pdf
Cours php -partie 1.pdfCours php -partie 1.pdf
Cours php -partie 1.pdf
 
Réu technodejs
Réu technodejsRéu technodejs
Réu technodejs
 
Cours php bac info
Cours php bac infoCours php bac info
Cours php bac info
 
UserGroup Varnish - eZ
UserGroup Varnish - eZUserGroup Varnish - eZ
UserGroup Varnish - eZ
 

PHP 5.3, PHP Next

  • 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.

Editor's Notes

  1. Niveau 5 = optimisation fine dans la manière de gérer nos projet mais pour cela il faut bien maîtriser nos projets (niveaux 3 et 4)‏
  2. Niveau 5 = optimisation fine dans la manière de gérer nos projet mais pour cela il faut bien maîtriser nos projets (niveaux 3 et 4)‏
  3. Quelques détails sur l'installation faite pour les tests allant avec ces slides : - Installation d'une Ubuntu 7.10 server sur une vmware - Installation minimaliste : sur l'écran « quoi installer », je n'ai rien coché - Une fois l'installation minimaliste terminée : apt-get update && apt-get dist-upgrade apt-get install openssh-server zip unzip make sun-java5-jdk subversion ant apache2 subversion-tools perl memcached build-essential gcc-4.1-locales automake1.9 autoconf manpages-dev debian-keyring apache2-prefork-dev libxml2-dev openssh-server - POUR PHP 6 : apt-get install libicu36-dev - Avec ça : - On a un environnement de dev permettant de compiler PHP (y compris en module Apache 2)‏ - On peut se connecter en SSH à la machine virtuelle (un seul objectif : meilleure intégration avec les outils de dev, utilisés depuis la machine « réelle »)‏ - Téléchargement du dernier snapshot PHP 5.2 ou PHP 6 depuis http://snaps.php.net/ , puis décompression, configure, make, et make install (A ADAPTER POUR UTILISER UN SNAPSHOT PLUS RECENT) : wget http://snaps.php.net/php5.3-200804102030.tar.bz2 tar xvf php5.3-200804102030.tar.bz2 cd php5.3-200804102030/ ./configure --with-apxs2=/usr/bin/apxs2 make make install
  4. Quelques détails sur l'installation faite pour les tests allant avec ces slides : - Installation d'une Ubuntu 7.10 server sur une vmware - Installation minimaliste : sur l'écran « quoi installer », je n'ai rien coché - Une fois l'installation minimaliste terminée : apt-get update && apt-get dist-upgrade apt-get install openssh-server zip unzip make sun-java5-jdk subversion ant apache2 subversion-tools perl memcached build-essential gcc-4.1-locales automake1.9 autoconf manpages-dev debian-keyring apache2-prefork-dev libxml2-dev openssh-server - POUR PHP 6 : apt-get install libicu36-dev - Avec ça : - On a un environnement de dev permettant de compiler PHP (y compris en module Apache 2)‏ - On peut se connecter en SSH à la machine virtuelle (un seul objectif : meilleure intégration avec les outils de dev, utilisés depuis la machine « réelle »)‏ - Téléchargement du dernier snapshot PHP 5.2 ou PHP 6 depuis http://snaps.php.net/ , puis décompression, configure, make, et make install (A ADAPTER POUR UTILISER UN SNAPSHOT PLUS RECENT) : wget http://snaps.php.net/php5.3-200804102030.tar.bz2 tar xvf php5.3-200804102030.tar.bz2 cd php5.3-200804102030/ ./configure --with-apxs2=/usr/bin/apxs2 make make install
  5. Quelques détails sur l'installation faite pour les tests allant avec ces slides : - Installation d'une Ubuntu 7.10 server sur une vmware - Installation minimaliste : sur l'écran « quoi installer », je n'ai rien coché - Une fois l'installation minimaliste terminée : apt-get update && apt-get dist-upgrade apt-get install openssh-server zip unzip make sun-java5-jdk subversion ant apache2 subversion-tools perl memcached build-essential gcc-4.1-locales automake1.9 autoconf manpages-dev debian-keyring apache2-prefork-dev libxml2-dev openssh-server - POUR PHP 6 : apt-get install libicu36-dev - Avec ça : - On a un environnement de dev permettant de compiler PHP (y compris en module Apache 2)‏ - On peut se connecter en SSH à la machine virtuelle (un seul objectif : meilleure intégration avec les outils de dev, utilisés depuis la machine « réelle »)‏ - Téléchargement du dernier snapshot PHP 5.2 ou PHP 6 depuis http://snaps.php.net/ , puis décompression, configure, make, et make install (A ADAPTER POUR UTILISER UN SNAPSHOT PLUS RECENT) : wget http://snaps.php.net/php5.3-200804102030.tar.bz2 tar xvf php5.3-200804102030.tar.bz2 cd php5.3-200804102030/ ./configure --with-apxs2=/usr/bin/apxs2 make make install
  6. Design ====== Main assumption of the model is that the problem that we are to solve is the problem of the very long class names in PHP libraries. We would not attempt to take autoloader's job or create packaging model - only make names manageable. Namespaces are defined the following way: Zend/DB/Connection.php: <?php namespace Zend::DB; class Connection { } function connect() { } ?> Namespace definition does the following: All class and function names inside are automatically prefixed with namespace name. Inside namespace, local name always takes precedence over global name. Several files may be using the same namespace. The namespace declaration statement must be the very first statement in the file. The only exception is "declare" statement that can be used before. Every class and function in a namespace can be referred to by the full name - e.g. Zend::DB::Connection or Zend::DB::connect - at any time. <?php require 'Zend/Db/Connection.php'; $x = new Zend::DB::Connection; Zend::DB::connect(); ?> Namespace or class name can be imported: <?php require 'Zend/Db/Connection.php'; use Zend::DB; use Zend::DB::Connection as DbConnection; $x = new Zend::DB::Connection(); $y = new DB::connection(); $z = new DbConnection(); DB::connect(); ?> The use statement only defines name aliasing. It may create name alias for namespace or class. The simple form of statement "use A::B::C::D;" is equivalent to "use A::B::C::D as D;". The use statement can be used at any time in the global scope (not inside function/class) and takes effect from the point of definition down to the end of file. It is recommended however to place the use statements at the beginning of the file. The use statements have effect only on the file where they appear. The special "empty" namespace (:: prefix) is useful as explicit global namespace qualification. All class and function names started from :: interpreted as global. <?php namespace A::B::C; $con = ::mysql_connect(...); ?> A special constant __NAMESPACE__ contains the name of the current namespace. It can be used to construct fully-qualified names to pass them as callbacks. <?php namespace A::B::C; function foo() { } set_error_handler(__NAMESPACE__ . "::foo"); ?> In global namespace __NAMESPACE__ constant has the value of empty string. Names inside namespace are resolved according to the following rules: 1) all qualified names are translated during compilation according to current import rules. So if we have "use A::B::C" and then "C::D::e()" it is translated to "A::B::C::D::e()". 2) unqualified class names translated during compilation according to current import rules. So if we have "use A::B::C" and then "new C()" it is translated to "new A::B::C()". 3) inside namespace, calls to unqualified functions that are defined in current namespace (and are known at the time the call is parsed) are interpreted as calls to these namespace functions. 4) inside namespace, calls to unqualified functions that are not defined in current namespace are resolved at run-time. The call to function foo() inside namespace (A::B) first tries to find and call function from current namespace A::B::foo() and if it doesn't exist PHP tries to call internal function foo(). Note that using foo() inside namespace you can call only internal PHP functions, however using ::foo() you are able to call any function from the global namespace. 5) unqualified class names are resolved at run-time. E.q. "new Exception()" first tries to use (and autoload) class from current namespace and in case of failure uses internal PHP class. Note that using "new A" in namespace you can only create class from this namespace or internal PHP class, however using "new ::A" you are able to create any class from the global namespace. 6) Calls to qualified functions are resolved at run-time. Call to A::B::foo() first tries to call function foo() from namespace A::B, then it tries to find class A::B (__autoload() it if necessary) and call its static method foo()‏ 7) qualified class names are interpreted as class from corresponding namespace. So "new A::B::C()" refers to class C from namespace A::B. Examples -------- <?php namespace A; foo(); // first tries to call "foo" defined in namespace "A" // then calls internal function "foo" ::foo(); // calls function "foo" defined in global scope ?> <?php namespace A; new B(); // first tries to create object of class "B" defined in namespace "A" // then creates object of internal class "B" new ::B(); // creates object of class "B" defined in global scope ?> <?php namespace A; new A(); // first tries to create object of class "A" from namespace "A" (A::A)‏ // then creates object of internal class "A" ?> <?php namespace A; B::foo(); // first tries to call function "foo" from namespace "A::B" // then calls method "foo" of internal class "B" ::B::foo(); // first tries to call function "foo" from namespace "B" // then calls method "foo" of class "B" from global scope ?> The worst case if class name conflicts with namespace name <?php namespace A; A::foo(); // first tries to call function "foo" from namespace "A::A" // then tries to call method "foo" of class "A" from namespace "A" // then tries to call function "foo" from namespace "A" // then calls method "foo" of internal class "A" ::A::foo(); // first tries to call function "foo" from namespace "A" // then calls method "foo" of class "A" from global scope ?> TODO ==== * Support for namespace constants? * performance problems - calls to internal functions in namespaces are slower, because PHP first looks for such function in current namespace - calls to static methods are slower, because PHP first tries to look for corresponding function in namespace * Extend the Reflection API? * Add ReflectionNamespace class + getName()‏ + getClasses()‏ + getFunctions()‏ + getFiles()‏ * Add getNamespace() methods to ReflectionClass and ReflectionFunction * Rename namespaces to packages?
  7. A noter : au départ, développé pour PHP6, puis backporté vers PHP 5 une fois que ça a été suffisament stable. (Pas la première fonctionnalité prévue pour PHP 6 qui se retrouve PHP 5(.3), d'ailleurs)‏ Quelques liens intéressants à ce sujet (pour aller un peu plus loin que cet unique slide) : - http://blog.ulf-wendel.de/?p=149 : PHP: What is mysqlnd, do I need it? - http://blog.ulf-wendel.de/?p=182 : PHP: PDO_MYSQLND for PHP preview released - http://blog.ulf-wendel.de/?p=157 : PHP: mysqlnd saves 40% memory, finally (new tuning options)! - http://blog.ulf-wendel.de/?p=163 : PHP: 59 tuning screws for mysqlnd