SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Actualizando a PHP 7
Actualizando a
PHP7
phpmad - Octubre 2017
Actualizando a PHP 7
Quién soy
Federico J. Álvarez Valero
Arquitecto software en Bitban
Technologies
@falvarez
Actualizando a PHP 7
¿PHP 7? Pero eso ya está anticuado, ¿no?
Actualizando a PHP 7
Actualizando a PHP 7
Fuente: https://seld.be/notes/php-versions-stats-2017-1-edition
Actualizando a PHP 7
¿Por qué actualizar?
Actualizando a PHP 7
Actualizando a PHP 7
Fuente: http://php.net/supported-versions.php
Actualizando a PHP 7
Actualizando a PHP 7
Actualizando a PHP 7
¿Cómo actualizar?
Actualizando a PHP 7
Intérprete PHP
● CentOS: RemiRepo https://rpms.remirepo.net/
Actualizando a PHP 7
Intérprete PHP
● CentOS: RemiRepo https://rpms.remirepo.net/
● macOS: Homebrew
Actualizando a PHP 7
Intérprete PHP
● CentOS: RemiRepo https://rpms.remirepo.net/
● macOS: Homebrew
● Windows: ¯_(ツ)_/¯
Actualizando a PHP 7
Intérprete PHP
● CentOS: RemiRepo https://rpms.remirepo.net/
● macOS: Homebrew
● Windows: ¯_(ツ)_/¯
● Hosting: pregunta a tu proveedor
Actualizando a PHP 7
Instrucciones de migración
http://php.net/manual/en/migration70.php
Actualizando a PHP 7
Herramientas - plataforma
● Virtual Box
● Vagrant
● Docker
Actualizando a PHP 7
Herramientas - Análisis estático
● php -l
● grep / ack / sift
● PhpStorm
● php7cc
Actualizando a PHP 7
Herramientas - Análisis estático
Actualizando a PHP 7
Herramientas - Análisis dinámico
● PhpUnit
● ab (Apache Benchmark) y análisis de logs
● 3v4l.org
Actualizando a PHP 7
Fuente: https://3v4l.org/4WCT0
Actualizando a PHP 7
Recomendaciones
● Fase 1. Seguir las instrucciones de migración
● Fase 2. Empezar a usar las nuevas características del
lenguaje
Actualizando a PHP 7
¿Qué “trampas” podemos encontrar?
Actualizando a PHP 7
Cambios de comportamiento documentados
Gestión de errores:
Actualizando a PHP 7
Cambios de comportamiento documentados
Gestión de errores (eval):
Actualizando a PHP 7
Cambios de comportamiento
func_get_arg() y func_get_args() funcionan diferente
http://git.php.net/?p=php-src.git;a=blob;f=UPGRADING;h=aa5f82c49abf4e36476b328c2fc8820d4672c72a;hb=
refs/heads/PHP-7.0#l190
Actualizando a PHP 7
Cambios no documentados
Salida de debug_backtrace
https://bugs.php.net/bug.php?id=71547
https://gist.github.com/tivnet/2b9eb5a65bb9a096eaea984c004e1686
Actualizando a PHP 7
Bugs
Bug en la implementación de ticks:
https://stackoverflow.com/questions/38715598/php-cli-pcntl-not-working-in-php7-0-ubuntu-xenial-server
https://stackoverflow.com/questions/17906758/whats-the-relation-between-declareticks-and-a-signal-handle
r-in-php
https://bugs.php.net/bug.php?id=72966
Actualizando a PHP 7
¿Os he convencido?
Actualizando a PHP 7
¿Cuánto se tarda en migrar?
No se puede saber sin conocer el código.
En nuestro caso fue un poco más de una semana adaptar el
framework y un par de días por proyecto, aproximadamente (la
mayoría del tiempo se empleó en pruebas).
Actualizando a PHP 7
Enlaces
● Guías de migración:
http://php.net/manual/en/migration70.php
http://php.net/manual/en/migration71.php
● Cambios internos de PHP 7:
https://www.youtube.com/watch?v=M8Ktic5sPlo
● Laracast: PHP 7 Up and Running:
https://laracasts.com/series/php7-up-and-running
● Laracast: What’s New in PHP 7.1:
https://laracasts.com/series/whats-new-in-php-7-1
Actualizando a PHP 7
Actualizando a PHP 7

Contenu connexe

En vedette

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

