SlideShare a Scribd company logo
1 of 64
Download to read offline
The Why and How of moving to PHP 7.x
Join the chat
http://www.midwestphp.org/chat
Channel #everyday-php
Who am I ?
Wim Godden (@wimgtr)
Where I'm from
Where I'm from
Where I'm from
Where I'm from
Where I'm from
Where I'm from
My town
My town
Belgium – the traffic
Who am I ?
Wim Godden (@wimgtr)
Founder of Cu.be Solutions (http://cu.be)
Open Source developer since 1997
Developer of PHPCompatibility, OpenX, ...
Speaker at Open Source conferences
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 !
Show of hands
3 / 4
5.0
5.1
5.2
5.3
5.4
5.5
5.6
6.0
7.0
7.1
7.2
7.3
7.4
8.0
The numbers
W3Techs (http://w3techs.com/technologies/details/pl-php/all/all)
Now Oct 2018 Jan 2015
PHP 4 : 0.4% 0.8% 1.8%
PHP 5 : 50.0% 87.2% 98.2%
5.0 : < 0.1% < 0.1% 0.1%
5.1 : 0.3% 0.5% 1.2%
5.2 : 6.1% 7.8% 19.2%
5.3 : 14.8% 19.7% 45.5%
5.4 : 17.7% 21.2% 26.9%
5.5 : 10.0% 15.4% 6.3%
5.6 : 51.0% 35.3% 0.5%
PHP 7 : 49.6% 12.0%
7.0 : 19.4% 66.8%
7.1 : 17.8% 31.2%
7.2 : 35.3% 2.1%
7.3 : 24.8%
7.4 : 2.7%
5.3 – 5.6 quick recap
Namespaces ()
Late static binding
Closures
Better garbage collection
Goto
Mysqlnd
Performance gain
Short array syntax
Traits
Built-in webserver
Binary notation
No more register_globals, magic_quotes_gpc and safe_mode
Generators (yield keyword)
password_hash() function
Built-in opcache
PHP 7.x – what's changed ?
New features
Performance and memory usage
Improved consistency
Lots of things removed or deprecated
New things – Scalar type + return type declarations (7.0)
New scalar types : int, float, bool and string
Return type can be specified as well
(and can be scalar type as well)
Weak and strong typing
Weak :
Default
Parameters will be coerced (PHP 5 style)
Strong/strict :
At top of file :
Strict typing is file-specific, so must be enabled in each file !
If wrong type is given, a TypeError is thrown :
Fatal error: Uncaught TypeError: Return value of testFunction() must be
of the type integer, string returned
Returning null is also invalid → if you want an int, you will get an int or an error
Null coalescing operator (??)
PHP 5 :
PHP 7 :
Can be chained :
Spaceship operator (<=>)
Compares expressions
Returns -1, 0 or 1
Examples :
Unicode codepoint escape syntax
Converts hexadecimal Unicode codepoint to UTF8 double quoted string
will output :
CSPRNG functions
Cross platform functions to generate random data
Cryptographically secure
2 functions :
random_bytes($length)
random_int($min, $max)
Deprecated in PHP 7.0
PHP 4 style constructors
Static calls to non-static methods
Error handling in PHP 7
Most fatal errors in PHP 5 → Exceptions in PHP 7
New class : Error
If your PHP 5 code has a class called Error, you will need to rename it
All Error and Exception classes now implement Throwable
Error Flow :
Error is thrown
Bubbles up through called functions/methods
At first matching catch block, code is run
No matching catch → default exception handler
No default exception handler → Fatal error
Error
ArithmeticError
DivisionByZeroError
AssertionError
ParseError
TypeError
ArgumentCountError
Exception
ClosedGeneratorException
DOMException
ErrorException
IntlException
LogicException
BadFunctionCallException
BadMethodCallException
DomainException
InvalidArgumentException
LengthException
OutOfRangeException
PharException
ReflectionException
RuntimeException
OutOfBoundsException
OverflowException
PDOException
RangeException
UnderflowException
UnexpectedValueException
SodiumException
Variable handling
PHP 7 uses abstract syntax tree (AST)
Can be detected automatically in some cases
Requires manual fixing and testing
Removed extensions
ereg
mssql
mysql
sybase_ct
mcrypt (PHP 7.1)
Other changes (1/2)
Invalid octals now throw a ParseError
PHP Parse error: Invalid numeric literal in octal.php
Negative bitshifts throw an ArithmeticError
Fatal error: Uncaught ArithmeticError: Bit shift by negative number
Division by zero throws DivisionByZeroError
Hexadecimal strings are no longer numeric
In PHP 5 : bool(true)
In PHP 7 : bool(false)
Other changes (2/2)
New reserved keywords : bool, float, int, null, string, true, false
Reserved for future use : mixed, number, object, resource, void (7.1), iterable (7.1)
However, keyword usage inside classes is less restrictive. This is now allowed :
Performance and memory usage from 5.6 to 7.0
Performance : 200 – 300% increase
How ?
Core optimizations
More direct approach
Fewer memory allocations
Smaller data structures across all data types
…
Reduced memory usage : up to 50% !
Big impact on large frameworks
Even bigger impact on codebases such as Wordpress, Drupal, ...
PHP 7.0 → 7.1 (1/2)
Nullable types
Exception on passing too few function arguments
Fatal error: Uncaught ArgumentCountError: Too few arguments to
function test(), 0 passed in %s on line %d and exactly 1
expected in %s:%d
PHP 7.0 → 7.1 (2/2)
DateTime constructor now uses microseconds
SSLv2 stream support has been dropped
PHP 7.1 → 7.2
object type is available call parameter type and return type of any objects
Sodium extension added : modern cryptographic library
TLS version used is now 1.0, 1.1 or 1.2 (instead of 1.0 only)
create_function() is deprecated
__autoload() is deprecated
each() is deprecated
PHP 7.2 → 7.3 (1/2)
Flexible heredoc and nowdoc
Trailing commas are allowed in function calls
PHP 7.2 → 7.3 (2/2)
array_key_first() and array_key_last()
Argon2 hashing algorithm
continue in switch statement generates a warning
Mysqli and PDO_Mysql now return fractional seconds for datetime, time and
timestamp (!)
Constants can no longer be defined as case-insensitive
is_countable()
PHP 7.3 → 7.4 (1/2)
Typed properties
→ Will be checked on read/write
Null Coalesce Assignment operator :
FFI (Foreign Function Interface) :
Allows PHP to talk directly to C libraries
Experimental
Preloading
Like Opcache on steroids
Will preload all files and opcache them
Requires restart of web server / PHP-FPM to reload any changed files
PHP 7.3 → 7.4 (2/2)
Operator precedence deprecation :
In PHP 7.4 :
Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will
change in PHP 8: '+'/'-' will take a higher precedence in test.php on line 4
Deprecated curly brace syntax for accessing array elements :
Output : 3 !!!
So...
Should you upgrade today ?
Postponing upgrades - End-Of-Life
In the past : we'll see
Now : 2 years after initial release
Critical security patches : 1 extra year (but no regular bugfixes)
In practice
7.1 was released Dec 2016 → already EOL (Nov 30 2019)
7.2 was released Nov 2017 → already EOL (Nov 2019)
7.3 was released Dec 2018 → EOL Dec 2020
7.4 was released Nov 28 → EOL Nov 2021
If you’re on PHP 7.0 - 7.2 → start upgrading !
Postponing upgrades
Security
Performance
Framework support
Symfony 5 : PHP 7.2.5+
Zend Framework 3 : PHP 5.6+
Laravel 6 : PHP 7.2+
Developer motivation
Upgrade paths
1 upgrade every 5 years
Knowledge of upgrade steps will be forgotten
Documentation is not very useful (for example : SysvInit → Systemd)
Massive task to upgrade all apps, all environments, all servers
Upgrade every release
Upgrade steps can be automated
Can be integrated with continuous integration and continuous deployment
Documentation is in the automation flow
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
Or : proxy requests to 2 environments
Option 3 : automated static analysis
Back in 2010...
PHP Architect @ Belgian Railways
8 years of legacy code (4.x and 5.x)
40+ different developers
40+ projects
Challenge :
migrate all projects from
PHP 5.1.x (on Solaris)
to
PHP 5.3.x (on Linux)
The idea
Automate it
How ? → Use the CI environment
Which tool ? → PHP_CodeSniffer
PHP_CodeSniffer
Originally PEAR package (pear install PHP_CodeSniffer)
Also on Composer now
Detects coding standard violations
Supports multiple standards
Static analysis tool
→ Runs without executing code
→ Splits code in tokens
Ex. : T_OPEN_CURLY_BRACKET
T_FALSE
T_SEMICOLON
→ Parses each file separately
PHP_CodeSniffer
Let's see what it looks like
PHP_CodeSniffer options
-i Show available standards
-p Show progress
-s Show real error/warning sniff names
-n Ignore warnings
-v Verbose
--parallel=x (since PHP_CodeSniffer 3)
PHPCompatibility
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.3 and above (5.4 for PHP_CodeSniffer 3 support)
PHPCompatibility – making it work - Composer
In require-dev : phpcompatibility/php-compatibility
If PHPCompatibility is the only PHP CodeSniffer standard :
"scripts": {
"post-install-cmd": ""vendor/bin/phpcs" --config-set installed_paths vendor/wimg/php-compatibility/PHPCompatibility",
"post-update-cmd" : ""vendor/bin/phpcs" --config-set installed_paths vendor/wimg/php-compatibility/PHPCompatibility"
}
Otherwise use one of these :
DealerDirect/phpcodesniffer-composer-installer
higidi/composer-phpcodesniffer-standards-plugin
PHPCompatibility – making it work - Github
Download PHP CodeSniffer
Download from http://github.com/phpcompatibility/PHPCompatibility
Run phpcs --config-set installed_paths /path/to/PHPCompatibility
PHPCompatibility – making it work – testing and running
Check if coding standard is available :
phpcs -i
Should output something similar to :
The installed coding standards are MySource, PEAR,
PHPCompatibility, PHPCS, PSR1, PSR2, Squiz and Zend
To run :
phpcs --standard=PHPCompatibility /path/of/your/code
Important notes
Large directories → can be slow !
Use --extensions=php
No point scanning .js files
Test PHP x.x compatibility → needs PHP x.x on the system
Static analysis
Doesn't actually run the code
Can not detect every single incompatibility → some things only happen on runtime
Provides filename and line number
Checking for specific versions
Default : latest PHP version
Check for single version :
phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0 srcdir
Check for multiple specific versions :
phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0-7.1 srcdir
Check for minimum version :
phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0- srcdir
Checking for older version :
phpcs --standard=PHPCompatibility --runtime-set testVersion 5.0 srcdir
Extra rulesets
Other tools
For Wordpress : PHP Compatibility Checker (uses PHPCompatibility)
Other tools
For Wordpress : PHP Compatibility Checker (uses PHPCompatibility)
PhpStorm 10+ : PHP 7 Compatibility Inspection
sstalle/php7cc : similar functionality, slightly less up-to-date
phan/phan : general static analyzer, compatibility checks are mostly useful for type
checking
adamculp/php-compatibility-check : docker image that uses PHPCompatibility,
php7cc and phan
Conclusion
No 100% detection
But : 95% automation = lots of time saved !
First : PHPCompatibility on local machine
Then : use your CI environment
Start upgrading !
Big thanks to...
Juliette Reinders Folmer
Has been the main contributor (95%+ of all commits) in last 3 years
PHP_CodeSniffer wizard
Questions ?
Questions ?
Thanks !

More Related Content

What's hot

Static Code Analysis and Cppcheck
Static Code Analysis and CppcheckStatic Code Analysis and Cppcheck
Static Code Analysis and CppcheckZachary Blair
 
Learn python – for beginners
Learn python – for beginnersLearn python – for beginners
Learn python – for beginnersRajKumar Rampelli
 
Boo Manifesto
Boo ManifestoBoo Manifesto
Boo Manifestohu hans
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingShyam Sunder Verma
 
What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.Mark Rees
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_netNico Ludwig
 
Packer Genetics: The selfish code
Packer Genetics: The selfish codePacker Genetics: The selfish code
Packer Genetics: The selfish codejduart
 
Python Testing Fundamentals
Python Testing FundamentalsPython Testing Fundamentals
Python Testing Fundamentalscbcunc
 
ShaREing Is Caring
ShaREing Is CaringShaREing Is Caring
ShaREing Is Caringsporst
 
Static analysis for perl
Static analysis for perlStatic analysis for perl
Static analysis for perlmoznion
 
JDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit TestsJDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit TestsPROIDEA
 
Php5 vs php7
Php5 vs php7Php5 vs php7
Php5 vs php7gentlex2
 
Quality assurance of large c++ projects
Quality assurance of large c++ projectsQuality assurance of large c++ projects
Quality assurance of large c++ projectscorehard_by
 
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' RequestChecking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' RequestPVS-Studio
 
Communication between Java and Python
Communication between Java and PythonCommunication between Java and Python
Communication between Java and PythonAndreas Schreiber
 

What's hot (20)

Static Code Analysis and Cppcheck
Static Code Analysis and CppcheckStatic Code Analysis and Cppcheck
Static Code Analysis and Cppcheck
 
Doing the Impossible
Doing the ImpossibleDoing the Impossible
Doing the Impossible
 
Learn python – for beginners
Learn python – for beginnersLearn python – for beginners
Learn python – for beginners
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
 
Boo Manifesto
Boo ManifestoBoo Manifesto
Boo Manifesto
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
 
Perl Modules
Perl ModulesPerl Modules
Perl Modules
 
What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
 
Packer Genetics: The selfish code
Packer Genetics: The selfish codePacker Genetics: The selfish code
Packer Genetics: The selfish code
 
Python Testing Fundamentals
Python Testing FundamentalsPython Testing Fundamentals
Python Testing Fundamentals
 
ShaREing Is Caring
ShaREing Is CaringShaREing Is Caring
ShaREing Is Caring
 
Static analysis for perl
Static analysis for perlStatic analysis for perl
Static analysis for perl
 
Python basics
Python basicsPython basics
Python basics
 
JDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit TestsJDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
 
Php5 vs php7
Php5 vs php7Php5 vs php7
Php5 vs php7
 
Quality assurance of large c++ projects
Quality assurance of large c++ projectsQuality assurance of large c++ projects
Quality assurance of large c++ projects
 
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' RequestChecking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
 
Communication between Java and Python
Communication between Java and PythonCommunication between Java and Python
Communication between Java and Python
 
Variety of automated tests
Variety of automated testsVariety of automated tests
Variety of automated tests
 

Similar to The why and how of moving to php 7

Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Wim Godden
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7Codemotion
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6Wim Godden
 
The why and how of moving to php 5.4
The why and how of moving to php 5.4The why and how of moving to php 5.4
The why and how of moving to php 5.4Wim Godden
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP codeGabriele Santini
 
How Symfony Changed My Life
How Symfony Changed My LifeHow Symfony Changed My Life
How Symfony Changed My LifeMatthias Noback
 
How Symfony changed my life (#SfPot, Paris, 19th November 2015)
How Symfony changed my life (#SfPot, Paris, 19th November 2015)How Symfony changed my life (#SfPot, Paris, 19th November 2015)
How Symfony changed my life (#SfPot, Paris, 19th November 2015)Matthias Noback
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbaivibrantuser
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016Codemotion
 
Incredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and GeneratorsIncredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and Generatorsdantleech
 
Php 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparisonPhp 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparisonTu Pham
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
PHP 7X New Features
PHP 7X New FeaturesPHP 7X New Features
PHP 7X New FeaturesThanh Tai
 
Last train to php 7
Last train to php 7Last train to php 7
Last train to php 7Damien Seguy
 

Similar to The why and how of moving to php 7 (20)

Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
The why and how of moving to php 5.4
The why and how of moving to php 5.4The why and how of moving to php 5.4
The why and how of moving to php 5.4
 
Php manish
Php manishPhp manish
Php manish
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP code
 
Guidelines php 8 gig
Guidelines php 8 gigGuidelines php 8 gig
Guidelines php 8 gig
 
Listen afup 2010
Listen afup 2010Listen afup 2010
Listen afup 2010
 
Xdebug
XdebugXdebug
Xdebug
 
How Symfony Changed My Life
How Symfony Changed My LifeHow Symfony Changed My Life
How Symfony Changed My Life
 
How Symfony changed my life (#SfPot, Paris, 19th November 2015)
How Symfony changed my life (#SfPot, Paris, 19th November 2015)How Symfony changed my life (#SfPot, Paris, 19th November 2015)
How Symfony changed my life (#SfPot, Paris, 19th November 2015)
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbai
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Incredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and GeneratorsIncredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and Generators
 
Php 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparisonPhp 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparison
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
PHP 7X New Features
PHP 7X New FeaturesPHP 7X New Features
PHP 7X New Features
 
Last train to php 7
Last train to php 7Last train to php 7
Last train to php 7
 

More from Wim Godden

Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
Bringing bright ideas to life
Bringing bright ideas to lifeBringing bright ideas to life
Bringing bright ideas to lifeWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websocketsWim Godden
 
Bringing bright ideas to life
Bringing bright ideas to lifeBringing bright ideas to life
Bringing bright ideas to lifeWim Godden
 
Your app lives on the network - networking for web developers
Your app lives on the network - networking for web developersYour app lives on the network - networking for web developers
Your app lives on the network - networking for web developersWim Godden
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websocketsWim Godden
 
Your app lives on the network - networking for web developers
Your app lives on the network - networking for web developersYour app lives on the network - networking for web developers
Your app lives on the network - networking for web developersWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developersWim Godden
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 

More from Wim Godden (20)

Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Bringing bright ideas to life
Bringing bright ideas to lifeBringing bright ideas to life
Bringing bright ideas to life
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
 
Bringing bright ideas to life
Bringing bright ideas to lifeBringing bright ideas to life
Bringing bright ideas to life
 
Your app lives on the network - networking for web developers
Your app lives on the network - networking for web developersYour app lives on the network - networking for web developers
Your app lives on the network - networking for web developers
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
 
Your app lives on the network - networking for web developers
Your app lives on the network - networking for web developersYour app lives on the network - networking for web developers
Your app lives on the network - networking for web developers
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developers
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

The why and how of moving to php 7

  • 1. The Why and How of moving to PHP 7.x
  • 3. Who am I ? Wim Godden (@wimgtr)
  • 12. Belgium – the traffic
  • 13. Who am I ? Wim Godden (@wimgtr) Founder of Cu.be Solutions (http://cu.be) Open Source developer since 1997 Developer of PHPCompatibility, OpenX, ... Speaker at Open Source conferences
  • 14. 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 !
  • 15. Show of hands 3 / 4 5.0 5.1 5.2 5.3 5.4 5.5 5.6 6.0 7.0 7.1 7.2 7.3 7.4 8.0
  • 16. The numbers W3Techs (http://w3techs.com/technologies/details/pl-php/all/all) Now Oct 2018 Jan 2015 PHP 4 : 0.4% 0.8% 1.8% PHP 5 : 50.0% 87.2% 98.2% 5.0 : < 0.1% < 0.1% 0.1% 5.1 : 0.3% 0.5% 1.2% 5.2 : 6.1% 7.8% 19.2% 5.3 : 14.8% 19.7% 45.5% 5.4 : 17.7% 21.2% 26.9% 5.5 : 10.0% 15.4% 6.3% 5.6 : 51.0% 35.3% 0.5% PHP 7 : 49.6% 12.0% 7.0 : 19.4% 66.8% 7.1 : 17.8% 31.2% 7.2 : 35.3% 2.1% 7.3 : 24.8% 7.4 : 2.7%
  • 17. 5.3 – 5.6 quick recap Namespaces () Late static binding Closures Better garbage collection Goto Mysqlnd Performance gain Short array syntax Traits Built-in webserver Binary notation No more register_globals, magic_quotes_gpc and safe_mode Generators (yield keyword) password_hash() function Built-in opcache
  • 18. PHP 7.x – what's changed ? New features Performance and memory usage Improved consistency Lots of things removed or deprecated
  • 19. New things – Scalar type + return type declarations (7.0) New scalar types : int, float, bool and string Return type can be specified as well (and can be scalar type as well)
  • 20. Weak and strong typing Weak : Default Parameters will be coerced (PHP 5 style) Strong/strict : At top of file : Strict typing is file-specific, so must be enabled in each file ! If wrong type is given, a TypeError is thrown : Fatal error: Uncaught TypeError: Return value of testFunction() must be of the type integer, string returned Returning null is also invalid → if you want an int, you will get an int or an error
  • 21. Null coalescing operator (??) PHP 5 : PHP 7 : Can be chained :
  • 22.
  • 23. Spaceship operator (<=>) Compares expressions Returns -1, 0 or 1 Examples :
  • 24. Unicode codepoint escape syntax Converts hexadecimal Unicode codepoint to UTF8 double quoted string will output :
  • 25. CSPRNG functions Cross platform functions to generate random data Cryptographically secure 2 functions : random_bytes($length) random_int($min, $max)
  • 26. Deprecated in PHP 7.0 PHP 4 style constructors Static calls to non-static methods
  • 27. Error handling in PHP 7 Most fatal errors in PHP 5 → Exceptions in PHP 7 New class : Error If your PHP 5 code has a class called Error, you will need to rename it All Error and Exception classes now implement Throwable Error Flow : Error is thrown Bubbles up through called functions/methods At first matching catch block, code is run No matching catch → default exception handler No default exception handler → Fatal error
  • 29. Variable handling PHP 7 uses abstract syntax tree (AST) Can be detected automatically in some cases Requires manual fixing and testing
  • 31. Other changes (1/2) Invalid octals now throw a ParseError PHP Parse error: Invalid numeric literal in octal.php Negative bitshifts throw an ArithmeticError Fatal error: Uncaught ArithmeticError: Bit shift by negative number Division by zero throws DivisionByZeroError Hexadecimal strings are no longer numeric In PHP 5 : bool(true) In PHP 7 : bool(false)
  • 32. Other changes (2/2) New reserved keywords : bool, float, int, null, string, true, false Reserved for future use : mixed, number, object, resource, void (7.1), iterable (7.1) However, keyword usage inside classes is less restrictive. This is now allowed :
  • 33. Performance and memory usage from 5.6 to 7.0 Performance : 200 – 300% increase How ? Core optimizations More direct approach Fewer memory allocations Smaller data structures across all data types … Reduced memory usage : up to 50% ! Big impact on large frameworks Even bigger impact on codebases such as Wordpress, Drupal, ...
  • 34. PHP 7.0 → 7.1 (1/2) Nullable types Exception on passing too few function arguments Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 0 passed in %s on line %d and exactly 1 expected in %s:%d
  • 35. PHP 7.0 → 7.1 (2/2) DateTime constructor now uses microseconds SSLv2 stream support has been dropped
  • 36. PHP 7.1 → 7.2 object type is available call parameter type and return type of any objects Sodium extension added : modern cryptographic library TLS version used is now 1.0, 1.1 or 1.2 (instead of 1.0 only) create_function() is deprecated __autoload() is deprecated each() is deprecated
  • 37. PHP 7.2 → 7.3 (1/2) Flexible heredoc and nowdoc Trailing commas are allowed in function calls
  • 38. PHP 7.2 → 7.3 (2/2) array_key_first() and array_key_last() Argon2 hashing algorithm continue in switch statement generates a warning Mysqli and PDO_Mysql now return fractional seconds for datetime, time and timestamp (!) Constants can no longer be defined as case-insensitive is_countable()
  • 39. PHP 7.3 → 7.4 (1/2) Typed properties → Will be checked on read/write Null Coalesce Assignment operator : FFI (Foreign Function Interface) : Allows PHP to talk directly to C libraries Experimental Preloading Like Opcache on steroids Will preload all files and opcache them Requires restart of web server / PHP-FPM to reload any changed files
  • 40. PHP 7.3 → 7.4 (2/2) Operator precedence deprecation : In PHP 7.4 : Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in test.php on line 4 Deprecated curly brace syntax for accessing array elements : Output : 3 !!!
  • 42. Postponing upgrades - End-Of-Life In the past : we'll see Now : 2 years after initial release Critical security patches : 1 extra year (but no regular bugfixes) In practice 7.1 was released Dec 2016 → already EOL (Nov 30 2019) 7.2 was released Nov 2017 → already EOL (Nov 2019) 7.3 was released Dec 2018 → EOL Dec 2020 7.4 was released Nov 28 → EOL Nov 2021 If you’re on PHP 7.0 - 7.2 → start upgrading !
  • 43. Postponing upgrades Security Performance Framework support Symfony 5 : PHP 7.2.5+ Zend Framework 3 : PHP 5.6+ Laravel 6 : PHP 7.2+ Developer motivation
  • 44. Upgrade paths 1 upgrade every 5 years Knowledge of upgrade steps will be forgotten Documentation is not very useful (for example : SysvInit → Systemd) Massive task to upgrade all apps, all environments, all servers Upgrade every release Upgrade steps can be automated Can be integrated with continuous integration and continuous deployment Documentation is in the automation flow
  • 45. 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 Or : proxy requests to 2 environments Option 3 : automated static analysis
  • 46. Back in 2010... PHP Architect @ Belgian Railways 8 years of legacy code (4.x and 5.x) 40+ different developers 40+ projects Challenge : migrate all projects from PHP 5.1.x (on Solaris) to PHP 5.3.x (on Linux)
  • 47. The idea Automate it How ? → Use the CI environment Which tool ? → PHP_CodeSniffer
  • 48. PHP_CodeSniffer Originally PEAR package (pear install PHP_CodeSniffer) Also on Composer now Detects coding standard violations Supports multiple standards Static analysis tool → Runs without executing code → Splits code in tokens Ex. : T_OPEN_CURLY_BRACKET T_FALSE T_SEMICOLON → Parses each file separately
  • 50. PHP_CodeSniffer options -i Show available standards -p Show progress -s Show real error/warning sniff names -n Ignore warnings -v Verbose --parallel=x (since PHP_CodeSniffer 3)
  • 51. PHPCompatibility 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.3 and above (5.4 for PHP_CodeSniffer 3 support)
  • 52. PHPCompatibility – making it work - Composer In require-dev : phpcompatibility/php-compatibility If PHPCompatibility is the only PHP CodeSniffer standard : "scripts": { "post-install-cmd": ""vendor/bin/phpcs" --config-set installed_paths vendor/wimg/php-compatibility/PHPCompatibility", "post-update-cmd" : ""vendor/bin/phpcs" --config-set installed_paths vendor/wimg/php-compatibility/PHPCompatibility" } Otherwise use one of these : DealerDirect/phpcodesniffer-composer-installer higidi/composer-phpcodesniffer-standards-plugin
  • 53. PHPCompatibility – making it work - Github Download PHP CodeSniffer Download from http://github.com/phpcompatibility/PHPCompatibility Run phpcs --config-set installed_paths /path/to/PHPCompatibility
  • 54. PHPCompatibility – making it work – testing and running Check if coding standard is available : phpcs -i Should output something similar to : The installed coding standards are MySource, PEAR, PHPCompatibility, PHPCS, PSR1, PSR2, Squiz and Zend To run : phpcs --standard=PHPCompatibility /path/of/your/code
  • 55. Important notes Large directories → can be slow ! Use --extensions=php No point scanning .js files Test PHP x.x compatibility → needs PHP x.x on the system Static analysis Doesn't actually run the code Can not detect every single incompatibility → some things only happen on runtime Provides filename and line number
  • 56. Checking for specific versions Default : latest PHP version Check for single version : phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0 srcdir Check for multiple specific versions : phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0-7.1 srcdir Check for minimum version : phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0- srcdir Checking for older version : phpcs --standard=PHPCompatibility --runtime-set testVersion 5.0 srcdir
  • 58. Other tools For Wordpress : PHP Compatibility Checker (uses PHPCompatibility)
  • 59. Other tools For Wordpress : PHP Compatibility Checker (uses PHPCompatibility) PhpStorm 10+ : PHP 7 Compatibility Inspection sstalle/php7cc : similar functionality, slightly less up-to-date phan/phan : general static analyzer, compatibility checks are mostly useful for type checking adamculp/php-compatibility-check : docker image that uses PHPCompatibility, php7cc and phan
  • 60. Conclusion No 100% detection But : 95% automation = lots of time saved ! First : PHPCompatibility on local machine Then : use your CI environment Start upgrading !
  • 61. Big thanks to... Juliette Reinders Folmer Has been the main contributor (95%+ of all commits) in last 3 years PHP_CodeSniffer wizard