SlideShare a Scribd company logo
PHP 2013
Raúl Fraile
thegreenbees.es nitsnets.com
proweb.ua.es servergrove.es
sharedsecrets.com cloid.net
Antes de empezar...
PHP 2013
Próxima reunión:
Lunes 17 de Junio
Pablo Godel
Despliegue de aplicaciones PHP
Fundador de ServerGrove
Creador de la mailing-list de PHP en español
Viviendo en USA desde 1999
PHP 5.3+
1.0 08-06-1995
2.0 01-11-1997
3.0 06-06-1998
4.0 22-05-2000
5.0 13-07-2004
5.1 24-11-2005
5.2 02-11-2006
5.3 30-06-2009
5.4 01-03-2012
5.5 RC1 09-05-2013
Futuras versiones: releases
más frecuentes
PHP 5.3: Namespaces,
closures, PHAR...
<?php
 
namespace LadybugTheme;
 
use LadybugFormatFormatInterface;
use LadybugContainer;
 
abstract class BaseTheme implements ThemeInterface
{
 
/** @var Container $container */
protected $container;
 
protected $formats;
 
public function __construct(Container $container)
{
$this->container = $container;
}
}
<?php
 
$values = range(1, 30);
 
$evenNumbers = array_filter($values, function($number)
{
return ($number % 2) == 0;
});
PHP 5.4:Traits, sintaxis corta
para arrays, servidor web...
<?php
 
trait Loggable {
public function log() {
// my log function
}
}
 
class Car {
use Loggable;
}
 
$car = new Car();
$car->log();
Composer
Gestor de dependencias para PHP
{
"require": {
"doctrine/orm": "2.2.3"
}
}
{
"require": {
"doctrine/orm": "2.2.*"
}
}
{
"require": {
"doctrine/orm": ">=2.2.3"
}
}
{
"require": {
"doctrine/orm": ">=2.2.3"
},
"require-dev": {
"mockery/mockery": "0.8.0"
}
}
composer.jsonVS composer.lock
packagist.org
security.sensiolabs.org
Estándares
Framework Interop Group
www.php-fig.org
PSR-0:Autoloading
Se lanza cuando se intenta
utilizar una clase o
interface no definido
previamente
Traductor
namespace -> archivo
∖Doctrine∖DBAL∖Driver [lib_path]/Doctrine/DBAL/Driver.php
bool spl_autoload_register(
[callable $autoload_function,
[bool $throw = true,
[bool $prepend = false]]]
)
PSR-1/2: Coding Standard
Importante: elegir un CS
y ser consistente
Proyectos open source:
compartir mismo CS
fabpot / PHP-CS-Fixer
PSR-3: Logger Interface
namespace PsrLog;
interface LoggerInterface
{
/**
* System is unusable.
*/
public function emergency($message, array $context = array());
 
/**
* Action must be taken immediately.
*/
public function alert($message, array $context = array());
 
/**
* Critical conditions.
*/
public function critical($message, array $context = array());
 
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*/
public function error($message, array $context = array());
 
/**
* Exceptional occurrences that are not errors.
*/
public function warning($message, array $context = array());
 
...
Symfony
Más que un framework
Componentes independientes
y desacoplados
BrowserKit
ClassLoader
Config
Console
CssSelector
DependencyInjection
DomCrawler
EventDispatcher
Finder
Form
HttpFoundation
HttpKernel
Locale
Process
Routing
Security
Serializer
Templating
Translation
Validator
Yaml
StopWatch
PropertyAccessOptionsResolver
PHP 2013
Comunidad
Conferencias
Buena oportunidad para
aprender y hacer contactos
desymfony.com
GitHub
Tu verdadero CV
raulfraile/Ladybug
symfony2cheatsheet.com
Less talk, more code
¿Preguntas?

More Related Content

PDF
Website Hacking Oldie
PPTX
The list server
PDF
MidwestPHP Symfony2 Internals
PDF
How GZIP works... in 10 minutes
PDF
Refactoring PHP/Symfony2 apps
PDF
Symfony internals [english]
PDF
$kernel->infect(): Creating a cryptovirus for Symfony2 apps
PDF
How GZIP compression works - JS Conf EU 2014
Website Hacking Oldie
The list server
MidwestPHP Symfony2 Internals
How GZIP works... in 10 minutes
Refactoring PHP/Symfony2 apps
Symfony internals [english]
$kernel->infect(): Creating a cryptovirus for Symfony2 apps
How GZIP compression works - JS Conf EU 2014

Similar to PHP 2013 (20)

PDF
Modern PHP
PDF
関西PHP勉強会 php5.4つまみぐい
PDF
Key features PHP 5.3 - 5.6
PDF
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PDF
Php 7 evolution
PDF
PHP 5.4 - Begin your love affair with traits
PDF
PHP. Trends, implementations, frameworks and solutions
ODP
PHP5.5 is Here
PDF
Starting Out With PHP
PDF
How composer saved PHP
PDF
Symfony 2.0 on PHP 5.3
ODP
PDF
Unknown features of PHP
PDF
PHP 5.3 in practice
PDF
Preparing for the next PHP version (5.6)
PPT
ZendCon 08 php 5.3
ODP
The why and how of moving to php 5.4
PDF
Introduction into PHP5 (Jeroen van Sluijs)
PPT
Hacking with hhvm
PDF
Manual oficial de php5
Modern PHP
関西PHP勉強会 php5.4つまみぐい
Key features PHP 5.3 - 5.6
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
Php 7 evolution
PHP 5.4 - Begin your love affair with traits
PHP. Trends, implementations, frameworks and solutions
PHP5.5 is Here
Starting Out With PHP
How composer saved PHP
Symfony 2.0 on PHP 5.3
Unknown features of PHP
PHP 5.3 in practice
Preparing for the next PHP version (5.6)
ZendCon 08 php 5.3
The why and how of moving to php 5.4
Introduction into PHP5 (Jeroen van Sluijs)
Hacking with hhvm
Manual oficial de php5
Ad

Recently uploaded (20)

PDF
Architecture types and enterprise applications.pdf
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
STKI Israel Market Study 2025 version august
PPTX
Tartificialntelligence_presentation.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Hybrid model detection and classification of lung cancer
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
Architecture types and enterprise applications.pdf
A contest of sentiment analysis: k-nearest neighbor versus neural network
NewMind AI Weekly Chronicles - August'25-Week II
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Hindi spoken digit analysis for native and non-native speakers
Group 1 Presentation -Planning and Decision Making .pptx
STKI Israel Market Study 2025 version august
Tartificialntelligence_presentation.pptx
Zenith AI: Advanced Artificial Intelligence
A novel scalable deep ensemble learning framework for big data classification...
Getting started with AI Agents and Multi-Agent Systems
Hybrid model detection and classification of lung cancer
WOOl fibre morphology and structure.pdf for textiles
Web App vs Mobile App What Should You Build First.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
1 - Historical Antecedents, Social Consideration.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
A comparative study of natural language inference in Swahili using monolingua...
1. Introduction to Computer Programming.pptx
Programs and apps: productivity, graphics, security and other tools
Ad

PHP 2013