En vedette (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Actualizando a PHP 7 - phpmad Lightning Talks - Episode One

  • 1. Actualizando a PHP 7 Actualizando a PHP7 phpmad - Octubre 2017
  • 2. Actualizando a PHP 7 Quién soy Federico J. Álvarez Valero Arquitecto software en Bitban Technologies @falvarez
  • 3. Actualizando a PHP 7 ¿PHP 7? Pero eso ya está anticuado, ¿no?
  • 5. Actualizando a PHP 7 Fuente: https://seld.be/notes/php-versions-stats-2017-1-edition
  • 6. Actualizando a PHP 7 ¿Por qué actualizar?
  • 8. Actualizando a PHP 7 Fuente: http://php.net/supported-versions.php
  • 11. Actualizando a PHP 7 ¿Cómo actualizar?
  • 12. Actualizando a PHP 7 Intérprete PHP ● CentOS: RemiRepo https://rpms.remirepo.net/
  • 13. Actualizando a PHP 7 Intérprete PHP ● CentOS: RemiRepo https://rpms.remirepo.net/ ● macOS: Homebrew
  • 14. Actualizando a PHP 7 Intérprete PHP ● CentOS: RemiRepo https://rpms.remirepo.net/ ● macOS: Homebrew ● Windows: ¯_(ツ)_/¯
  • 15. Actualizando a PHP 7 Intérprete PHP ● CentOS: RemiRepo https://rpms.remirepo.net/ ● macOS: Homebrew ● Windows: ¯_(ツ)_/¯ ● Hosting: pregunta a tu proveedor
  • 16. Actualizando a PHP 7 Instrucciones de migración http://php.net/manual/en/migration70.php
  • 17. Actualizando a PHP 7 Herramientas - plataforma ● Virtual Box ● Vagrant ● Docker
  • 18. Actualizando a PHP 7 Herramientas - Análisis estático ● php -l ● grep / ack / sift ● PhpStorm ● php7cc
  • 19. Actualizando a PHP 7 Herramientas - Análisis estático
  • 20. Actualizando a PHP 7 Herramientas - Análisis dinámico ● PhpUnit ● ab (Apache Benchmark) y análisis de logs ● 3v4l.org
  • 21. Actualizando a PHP 7 Fuente: https://3v4l.org/4WCT0
  • 22. Actualizando a PHP 7 Recomendaciones ● Fase 1. Seguir las instrucciones de migración ● Fase 2. Empezar a usar las nuevas características del lenguaje
  • 23. Actualizando a PHP 7 ¿Qué “trampas” podemos encontrar?
  • 24. Actualizando a PHP 7 Cambios de comportamiento documentados Gestión de errores:
  • 25. Actualizando a PHP 7 Cambios de comportamiento documentados Gestión de errores (eval):
  • 26. Actualizando a PHP 7 Cambios de comportamiento func_get_arg() y func_get_args() funcionan diferente http://git.php.net/?p=php-src.git;a=blob;f=UPGRADING;h=aa5f82c49abf4e36476b328c2fc8820d4672c72a;hb= refs/heads/PHP-7.0#l190
  • 27. Actualizando a PHP 7 Cambios no documentados Salida de debug_backtrace https://bugs.php.net/bug.php?id=71547 https://gist.github.com/tivnet/2b9eb5a65bb9a096eaea984c004e1686
  • 28. Actualizando a PHP 7 Bugs Bug en la implementación de ticks: https://stackoverflow.com/questions/38715598/php-cli-pcntl-not-working-in-php7-0-ubuntu-xenial-server https://stackoverflow.com/questions/17906758/whats-the-relation-between-declareticks-and-a-signal-handle r-in-php https://bugs.php.net/bug.php?id=72966
  • 29. Actualizando a PHP 7 ¿Os he convencido?
  • 30. Actualizando a PHP 7 ¿Cuánto se tarda en migrar? No se puede saber sin conocer el código. En nuestro caso fue un poco más de una semana adaptar el framework y un par de días por proyecto, aproximadamente (la mayoría del tiempo se empleó en pruebas).
  • 31. Actualizando a PHP 7 Enlaces ● Guías de migración: http://php.net/manual/en/migration70.php http://php.net/manual/en/migration71.php ● Cambios internos de PHP 7: https://www.youtube.com/watch?v=M8Ktic5sPlo ● Laracast: PHP 7 Up and Running: https://laracasts.com/series/php7-up-and-running ● Laracast: What’s New in PHP 7.1: https://laracasts.com/series/whats-new-in-php-7-1