With PHP 5.5 out and many production environments still running 5.2 (or older), it's time to paint a clear picture on why everyone should move to 5.4 and 5.5 and how to get code ready for the latest version of PHP. In this talk, we'll migrate an old piece of code using some standard and some very non-standard tools and techniques.
This document summarizes the history and evolution of PHP from its origins in 1995 as a CGI scripting language through its current version 5.5 released in 2013. It describes some of the major milestones like the introduction of the Zend Engine in PHP 4 that improved performance and compilation, and the transition to a true object model in PHP 5. It highlights new features in PHP 5.5 like the password hashing API and generators. Performance benchmarks show PHP 5.5 is faster than previous versions with speed improvements up to 20% from PHP 5.3. The document promotes contributing to the open source PHP project and lists some of the key areas and ways people can get involved.
Type hints were introduced with PHP 5. PHP 7 will add the ability to type hint on scalars and even to explicitly state what type will be returned from the function. This talk briefly goes over these added features to PHP 7.
PHP 5.5 is the latest version of PHP that includes new features like a password hashing API, generators syntax, and a finally keyword for exceptions. It also includes performance improvements and integration with the OPcache for opcode caching. Some changes in PHP 5.5 include deprecating the mysql extension and preg_replace /e modifier.
The PHP 7 release is just around the corner, bringing some much-desired changes and improvements to the language. However, many developers simply aren't aware of what's coming. We'll remedy this by checking out the new "spaceship operator," demonstrating how static type hints produce clean code, and using anonymous classes to quickly implement interfaces on the fly. Attendees will also learn about breaking changes and "gotchas" to watch out for when making the upgrade and will receive pointers on getting started with PHP 7 today.
The document discusses mysqlnd, a PHP extension that replaces libmysql. Mysqlnd provides significant memory savings when processing result sets by avoiding duplicating result data in memory. It also includes detailed statistics collection and an extensible plugin architecture. Mysqlnd is now the default MySQL connector used by PHP.
This document discusses using Zend Framework for building web applications. It describes how Zend_Application provides dependency injection and configuration without requiring objects. It also covers using Zend_Db for database access, Zend_Controller for routing, and Zend_Translate for internationalization. Validation is discussed, including using Zend_Validate with Zend_Translate to internationalize error messages.
PHP 7 is scheduled for release in November 2015 and will be a major new version that introduces many new features and changes. Some key points include: PHP 7 will provide improved performance through a new Zend Engine 3.0 and full support for 32-bit and 64-bit platforms. New features include scalar type declarations, return type declarations, new operators like the null coalesce operator and the spaceship operator, and anonymous classes. The release will also change some behaviors and remove deprecated features.
The document summarizes the PHP lifecycle when used with Apache. It describes the request process from the client request, Apache parsing the request and handling it, to PHP parsing, compiling and executing the script. It provides code examples from key points in the PHP parsing and execution process within the Zend engine. Sample requests are outlined from client to server processing and the PHP opcodes and execution.
This document provides an overview of the PHP request lifecycle, including how a PHP file is read, parsed, compiled, executed, and outputs. It discusses how PHP is handled by different web servers like Apache, Nginx, and FastCGI. It also covers topics like opcode caching with APC, profiling PHP performance with Xdebug, and analyzing PHP opcodes with Vulcan Logic Dumper.
This document discusses PHP 7 and alternative PHP implementations like HHVM. It provides an overview of PHP 7 features like a reworked engine and true 64-bit support. It also discusses alternative implementations like HHVM, which uses a just-in-time compiler to compile PHP to native machine code, and Zephir, which allows PHP code to be compiled to C code for performance benefits. Finally, it shares benchmarks showing performance improvements of these implementations over PHP 5.
This document introduces PHP 5.4 and provides an overview of new features and changes from previous versions. Some key additions in PHP 5.4 include improved performance, always available short echo tags, closure support for $this, class member access on instantiation, and a built-in development web server. The document also discusses how to switch to PHP 5.4 on Gentoo Linux and provides useful links for more information.
Version 1.2 of the document introduces new versions of PHP including PHP 5.6 and PHP 7. PHP 5.6 included new features like constant expressions, variadic functions, and exponentiation. PHP 7 included major performance improvements and introduced scalar type declarations, return type declarations, and new operators like the nullsafe operator and spaceship comparison operator. PHP 7 also removed alternative PHP tags and deprecated old PHP codes. Future versions of PHP will focus on additional type declarations and other new language features.
The document discusses PHP performance and dives into the internals of how PHP works, including details on the Zend engine, compilation process involving lexing, parsing and compiling to opcodes, and execution through opcode interpretation by the virtual machine. It provides examples and tips on optimizing performance by reducing compilation overhead through opcode caching, profiling execution to find bottlenecks, and analyzing PHP functions at the C level to optimize system calls and memory usage.
This document provides tips, tricks, and examples of common gotchas in PHP programming. It demonstrates unexpected behaviors that can occur due to PHP's highly dynamic nature and weakly typed system. A series of code snippets are shown with their expected versus actual outputs to illustrate issues one may encounter with variables, strings, arrays, and type coercion. The document also provides best practices for PHP development and an overview of common topics covered in the PHP certification exam.
This document discusses integrating test automation and code coverage for web service applications. It introduces Postman for calling web services and testing responses, and Jenkins for build automation and tracking test results over time. It then demonstrates setting up a test automation workflow using these tools on a sample Laravel application, including starting and stopping coverage collection, running tests from Postman and PHPUnit, and merging the results. Some best practices and philosophies around test automation and code coverage are also discussed.
Perlのモジュールを公開するときに気をつけておいた方がよい個のこと
This document provides tips for publishing Perl modules to CPAN. It discusses things to be aware of such as distributions being permanently archived on BackPAN even if deleted, CPAN accepting almost anything, and several testing services that can improve modules like PAUSE, CPAN Testers, CPANTS, and more. It also covers best practices for metrics evaluated by these services around availability, integrity, file layout, prerequisites and more. Developers are encouraged to use better tools from the Perl Toolchain Gang to avoid issues.
The document provides rules and tools for debugging. It discusses understanding the system, making failures reproducible, quitting thinking and closely observing behaviors, dividing problems into smaller pieces, changing one thing at a time, and maintaining an audit trail of changes. Tools mentioned include Xdebug, Selenium, PHPUnit, strace, and source control systems. Logging, instrumentation, and testing techniques are also covered.
Finding and fixing bugs is a major chunk of any developers time. This talk describes the basic rules for effective debugging in any language, but shows how the tools available in PHP can be used to find and fix even the most elusive error
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
This document summarizes Derick Rethans' presentation on the Xdebug debugging tool for PHP. It introduces Xdebug, how to install it, and how to use its various debugging features like setting breakpoints, viewing variables, profiling code, and more. The presentation provides code examples and instructions for integrating Xdebug with IDEs to enable remote debugging of PHP applications.
PHP7 brings a tremendous number of new features. Tonight, we will take a look at the null coalesce operator, new execution order (uniform variable syntax), new exceptions and more.
The document provides an overview of Symfony2, an open-source PHP web application framework. It describes Symfony2 as a set of decoupled and cohesive components including routing, templating, form handling, and more. It also outlines Symfony2's support for modern best practices like dependency injection and an object-oriented approach to web application development using the Model-View-Controller pattern.
With versions stretching from 5.3 to 5.6, PHP has several major published versions, that require special attention when migrating. Beyond checking for compilation, the code must be reviewed to avoid pitfalls like obsoletes functions, new features, change in default parameters or behavior. We'll set up a checklist of such traps, and ways to find them in the code and be reading for PHP 5.6.
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
The document provides tips for optimizing PHP code, including using string functions instead of regular expressions where possible, passing references to reduce memory usage, using persistent database connections, and checking mysql_unbuffered_query() for faster queries. It also discusses HTTP requests and responses, cookie expiry, references in PHP, returning references from functions, and the debug_backtrace() function. The document concludes with tips for improving security such as checking for uninitialized variables, validating user input, and restricting access to included files.
This document summarizes some new features in PHP 5.4:
- Array syntax can now be written more concisely using square brackets instead of array functions.
- PHP 5.4 includes a built-in web server for development purposes, allowing PHP scripts to be run without Apache.
- Traits allow sharing of methods across classes to reduce code duplication, similar to mixins in Ruby.
- Closures now support accessing properties of the enclosing class scope via $this.
The document introduces Symfony2, an open-source PHP web application framework. It discusses key components like the dependency injection container, routing, and an object-oriented approach to handling requests and responses. It presents Symfony2's implementation of the MVC pattern using bundles, controllers and templates.
The document discusses Symfony2, an open-source PHP web application framework. It provides an overview of its components including routing, dependency injection, and templating. It also describes how Symfony uses an MVC architecture and emphasizes loose coupling and flexibility.
Session Server - Maintaing State between several Servers
This document summarizes maintaining state between servers using a session server. It discusses the need for sessions in stateless HTTP, limitations of built-in PHP sessions, and how a central session server addresses these issues. It then covers building a session server in PHP using sockets and processes (PCNTL), and implementing a full-featured session server using the Net_Server and HTTP_SessionServer classes along with a client library.
This document discusses several new features introduced in PHP 7 including:
1. Exception handling was improved with a new exception hierarchy and errors are now catchable.
2. Scalar type declarations were added allowing functions to declare and enforce parameter and return value types like int, float, bool, etc.
3. The null coalescing operator ?? was added to simplify checking for null values and providing defaults.
4. The spaceship operator <=> was added for combined comparison of values returning -1, 0, or 1.
Overall PHP 7 focused on major internal improvements and optimizations while maintaining backwards compatibility and adding several new features to further strengthen type safety.
This workshop is a hands-on training where a real Zend Framework application is used as an example to start improving QA using tools to test, document and perform software metric calculations to indicate where the software can be improved. I also explain the reports produced by a CI system.
The document discusses vulnerabilities in random number generation in PHP. It summarizes several vulnerabilities discovered between 2008-2012 related to predictable random numbers generated by PHP functions like mt_rand(). It also discusses how PHP developers have been slow to address these issues. The document then provides step-by-step explanations of how to exploit vulnerabilities in four different CMS platforms - OpenCart, DataLife Engine, UMI.CMS, and OpenCart again - by predicting random values used for tasks like password resets and session IDs.
The document discusses vulnerabilities in random number generation in PHP. It summarizes several vulnerabilities discovered between 2008-2012 related to predictable random numbers generated by PHP functions like mt_rand(). It also discusses how PHP developers have been slow to address these issues. The document then provides step-by-step explanations of how to exploit vulnerabilities in four different CMS platforms - OpenCart, DataLife Engine, UMI.CMS, and OpenCart again - by predicting random values used for tasks like password resets and session IDs.
How to Design a Great API (using flask) [ploneconf2017]
How do you build an API that developers love building and consumers love using?
There's a lot that goes into creating a great API. This presentation shares some tips & tricks, architectural patterns, and best practices that go into building a great engineering environment around your API.
Talk presented on Oct 18, 2017 at PloneConf2017.
Topics covered by this talk:
Intuitive Practices:
standardization, configuration/environment files, ORMs, SQLAlchemy, database migrations, Alembic, database seeds, requirements.txt, package management, dependency management, setup scripts
Durable Practices:
Unit Tests, virtual environments, flush vs commit, error rollbacks, request lifecycle, session lifecycle
Flexible Practices:
Directory structures, application factories, blueprints, python debugger
Reliable Practices:
Logging, progressive rollouts, slack hooks, cron health checks, api versioning, api analytics
Use Friendly Practices:
Endpoint design, endpoint documentation, debugging tools, postman
Speed Practices:
Python profiling, Bulk SQL Inserts, caching
Beyond PHP - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just writing PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
This document summarizes new features introduced in PHP versions 5.3 through 5.6, including namespaces, closures, JSON serialization, session handling improvements, array syntax updates, a built-in web server, traits, generators, OPcache, password hashing functions, variadic functions, and the __debugInfo() method. It provides code examples to illustrate many of these new language features.
This document summarizes the history and evolution of PHP from its origins in 1995 as a CGI scripting language through its current version 5.5 released in 2013. It describes some of the major milestones like the introduction of the Zend Engine in PHP 4 that improved performance and compilation, and the transition to a true object model in PHP 5. It highlights new features in PHP 5.5 like the password hashing API and generators. Performance benchmarks show PHP 5.5 is faster than previous versions with speed improvements up to 20% from PHP 5.3. The document promotes contributing to the open source PHP project and lists some of the key areas and ways people can get involved.
Type hints were introduced with PHP 5. PHP 7 will add the ability to type hint on scalars and even to explicitly state what type will be returned from the function. This talk briefly goes over these added features to PHP 7.
PHP 5.5 is the latest version of PHP that includes new features like a password hashing API, generators syntax, and a finally keyword for exceptions. It also includes performance improvements and integration with the OPcache for opcode caching. Some changes in PHP 5.5 include deprecating the mysql extension and preg_replace /e modifier.
The PHP 7 release is just around the corner, bringing some much-desired changes and improvements to the language. However, many developers simply aren't aware of what's coming. We'll remedy this by checking out the new "spaceship operator," demonstrating how static type hints produce clean code, and using anonymous classes to quickly implement interfaces on the fly. Attendees will also learn about breaking changes and "gotchas" to watch out for when making the upgrade and will receive pointers on getting started with PHP 7 today.
Mysqlnd, an unknown powerful PHP extensionjulien pauli
The document discusses mysqlnd, a PHP extension that replaces libmysql. Mysqlnd provides significant memory savings when processing result sets by avoiding duplicating result data in memory. It also includes detailed statistics collection and an extensible plugin architecture. Mysqlnd is now the default MySQL connector used by PHP.
This document discusses using Zend Framework for building web applications. It describes how Zend_Application provides dependency injection and configuration without requiring objects. It also covers using Zend_Db for database access, Zend_Controller for routing, and Zend_Translate for internationalization. Validation is discussed, including using Zend_Validate with Zend_Translate to internationalize error messages.
PHP 7 is scheduled for release in November 2015 and will be a major new version that introduces many new features and changes. Some key points include: PHP 7 will provide improved performance through a new Zend Engine 3.0 and full support for 32-bit and 64-bit platforms. New features include scalar type declarations, return type declarations, new operators like the null coalesce operator and the spaceship operator, and anonymous classes. The release will also change some behaviors and remove deprecated features.
The document summarizes the PHP lifecycle when used with Apache. It describes the request process from the client request, Apache parsing the request and handling it, to PHP parsing, compiling and executing the script. It provides code examples from key points in the PHP parsing and execution process within the Zend engine. Sample requests are outlined from client to server processing and the PHP opcodes and execution.
Anatomy of a PHP Request ( UTOSC 2010 )Joseph Scott
This document provides an overview of the PHP request lifecycle, including how a PHP file is read, parsed, compiled, executed, and outputs. It discusses how PHP is handled by different web servers like Apache, Nginx, and FastCGI. It also covers topics like opcode caching with APC, profiling PHP performance with Xdebug, and analyzing PHP opcodes with Vulcan Logic Dumper.
This document discusses PHP 7 and alternative PHP implementations like HHVM. It provides an overview of PHP 7 features like a reworked engine and true 64-bit support. It also discusses alternative implementations like HHVM, which uses a just-in-time compiler to compile PHP to native machine code, and Zephir, which allows PHP code to be compiled to C code for performance benefits. Finally, it shares benchmarks showing performance improvements of these implementations over PHP 5.
This document introduces PHP 5.4 and provides an overview of new features and changes from previous versions. Some key additions in PHP 5.4 include improved performance, always available short echo tags, closure support for $this, class member access on instantiation, and a built-in development web server. The document also discusses how to switch to PHP 5.4 on Gentoo Linux and provides useful links for more information.
Version 1.2 of the document introduces new versions of PHP including PHP 5.6 and PHP 7. PHP 5.6 included new features like constant expressions, variadic functions, and exponentiation. PHP 7 included major performance improvements and introduced scalar type declarations, return type declarations, and new operators like the nullsafe operator and spaceship comparison operator. PHP 7 also removed alternative PHP tags and deprecated old PHP codes. Future versions of PHP will focus on additional type declarations and other new language features.
The document discusses PHP performance and dives into the internals of how PHP works, including details on the Zend engine, compilation process involving lexing, parsing and compiling to opcodes, and execution through opcode interpretation by the virtual machine. It provides examples and tips on optimizing performance by reducing compilation overhead through opcode caching, profiling execution to find bottlenecks, and analyzing PHP functions at the C level to optimize system calls and memory usage.
This document provides tips, tricks, and examples of common gotchas in PHP programming. It demonstrates unexpected behaviors that can occur due to PHP's highly dynamic nature and weakly typed system. A series of code snippets are shown with their expected versus actual outputs to illustrate issues one may encounter with variables, strings, arrays, and type coercion. The document also provides best practices for PHP development and an overview of common topics covered in the PHP certification exam.
This document discusses integrating test automation and code coverage for web service applications. It introduces Postman for calling web services and testing responses, and Jenkins for build automation and tracking test results over time. It then demonstrates setting up a test automation workflow using these tools on a sample Laravel application, including starting and stopping coverage collection, running tests from Postman and PHPUnit, and merging the results. Some best practices and philosophies around test automation and code coverage are also discussed.
What you need to remember when you upload to CPANcharsbar
Perlのモジュールを公開するときに気をつけておいた方がよい個のこと
This document provides tips for publishing Perl modules to CPAN. It discusses things to be aware of such as distributions being permanently archived on BackPAN even if deleted, CPAN accepting almost anything, and several testing services that can improve modules like PAUSE, CPAN Testers, CPANTS, and more. It also covers best practices for metrics evaluated by these services around availability, integrity, file layout, prerequisites and more. Developers are encouraged to use better tools from the Perl Toolchain Gang to avoid issues.
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber
The document provides rules and tools for debugging. It discusses understanding the system, making failures reproducible, quitting thinking and closely observing behaviors, dividing problems into smaller pieces, changing one thing at a time, and maintaining an audit trail of changes. Tools mentioned include Xdebug, Selenium, PHPUnit, strace, and source control systems. Logging, instrumentation, and testing techniques are also covered.
Finding and fixing bugs is a major chunk of any developers time. This talk describes the basic rules for effective debugging in any language, but shows how the tools available in PHP can be used to find and fix even the most elusive error
Practical tips for dealing with projects involving legacy code. Covers investigating past projects, static analysis of existing code, and methods for changing legacy code.
Presented at PHP Benelux '10
Xdebug - Derick Rethans - Barcelona PHP Conference 2008phpbarcelona
This document summarizes Derick Rethans' presentation on the Xdebug debugging tool for PHP. It introduces Xdebug, how to install it, and how to use its various debugging features like setting breakpoints, viewing variables, profiling code, and more. The presentation provides code examples and instructions for integrating Xdebug with IDEs to enable remote debugging of PHP applications.
PHP7 brings a tremendous number of new features. Tonight, we will take a look at the null coalesce operator, new execution order (uniform variable syntax), new exceptions and more.
The document provides an overview of Symfony2, an open-source PHP web application framework. It describes Symfony2 as a set of decoupled and cohesive components including routing, templating, form handling, and more. It also outlines Symfony2's support for modern best practices like dependency injection and an object-oriented approach to web application development using the Model-View-Controller pattern.
Preparing for the next PHP version (5.6)Damien Seguy
With versions stretching from 5.3 to 5.6, PHP has several major published versions, that require special attention when migrating. Beyond checking for compilation, the code must be reviewed to avoid pitfalls like obsoletes functions, new features, change in default parameters or behavior. We'll set up a checklist of such traps, and ways to find them in the code and be reading for PHP 5.6.
Fighting Fear-Driven-Development With PHPUnitJames Fuller
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
The document provides tips for optimizing PHP code, including using string functions instead of regular expressions where possible, passing references to reduce memory usage, using persistent database connections, and checking mysql_unbuffered_query() for faster queries. It also discusses HTTP requests and responses, cookie expiry, references in PHP, returning references from functions, and the debug_backtrace() function. The document concludes with tips for improving security such as checking for uninitialized variables, validating user input, and restricting access to included files.
This document summarizes some new features in PHP 5.4:
- Array syntax can now be written more concisely using square brackets instead of array functions.
- PHP 5.4 includes a built-in web server for development purposes, allowing PHP scripts to be run without Apache.
- Traits allow sharing of methods across classes to reduce code duplication, similar to mixins in Ruby.
- Closures now support accessing properties of the enclosing class scope via $this.
The document introduces Symfony2, an open-source PHP web application framework. It discusses key components like the dependency injection container, routing, and an object-oriented approach to handling requests and responses. It presents Symfony2's implementation of the MVC pattern using bundles, controllers and templates.
The document discusses Symfony2, an open-source PHP web application framework. It provides an overview of its components including routing, dependency injection, and templating. It also describes how Symfony uses an MVC architecture and emphasizes loose coupling and flexibility.
Session Server - Maintaing State between several ServersStephan Schmidt
This document summarizes maintaining state between servers using a session server. It discusses the need for sessions in stateless HTTP, limitations of built-in PHP sessions, and how a central session server addresses these issues. It then covers building a session server in PHP using sockets and processes (PCNTL), and implementing a full-featured session server using the Net_Server and HTTP_SessionServer classes along with a client library.
This document discusses several new features introduced in PHP 7 including:
1. Exception handling was improved with a new exception hierarchy and errors are now catchable.
2. Scalar type declarations were added allowing functions to declare and enforce parameter and return value types like int, float, bool, etc.
3. The null coalescing operator ?? was added to simplify checking for null values and providing defaults.
4. The spaceship operator <=> was added for combined comparison of values returning -1, 0, or 1.
Overall PHP 7 focused on major internal improvements and optimizations while maintaining backwards compatibility and adding several new features to further strengthen type safety.
This workshop is a hands-on training where a real Zend Framework application is used as an example to start improving QA using tools to test, document and perform software metric calculations to indicate where the software can be improved. I also explain the reports produced by a CI system.
Reutov, yunusov, nagibin random numbers take iiDefconRussia
The document discusses vulnerabilities in random number generation in PHP. It summarizes several vulnerabilities discovered between 2008-2012 related to predictable random numbers generated by PHP functions like mt_rand(). It also discusses how PHP developers have been slow to address these issues. The document then provides step-by-step explanations of how to exploit vulnerabilities in four different CMS platforms - OpenCart, DataLife Engine, UMI.CMS, and OpenCart again - by predicting random values used for tasks like password resets and session IDs.
The document discusses vulnerabilities in random number generation in PHP. It summarizes several vulnerabilities discovered between 2008-2012 related to predictable random numbers generated by PHP functions like mt_rand(). It also discusses how PHP developers have been slow to address these issues. The document then provides step-by-step explanations of how to exploit vulnerabilities in four different CMS platforms - OpenCart, DataLife Engine, UMI.CMS, and OpenCart again - by predicting random values used for tasks like password resets and session IDs.
How to Design a Great API (using flask) [ploneconf2017]Devon Bernard
How do you build an API that developers love building and consumers love using?
There's a lot that goes into creating a great API. This presentation shares some tips & tricks, architectural patterns, and best practices that go into building a great engineering environment around your API.
Talk presented on Oct 18, 2017 at PloneConf2017.
Topics covered by this talk:
Intuitive Practices:
standardization, configuration/environment files, ORMs, SQLAlchemy, database migrations, Alembic, database seeds, requirements.txt, package management, dependency management, setup scripts
Durable Practices:
Unit Tests, virtual environments, flush vs commit, error rollbacks, request lifecycle, session lifecycle
Flexible Practices:
Directory structures, application factories, blueprints, python debugger
Reliable Practices:
Logging, progressive rollouts, slack hooks, cron health checks, api versioning, api analytics
Use Friendly Practices:
Endpoint design, endpoint documentation, debugging tools, postman
Speed Practices:
Python profiling, Bulk SQL Inserts, caching
The document discusses building testable PHP applications. It covers topics like testing code, testable architecture, dependency injection, and static code analysis tools like PHP Code Sniffer, PHP Mess Detector, and PHP Copy Paster Detector. The document emphasizes that writing tests and designing for testability leads to fewer bugs and more maintainable code. It provides examples of unit testing and recommends test-driven development practices.
Similar to The why and how of moving to PHP 5.4/5.5 (20)
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Wim Godden discusses how to bring bright ideas to life by first determining if an idea is truly original and if there is market demand. He recommends building small initially to get fast feedback and adding features step-by-step. Talking to potential customers can provide feedback but be careful not to share every detail. Leverage existing services like APIs and consider scalability from the start. Financial projections are important, and success may lead to building on the idea through APIs, plugins or white labels. Keep iterating ideas and be willing to let others take over if it does not work out.
With PHP 8.0 recently released and PHP 5.x still accounting for over 40% of all production environments, it's time to paint a clear picture on not just why everyone should move to 8.x, but on how to get code ready for the latest version of PHP. In this talk, we'll look at some handy tools and techniques to ease the migration.
With PHP 7.2 recently released and PHP 5.3 and 5.4 still accounting for over 40% of all production environments, it's time to paint a clear picture on not just why everyone should move to 7.0 (or preferably 7.1), but on how to get code ready for the latest version of PHP.
Using the version compatibility checker for PHP_CodeSniffer and a few simple step-by-step instructions, upgrading old code to make it compatible with the latest PHP versions becomes actually really easy. In this talk, we'll migrate an old piece of code and get rid of the demons of the past and ready for the present and future.
With more and more sites falling victim to data theft, you've probably read the list of things (not) to do to write secure code. But what else should you do to make sure your code and the rest of your web stack is secure ? In this tutorial we'll go through the basic and more advanced techniques of securing your web and database servers, securing your backend PHP code and your frontend javascript code. We'll also look at how you can build code that detects and blocks intrusion attempts and a bunch of other tips and tricks to make sure your customer data stays secure.
With more and more sites falling victim to data theft, you've probably read the list of things (not) to do to write secure code. But what else should you do to make sure your code and the rest of your web stack is secure ? In this tutorial we'll go through the basic and more advanced techniques of securing your web and database servers, securing your backend PHP code and your frontend javascript code. We'll also look at how you can build code that detects and blocks intrusion attempts and a bunch of other tips and tricks to make sure your customer data stays secure.
The time of static or dynamically generated sites is long gone. Non-stop interaction with users is the new normal. However, polling with Ajax requests is processor intensive and cumbersome. Websockets allow you to interact with users in real-time without increasing system load. We'll go through the basics and see all the different options, illustrated with live examples of how and when to use it, as well as when not to use it.
Who would have thought putting 140 charachter messages about one's life online or having a virtual farm game could ever be popular ? Then again, many of us have those weird (but sometimes brilliant) ideas.
But no matter how incredible your ideas might be, getting them launched successfully takes more than writing lots of php code, smacking a sleek design on it and dropping it on a server.
So what does it take ? Where do most ideas crashland and how can you avoid making the same mistakes and transform your ideas into reality ? We'll look at what steps are needed to make a service successful and sustainable.
Your app lives on the network - networking for web developersWim Godden
Our job might be to build web applications, but we can't build apps that rely on networking if we don't know how these networks and the big network that connects them all (this thing called the Internet) actually work.
I'll walk through the basics of networking, then dive a lot deeper (from TCP/UDP to IPv4/6, source/destination ports, sockets, DNS and even BGP).
Prepare for an eye-opener when you realize how much a typical app relies on all of these (and many more) working flawlessly... and how you can prepare your app for failure in the chain.
With PHP 7.2 recently released and PHP 5.3 and 5.4 still accounting for over 40% of all production environments, it's time to paint a clear picture on not just why everyone should move to 7.0 (or preferably 7.1), but on how to get code ready for the latest version of PHP.
Using the version compatibility checker for PHP_CodeSniffer and a few simple step-by-step instructions, upgrading old code to make it compatible with the latest PHP versions becomes actually really easy. In this talk, we'll migrate an old piece of code and get rid of the demons of the past and ready for the present and future.
The document discusses upgrading from PHP 5.x to PHP 7.x. It begins by explaining why upgrading is important for security, performance and compatibility reasons, as PHP 5.x reaches end of life. It then discusses how to upgrade, including new features in PHP 7.x like scalar type declarations and null coalescing operators, and removed/deprecated functions. It emphasizes automating the process using tools like PHPCompatibility to analyze code for compatibility issues across PHP versions. Upgrading in a staged, tested manner is recommended over postponing upgrades.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
With more and more sites falling victim to data theft, you've probably read the list of things (not) to do to write secure code. But what else should you do to make sure your code and the rest of your web stack is secure ? In this tutorial we'll go through the basic and more advanced techniques of securing your web and database servers, securing your backend PHP code and your frontend javascript code. We'll also look at how you can build code that detects and blocks intrusion attempts and a bunch of other tips and tricks to make sure your customer data stays secure.
The time of static or dynamically generated sites is long gone. Non-stop interaction with users is the new normal. However, polling with Ajax requests is processor intensive and cumbersome. Websockets allow you to interact with users in real-time without increasing system load. We'll go through the basics and see all the different options, illustrated with live examples of how and when to use it.
Your app lives on the network - networking for web developersWim Godden
Our job might be to build web applications, but we can't build apps that rely on networking if we don't know how these networks and the big network that connects them all (this thing called the Internet) actually work.
I'll walk through the basics of networking, then dive a lot deeper (from TCP/UDP to IPv4/6, source/destination ports, sockets, DNS and even BGP).
Prepare for an eye-opener when you realize how much a typical app relies on all of these (and many more) working flawlessly... and how you can prepare your app for failure in the chain.
With more and more sites falling victim to data theft, you've probably read the list of things (not) to do to write secure code. But what else should you do to make sure your code and the rest of your web stack is secure ? In this tutorial we'll go through the basic and more advanced techniques of securing your web and database servers, securing your backend PHP code and your frontend javascript code. We'll also look at how you can build code that detects and blocks intrusion attempts and a bunch of other tips and tricks to make sure your customer data stays secure.
With more and more sites falling victim to data theft, you've probably read the list of things (not) to do to write secure code. But what else should you do to make sure your code and the rest of your web stack is secure ? In this tutorial we'll go through the basic and more advanced techniques of securing your web and database servers, securing your backend PHP code and your frontend javascript code. We'll also look at how you can build code that detects and blocks intrusion attempts and a bunch of other tips and tricks to make sure your customer data stays secure.
This document discusses asynchronous PHP processing and libraries. It begins with an overview of synchronous vs asynchronous processing and blocking vs non-blocking I/O. It then reviews several approaches for asynchronous PHP including Pthreads, pcntl_fork, popen, curl_multi, and event loops with libraries like ReactPHP. ReactPHP is discussed in depth as an event-driven non-blocking I/O library that uses promises and streams for asynchronous operations. Examples are provided for asynchronous HTTP requests, DNS lookups, and a pub/sub application using ZeroMQ. Key points emphasized are that asynchronous code does not necessarily run faster and execution order is not guaranteed.
With more and more sites falling victim to data theft, you've probably read the list of things (not) to do to write secure code. But what else should you do to make sure your code and the rest of your web stack is secure ? In this tutorial we'll go through the basic and more advanced techniques of securing your web and database servers, securing your backend PHP code and your frontend javascript code. We'll also look at how you can build code that detects and blocks intrusion attempts and a bunch of other tips and tricks to make sure your customer data stays secure.
With more and more sites falling victim to data theft, you've probably read the list of things (not) to do to write secure code. But what else should you do to make sure your code and the rest of your web stack is secure ? In this tutorial we'll go through the basic and more advanced techniques of securing your web and database servers, securing your backend PHP code and your frontend javascript code. We'll also look at how you can build code that detects and blocks intrusion attempts and a bunch of other tips and tricks to make sure your customer data stays secure.
Blockchain technology is transforming industries and reshaping the way we conduct business, manage data, and secure transactions. Whether you're new to blockchain or looking to deepen your knowledge, our guidebook, "Blockchain for Dummies", is your ultimate resource.
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
Support en anglais diffusé lors de l'événement 100% IA organisé dans les locaux parisiens d'Iguane Solutions, le mardi 2 juillet 2024 :
- Présentation de notre plateforme IA plug and play : ses fonctionnalités avancées, telles que son interface utilisateur intuitive, son copilot puissant et des outils de monitoring performants.
- REX client : Cyril Janssens, CTO d’ easybourse, partage son expérience d’utilisation de notre plateforme IA plug & play.
Best Programming Language for Civil EngineersAwais Yaseen
The integration of programming into civil engineering is transforming the industry. We can design complex infrastructure projects and analyse large datasets. Imagine revolutionizing the way we build our cities and infrastructure, all by the power of coding. Programming skills are no longer just a bonus—they’re a game changer in this era.
Technology is revolutionizing civil engineering by integrating advanced tools and techniques. Programming allows for the automation of repetitive tasks, enhancing the accuracy of designs, simulations, and analyses. With the advent of artificial intelligence and machine learning, engineers can now predict structural behaviors under various conditions, optimize material usage, and improve project planning.
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Bert Blevins
Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.
How RPA Help in the Transportation and Logistics Industry.pptxSynapseIndia
Revolutionize your transportation processes with our cutting-edge RPA software. Automate repetitive tasks, reduce costs, and enhance efficiency in the logistics sector with our advanced solutions.
Quality Patents: Patents That Stand the Test of TimeAurora Consulting
Is your patent a vanity piece of paper for your office wall? Or is it a reliable, defendable, assertable, property right? The difference is often quality.
Is your patent simply a transactional cost and a large pile of legal bills for your startup? Or is it a leverageable asset worthy of attracting precious investment dollars, worth its cost in multiples of valuation? The difference is often quality.
Is your patent application only good enough to get through the examination process? Or has it been crafted to stand the tests of time and varied audiences if you later need to assert that document against an infringer, find yourself litigating with it in an Article 3 Court at the hands of a judge and jury, God forbid, end up having to defend its validity at the PTAB, or even needing to use it to block pirated imports at the International Trade Commission? The difference is often quality.
Quality will be our focus for a good chunk of the remainder of this season. What goes into a quality patent, and where possible, how do you get it without breaking the bank?
** Episode Overview **
In this first episode of our quality series, Kristen Hansen and the panel discuss:
⦿ What do we mean when we say patent quality?
⦿ Why is patent quality important?
⦿ How to balance quality and budget
⦿ The importance of searching, continuations, and draftsperson domain expertise
⦿ Very practical tips, tricks, examples, and Kristen’s Musts for drafting quality applications
https://www.aurorapatents.com/patently-strategic-podcast.html
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc
Six months into 2024, and it is clear the privacy ecosystem takes no days off!! Regulators continue to implement and enforce new regulations, businesses strive to meet requirements, and technology advances like AI have privacy professionals scratching their heads about managing risk.
What can we learn about the first six months of data privacy trends and events in 2024? How should this inform your privacy program management for the rest of the year?
Join TrustArc, Goodwin, and Snyk privacy experts as they discuss the changes we’ve seen in the first half of 2024 and gain insight into the concrete, actionable steps you can take to up-level your privacy program in the second half of the year.
This webinar will review:
- Key changes to privacy regulations in 2024
- Key themes in privacy and data governance in 2024
- How to maximize your privacy program in the second half of 2024
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
Choose our Linux Web Hosting for a seamless and successful online presencerajancomputerfbd
Our Linux Web Hosting plans offer unbeatable performance, security, and scalability, ensuring your website runs smoothly and efficiently.
Visit- https://onliveserver.com/linux-web-hosting/
The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2023 and the first deals of 2024.
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxSynapseIndia
Your comprehensive guide to RPA in healthcare for 2024. Explore the benefits, use cases, and emerging trends of robotic process automation. Understand the challenges and prepare for the future of healthcare automation
Best Practices for Effectively Running dbt in Airflow.pdfTatiana Al-Chueyr
As a popular open-source library for analytics engineering, dbt is often used in combination with Airflow. Orchestrating and executing dbt models as DAGs ensures an additional layer of control over tasks, observability, and provides a reliable, scalable environment to run dbt models.
This webinar will cover a step-by-step guide to Cosmos, an open source package from Astronomer that helps you easily run your dbt Core projects as Airflow DAGs and Task Groups, all with just a few lines of code. We’ll walk through:
- Standard ways of running dbt (and when to utilize other methods)
- How Cosmos can be used to run and visualize your dbt projects in Airflow
- Common challenges and how to address them, including performance, dependency conflicts, and more
- How running dbt projects in Airflow helps with cost optimization
Webinar given on 9 July 2024
Measuring the Impact of Network Latency at TwitterScyllaDB
Widya Salim and Victor Ma will outline the causal impact analysis, framework, and key learnings used to quantify the impact of reducing Twitter's network latency.
2. Who am I ?
Wim Godden (@wimgtr)
Founder of Cu.be Solutions (http://cu.be)
Open Source developer since 1997
Developer of OpenX, PHPCompatibility, Nginx SCL, ...
Speaker at PHP and Open Source conferences
3. Why vs How
Part 1 : why upgrade ?
Bad reasons :
It's cool to have the latest version
Annoy sysadmins
Oh cool, a new toy !
Part 2 : how to upgrade ?
The nightmare of compatibility
The joy of automation
No miracles here !
4. Show of hands
3 / 4
5.0
5.1
5.2
5.3
5.4
5.5
6.0 (just kidding)
6. 5.3 quick recap
Namespaces ()
Late static binding
Closures
Better garbage collection
Goto
Mysqlnd
Performance gain
7. 5.3 – people are not even using it !
37.6% still on PHP 5.2
No :
Symfony 2
Zend Framework 2
Other frameworks that need namespaces
Problematic for developers
8. PHP 5.4/5.5 – what's changed ?
New features
Performance and memory usage
Improved consistency
Some things removed
9. New things – short array syntax (5.4)
$yourItems = array('a', 'b', 'c', 'd');
$yourItems = ['a', 'b', 'c', 'd'];
$yourItems = ['a' => 5, 'b' => 3];
10. New things – function array dereferencing (5.4)
function getCars()
{
return array(
'Mini',
'Smart',
'Volvo',
'BMW'
);
}
$cars = getCars();
echo $cars[1];
function getCars()
{
return [
'Mini',
'Smart',
'Volvo',
'BMW'
];
}
echo getCars()[1];
11. New things – Traits
Reuse methods across classes
Classes have no common parent
12. Traits - example
Log output : abcd
trait Logger
{
public function log($data) {
echo "Log output : " . $data;
}
}
class SomeClass {
use Logger;
}
$someObject = new SomeClass();
$someObject->log('abcd');
13. Traits - example
class SomeClass {
public function log($data) {
echo "Log output : " . $data;
}
}
$someObject = new SomeClass();
$someObject->log('abcd');
14. Traits – careful !
trait Logger {
private $foo;
}
class SomeClass {
private $foo;
use Logger;
}
will throw E_STRICT !
15. New things – Webserver (5.4)
Built-in webserver
Development only !
Handles requests sequentially
Ideal for quick testing
Ideal for unit testing of webservices
16. Webserver – how to
/var/www/php54test/html> php -S localhost:8000
PHP 5.4.15 Development Server started at Sat May 2 00:41:12 2013
Listening on http://localhost:8000
Document root is /var/www/php54test/html
Press Ctrl-C to quit.
/var/www/php54test/html> php -S localhost:8000 -t /var/www/other-path/html
PHP 5.4.15 Development Server started at Sat May 2 00:41:12 2013
Listening on http://localhost:8000
Document root is /var/www/other-path/html
Press Ctrl-C to quit.
/var/www/php54test/html> php -S localhost:8000 bootstrap.php
PHP 5.4.15 Development Server started at Sat May 2 00:41:12 2013
Listening on http://localhost:8000
Document root is /var/www/php54test/html
Press Ctrl-C to quit.
17. New things – SessionHandler (5.4)
New session handling class
Groups all methods for session handling :
close()
destroy()
gc()
open()
read()
write()
18. SessionHandler
class MySessionHandler extends SessionHandler
{
public function read($session_id)
{
// Get the session data
}
public function write($session_id, $session_data)
{
// Set the session data
}
...
}
$handler = new MySessionHandler();
session_set_save_handler($handler, true);
session_start();
19. New things – more session stuff (5.4)
File upload extension
→ file upload registers in session
→ readable through AJAX calls
New function session_status()
Return values : PHP_SESSION_ACTIVE / PHP_SESSION_NONE
20. New things – Generators (5.5)
Simple way of implementing iterators
Simply put : foreach over a function
Say what ?
21. Generators - example
<?php
function returnAsciiTable($start, $end) {
for ($i = $start; $i <= $end; $i++) {
yield $i => chr($i);
}
}
foreach (returnAsciiTable(97, 122) as $key => $value) {
echo $key . " - " . $value . "n";
}
Output :
97 - a
98 - b
99 - c
100 - d
101 - e
102 - f
103 - g
104 - h
105 - i
106 - j
107 - k
108 - l
109 - m
110 - n
111 - o
112 - p
113 - q
114 - r
115 - s
116 - t
117 - u
118 - v
119 - w
120 - x
121 - y
122 - z
24. Password hashing (5.5)
To create :
$hash = password_hash($password, PASSWORD_DEFAULT);
To verify :
password_verify($password, $hash);
Currently only supports Blowfish
Also has password_needs_rehash() → check if hash was strong enough
25. Zend Optimizer+ (5.5)
Name in PHP 5.5 : OPcache
Opcode cache (like APC, Xcache, ...)
APC users : no userland (variable) caching in OPcache
→ Use APCu
26. What else is new ?
Binary notation
Decimal : 123
Octal : 0173
Hex : 0x7B
Binary : 0b1111011
Class member access on object instantiation
$fooObj = new Foo();
echo $fooObj->bar();
echo (new Foo)->bar();
New reserved keywords : (5.4)
trait
insteadof
Callable
27. Other changes
Error handling :
5.3 : Parse error: syntax error, unexpected T_STRING, expecting '{' in index.php on line 1
5.4 : Parse error: syntax error, unexpected 'bar' (T_STRING), expecting '{' in index.php on line 1
Array to string conversion :
5.3 : Array
5.4 : Note: Array to string conversion in test.php on line 8
<?= always works (even with short_tags off)
Default charset = UTF8 (be careful !)
class foo bar
$var = array();
echo $var;
28. Time to remove !
register_globals (5.4)
magic_quotes (5.4)
safe_mode (5.4)
Removed (5.4) : Still working :
break $var; break 2;
continue $var; continue 3;
session_register() php_logo_guid()
session_unregister() php_egg_logo_guid()
session_is_registered() php_real_logo_guid()
→ use $_SESSION zend_logo_guid()
(5.4) (5.5)
29. More stuff removed
Timezone guessing → date.timezone in php.ini (5.4)
sqlite extension → use sqlite3 (5.4)
Windows XP and 2003 support (5.5)
30. Performance and memory usage
Performance : 10 – 30%
How ?
Core optimizations
New internal caches (functions, constants, …)
Better (un)serialization
Inlining often-used code paths
…
Reduced memory usage : up to 50% !
Big impact on large frameworks
Even bigger impact on codebases such as Drupal
32. Upgrade : yes / no
Yes No
Using removed extensions x
Using removed functions x
Need extra performance / reduced memory x
Really need new feature x
Want to use recent framework x
No unit tests x
No package available (.rpm, .deb, ...) x
33. Postponing upgrades
End-Of-Life
In the past : we'll see
Now : minor release + 2 = out → EOL
5.5 = OUT → 5.3 = EOL
5.6 = OUT → 5.4 = EOL (next year !)
Critical security patches : 1 year
No bugfixes
Framework support
Developer motivation
34. So you want to upgrade...
Option 1 : run your unit tests
Option 2 : visit each page (good luck !) + check error_log
Or : record visits, then replay log on test environment
Option 3 : automated static analysis
35. Back in 2010...
PHP Architect @ Belgian Railways
8 years of legacy code
40+ different developers
40+ projects
Challenge :
migrate all projects from
PHP 5.1.x (on Solaris)
to
PHP 5.3.x (on Linux)
39. PHPCompatibility
New PHP_CodeSniffer standard
Only purpose : find compatibility issues
Detects :
Deprecated functions
Deprecated extensions
Deprecated php.ini settings and ini_set() calls
Prohibited function names, class names, …
…
Works for PHP 5.0, 5.1, 5.2, 5.3, 5.4 and 5.5
40. PHPCompatibility – making it work
Via GIT :
git clone git://github.com/wimg/PHPCompatibility.git PHPCompatibility
Download from Github :
http://github.com/wimg/PHPCompatibility
Install in <pear_dir>/PHP/CodeSniffer/Standards
Run :
phpcs --standard=PHPCompatibility <path>
42. Important notes
Large directories → can be slow !
Use --extensions=php,phtml
No point scanning .js files
Static analysis
Doesn't run code
Can not detect every single incompatibility
Provides filename and line number
44. Some common apps – phpBB (latest)
FILE: /usr/src/phpBB3/adm/index.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 2 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
48 | WARNING | INI directive 'safe_mode' is deprecated in PHP 5.3 and forbidden in PHP 5.4.
48 | WARNING | INI directive 'safe_mode' is deprecated in PHP 5.3 and forbidden in PHP 5.4.
--------------------------------------------------------------------------------
45. Common apps - MediaWiki
FILE: /usr/src/mediawiki-1.19.8/includes/GlobalFunctions.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
2705 | WARNING | The use of function dl is discouraged in PHP version 5.3 and
| | discouraged in PHP version 5.4 and discouraged in PHP version
| | 5.5
--------------------------------------------------------------------------------
46. Common apps – Wordpress (latest)
FILE: /usr/src/wordpress/wp-admin/includes/class-pclzip.php
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
5340 | ERROR | The use of function set_magic_quotes_runtime is discouraged in
| | PHP version 5.3 and forbidden in PHP version 5.4 and forbidden
| | in PHP version 5.5
5371 | ERROR | The use of function set_magic_quotes_runtime is discouraged in
| | PHP version 5.3 and forbidden in PHP version 5.4 and forbidden
| | in PHP version 5.5
--------------------------------------------------------------------------------
FILE: /usr/src/wordpress/wp-includes/SimplePie/Item.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
125 | WARNING | INI directive 'zend.ze1_compatibility_mode' is deprecated in
| | PHP 5.3 and forbidden in PHP 5.4.
--------------------------------------------------------------------------------
FILE: /usr/src/wordpress/wp-includes/wp-db.php
--------------------------------------------------------------------------------
FOUND 16 ERROR(S) AFFECTING 16 LINE(S)
--------------------------------------------------------------------------------
641 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 - use mysqli
| | instead.
646 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 - use mysqli
| | instead.
47. Conclusion
No 100% detection
But : 95% automation = lots of time saved !
First : PHPCompatibility on local machine
Then : upgrade CI/test environment and run unit tests
Start upgrading !
part 2 look at difficulties you might encounter in upgrading. I'll provide solutions not a magician can't solve everything ;-)
5.3.3 = Debian Squeezy = 12% Wait a second... that means people aren't even on 5.3 ? And there was 3 year gap between the release of 5.2 and 5.3, so 5.3 brought a lot of cool things.