SlideShare una empresa de Scribd logo
1 de 29
PHP-FIG: PAST, PRESENT AND FUTURE
@PHILSTURGEON #PHPJOBURG14
HUMBLE BEGINNINGS
BACK IN ANCIENT 2009
http://healthland.time.com/2012/04/27/humility-a-quiet-underappreciated-strength/
PSR-0
AUTOLOADING STUFF
Not many people cared…
… including me
PSR-0
AUTOLOADING STUFF
vendor/PEAR/Mail/SMTP.php
vendor/Symfony/Core/Request.php
vendor/Zend/Mail/Message.php
PSR-0
AUTOLOADING STUFF
<?php namespace TestPackageFooBar;
class Baz {}
$instance = new
PackageFooBarBaz();
$instance = new
PackageFoo_Bar_Baz();
github.com/philsturgeon/psr0-naming-oddity
NOT SO HUMBLE BITS
GRUMBLE GRUMBLE
wiki.php.net/rfc/splclassloader
fig.php.net
26 for, 21 against =
nope
PSR-1 & 2
A.K.A TABS V SPACES
MY INVOLVEMENT
BRITISH INVASION
PSR-3
LOGGING SOUNDS EASY, BUT…
github.com/Seldaek/monolog
$log = new Logger('name');
$log->pushHandler(new
StreamHandler('path/to/your.log',
Logger::WARNING));
// add records to the log
$log->addWarning('Foo');
$log->addError('Bar');
PSR-3
LOGGING SOUNDS EASY, BUT…
StreamHandler
RotatingFileHandler
SyslogHandler
ErrorLogHandler
NativeMailerHandler
SwiftMailerHandler
PushoverHandler
HipChatHandler
FlowdockHandler
SocketHandler
AmqpHandler
GelfHandler
CubeHandler
RavenHandler
ZendMonitorHandler
NewRelicHandler
LogglyHandler
RollbarHandler
SyslogUdpHandler
LogEntriesHandler
FirePHPHandler
ChromePHPHandler
BrowserConsoleHandler
RedisHandler
MongoDBHandler
CouchDBHandler
DoctrineCouchDBHandler
ElasticSearchHandler
DynamoDbHandler
STYLE OR LOGGING?
SO WHICH IS IT:
SOUNDS LIKE PEP
PYTHON DID IT!
legacy.python.org/dev/peps/
P 4 Deprecation of Standard Modules
P 7 Style Guide for C Code
P 8 Style Guide for Python
Code
P 12 Sample reStructured Text PEP Template
SF 234
Iterators
SF 378 Format Specifier for Thousands
Separator
SOUNDS LIKE PEP
PYTHON DID IT!
ZEN OF PYTHON
LITERALLY ANYTHING
http://legacy.python.org/dev/peps/pep-0020/
Beautiful is better than
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
PSR-4
NEW AND SHINY? OR SATAN!!!
vendor/pear/mail/src/PEAR/Mail/SMTP.php
vendor/symfony/framework/src/Symfony/Core/
Request.php
vendor/zend/mail/src/Zend/Mail/Message.php
PSR-4
NEW AND SHINY? OR SATAN!!!
vendor/pear/mail/src/SMTP.php
vendor/symfony/framework/src/Core/Request.php
vendor/zend/mail/src/Message.php
PSR-0
vendor/hpatoio/bitly-api/src/Bitly/Api/BitlyClient.php
new BitlyApiBitlyClient();
PSR-4
vendor/hpatoio/bitly-api/src/BitlyClient.php
new BitlyApiBitlyClient();
PSR-4 (Better)
vendor/hpatoio/bitly/src/Client.php
new HpatoioBitlyClient();
PSR-5
DOCBLOCKS ARE FUN
WORKFLOW BYLAW
GETTING THINGS ON TRACK
PSR-6
blog.tedivm.com/stash
CACHE ALL THE THINGS!
GETTING THINGS ON TRACK
PSR-7
HTTP ADAPTERS ARE NOT FUN
BuzzHttpAdapter
CurlHttpAdapter
GuzzleHttpAdapter
SocketHttpAdapter
ZendHttpAdapter
geocoder-php.org
PSR-8
http://en.wikipedia.org/wiki/Free_Hugs_Campaign
pyrocms.com

Más contenido relacionado

La actualidad más candente

Unix And C
Unix And CUnix And C
Unix And CDr.Ravi
 
TDOH 南區 WorkShop 2016 Reversing on Windows
TDOH 南區 WorkShop 2016 Reversing on WindowsTDOH 南區 WorkShop 2016 Reversing on Windows
TDOH 南區 WorkShop 2016 Reversing on WindowsSheng-Hao Ma
 
Exploit techniques - a quick review
Exploit techniques - a quick reviewExploit techniques - a quick review
Exploit techniques - a quick reviewCe.Se.N.A. Security
 
Life without CPAN
Life without CPANLife without CPAN
Life without CPANBob Ernst
 
Talk Unix Shell Script 1
Talk Unix Shell Script 1Talk Unix Shell Script 1
Talk Unix Shell Script 1Dr.Ravi
 
Airlover 20030324 1
Airlover 20030324 1Airlover 20030324 1
Airlover 20030324 1Dr.Ravi
 
Talk Unix Shell Script
Talk Unix Shell ScriptTalk Unix Shell Script
Talk Unix Shell ScriptDr.Ravi
 
ch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystemch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystemyushiang fu
 
Parsing Expression Grammars and Treetop
Parsing Expression Grammars and TreetopParsing Expression Grammars and Treetop
Parsing Expression Grammars and TreetopJuan Lulkin
 
What's Inside the Box from PAPIs.io 2018
What's Inside the Box from PAPIs.io 2018What's Inside the Box from PAPIs.io 2018
What's Inside the Box from PAPIs.io 2018Ray Deck
 
Quick tour of PHP from inside
Quick tour of PHP from insideQuick tour of PHP from inside
Quick tour of PHP from insidejulien pauli
 
Pari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-ReferenssejäPari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-ReferenssejäTuomas Hietanen
 
Unix Basics
Unix BasicsUnix Basics
Unix BasicsDr.Ravi
 
Profiling php5 to php7
Profiling php5 to php7Profiling php5 to php7
Profiling php5 to php7julien pauli
 

La actualidad más candente (17)

Unix And C
Unix And CUnix And C
Unix And C
 
TDOH 南區 WorkShop 2016 Reversing on Windows
TDOH 南區 WorkShop 2016 Reversing on WindowsTDOH 南區 WorkShop 2016 Reversing on Windows
TDOH 南區 WorkShop 2016 Reversing on Windows
 
Bash is Testing
Bash is TestingBash is Testing
Bash is Testing
 
Mona cheatsheet
Mona cheatsheetMona cheatsheet
Mona cheatsheet
 
Exploit techniques - a quick review
Exploit techniques - a quick reviewExploit techniques - a quick review
Exploit techniques - a quick review
 
Life without CPAN
Life without CPANLife without CPAN
Life without CPAN
 
Talk Unix Shell Script 1
Talk Unix Shell Script 1Talk Unix Shell Script 1
Talk Unix Shell Script 1
 
Airlover 20030324 1
Airlover 20030324 1Airlover 20030324 1
Airlover 20030324 1
 
Talk Unix Shell Script
Talk Unix Shell ScriptTalk Unix Shell Script
Talk Unix Shell Script
 
ch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystemch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystem
 
Parsing Expression Grammars and Treetop
Parsing Expression Grammars and TreetopParsing Expression Grammars and Treetop
Parsing Expression Grammars and Treetop
 
What's Inside the Box from PAPIs.io 2018
What's Inside the Box from PAPIs.io 2018What's Inside the Box from PAPIs.io 2018
What's Inside the Box from PAPIs.io 2018
 
Quick tour of PHP from inside
Quick tour of PHP from insideQuick tour of PHP from inside
Quick tour of PHP from inside
 
Pari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-ReferenssejäPari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-Referenssejä
 
Unix Basics
Unix BasicsUnix Basics
Unix Basics
 
Bash production guide
Bash production guideBash production guide
Bash production guide
 
Profiling php5 to php7
Profiling php5 to php7Profiling php5 to php7
Profiling php5 to php7
 

Más de Phil Sturgeon

API Pain Points (PHPNE)
API Pain Points (PHPNE)API Pain Points (PHPNE)
API Pain Points (PHPNE)Phil Sturgeon
 
Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013Phil Sturgeon
 
Laravel and Composer
Laravel and ComposerLaravel and Composer
Laravel and ComposerPhil Sturgeon
 
Why I &lt;3 Laravel 4
Why I &lt;3 Laravel 4Why I &lt;3 Laravel 4
Why I &lt;3 Laravel 4Phil Sturgeon
 
Introduction to Fuel
Introduction to FuelIntroduction to Fuel
Introduction to FuelPhil Sturgeon
 
Running an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter projectRunning an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter projectPhil Sturgeon
 

Más de Phil Sturgeon (10)

API Pain Points (PHPNE)
API Pain Points (PHPNE)API Pain Points (PHPNE)
API Pain Points (PHPNE)
 
Api pain points
Api pain pointsApi pain points
Api pain points
 
Api pain points
Api pain pointsApi pain points
Api pain points
 
Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013
 
Laravel and Composer
Laravel and ComposerLaravel and Composer
Laravel and Composer
 
Why I &lt;3 Laravel 4
Why I &lt;3 Laravel 4Why I &lt;3 Laravel 4
Why I &lt;3 Laravel 4
 
CodeIgniter 3.0
CodeIgniter 3.0CodeIgniter 3.0
CodeIgniter 3.0
 
Cms expo
Cms expoCms expo
Cms expo
 
Introduction to Fuel
Introduction to FuelIntroduction to Fuel
Introduction to Fuel
 
Running an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter projectRunning an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter project
 

Último

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

PHP-FIG: Past, Present and Future