SlideShare a Scribd company logo
What is new in PHP 5.3? Stefan Priebsch, e-novative GmbH
Disclaimer
First Plans for PHP 6 Paris Developer Meeting Derick's Meeting Minutes www.php.net/~derick/meeting-notes.html First Release Candidate late 2006
First Plans for PHP 6 Paris Developer Meeting Derick's Meeting Minutes www.php.net/~derick/meeting-notes.html First Release Candidate late 2007
First Plans for PHP 6 Paris Developer Meeting Derick's Meeting Minutes www.php.net/~derick/meeting-notes.html First Release Candidate ... some day
And PHP 6 ...
... became PHP 5.3 ...
... almost
Unicode
Unicode One Standard to rule them all PHP 6's killer feature One character != one byte
Garbage Collection
Garbage Collection Free memory while script is running gc_enable(); gc_disable();
SPL Improvements
SPL Improvements SplDoublyLinkedList  SPLStack SPLQueue SplPriorityQueue
SPL Stack $stack = new SplStack(); $stack->push('a'); $stack->push('b'); $stack->push('c'); echo $stack->pop(); echo $stack->pop(); echo $stack->pop();
SPL Stack $stack = new SplStack(); $stack->push('a'); $stack->push('b'); $stack->push('c'); echo $stack->pop(); echo $stack->pop(); echo $stack->pop(); -> cba
Magic Static Calls
Magic Calls class Foo {   public  function __call($aName, $aParameters)   {   var_dump($aName);   var_dump($aParameters);   } } $foo = new Foo(); $foo->test('something');
Magic Calls class Foo {   public  function __call($aName, $aParameters)   {   var_dump($aName);   var_dump($aParameters);   } } $foo = new Foo(); $foo->test('something'); -> string(4) "test" array(1) {   [0]=> string(9) "something" }
Magic Calls Strict standards: Non-static method Foo::test() should not be called statically
Magic Static Calls class Foo {   public static function __callStatic($aName, $aParameters)   {   ...   } } Foo::doSomething(...);
Late Static Binding
Late Static Binding class Foo {   protected static $foo = 'Test';   public static function getFoo()   {   return self::$foo;   } } var_dump(Foo::getFoo());
Late Static Binding class Foo {   protected static $foo = 'Test';   public static function getFoo()   {   return self::$foo;   } } var_dump(Foo::getFoo()); -> Test
Late Static Binding class Foo {   protected static $foo = 'Test';   public static function getFoo()   {   return self::$foo;   } } class MyFoo extends Foo {   protected static $foo = 'MyTest'; } var_dump(Foo::getFoo()); var_dump(MyFoo::getFoo());
Late Static Binding class Foo {   protected static $foo = 'Test';   public static function getFoo()   {   return self::$foo;   } } class MyFoo extends Foo {   protected static $foo = 'MyTest'; } var_dump(Foo::getFoo()); var_dump(MyFoo::getFoo()); -> string(4) "Test" string(4) "Test"
Late Static Binding class Foo {   protected static $foo = 'Test';   public static function getFoo()   {   return static::$foo;   } } class MyFoo extends Foo {   protected static $foo = 'MyTest'; } var_dump(Foo::getFoo()); var_dump(MyFoo::getFoo());
Late Static Binding class Foo {   protected static $foo = 'Test';   public static function getFoo()   {   return static::$foo;   } } class MyFoo extends Foo {   protected static $foo = 'MyTest'; } var_dump(Foo::getFoo()); var_dump(MyFoo::getFoo()); -> string(4) "Test" string(6) "MyTest"
Namespaces
class File {   ... } Namespaces
class File {   ... } // somewhere else class File {   ... } Namespaces
class my_Web_Framework_Foo_Bar_Baz {   ... } Namespaces
namespace my::Web::Framework::Foo::Bar; class Baz {   ... } Namespaces
  namespace my::Web::Framework::Foo::Bar;  class Baz  {   ...  }   // somewhere else:   $baz = new my::Web::Framework::Foo::Bar::Baz(); Namespaces
use my::Web::Framework::Foo::Bar::Baz as MyBaz; $baz = new myBaz(); Namespaces
namespace crypt; function gnupg_decrypt($aText, $aKeyFile) {   return 'some plaintext'; } Namespaces
namespace crypt; function gnupg_decrypt($aText, $aKeyFile) {   return 'some plaintext'; } var_dump(gnupg_decrypt('sa45hzq734hrq243rwaefsd80', 'my.key')); Namespaces
namespace foo; class bar {    static public function baz()   {   return 'baz method';   } } var_dump(foo::bar::baz()); Namespaces
namespace foo; class bar {    static public function baz()   {   return 'baz method';   } } var_dump(foo::bar::baz()); -> string(10) "baz method" Namespaces
namespace foo::bar; function baz() {   return 'baz function'; } namespace foo; class bar {    static public function baz()   {   return 'baz method';   } } var_dump(foo::bar::baz()); Namespaces
Namespaces Access built-in functions/classes by prefixing :: some_fn(...) vs. ::some_fn(...) __NAMESPACE__ constant Multiple namespaces per file
More New Features ifsetor OpenID support SQLite3 getopt() works on Windows __DIR__ = dirname(__FILE__)
Error Handling
Error Handling New error class E_DEPRECATED E_ALL includes E_STRICT
Future-Proofing
Regular Expressions ereg will move to PECL replace ereg_* by preg_* by the way, ereg is not binary safe
Deprecated php.ini Settings short open tags magic quotes register_globals register_long_arrays ze1.compatibility_mode allow_call_time_pass_reference safe_mode
Blatant Advertisement
 
 
Thank you.
http://www.priebsch.de (de) http://inside.e-novative.de (en) [email_address]
 

More Related Content

PPT
Python - Getting to the Essence - Points.com - Dave Park
PPTX
Introducing PHP Latest Updates
PDF
What's new in PHP 5.5
KEY
Yapcasia2011 - Hello Embed Perl
KEY
Kansai.pm 10周年記念 Plack/PSGI 入門
PDF
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
 
PDF
Utility Modules That You Should Know About
PDF
How to write rust instead of c and get away with it
Python - Getting to the Essence - Points.com - Dave Park
Introducing PHP Latest Updates
What's new in PHP 5.5
Yapcasia2011 - Hello Embed Perl
Kansai.pm 10周年記念 Plack/PSGI 入門
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
 
Utility Modules That You Should Know About
How to write rust instead of c and get away with it

What's hot (20)

ODP
vfsStream - effective filesystem mocking
PPT
vfsStream - a better approach for file system dependent tests
ODP
The bones of a nice Python script
PDF
Metadata-driven Testing
ODP
Whatsnew in-perl
PDF
Hypers and Gathers and Takes! Oh my!
PDF
Hachiojipm11
PPTX
05 pig user defined functions (udfs)
PDF
Legacy applications - 4Developes konferencja, Piotr Pasich
ODP
nginx mod PSGI
PDF
PHP data structures (and the impact of php 7 on them), phpDay Verona 2015, Italy
ZIP
Intro to Pig UDF
PDF
Diving into HHVM Extensions (php[tek] 2016)
PDF
Apache PIG - User Defined Functions
KEY
Sbaw091006
PDF
Perl 6 by example
PDF
The most exciting features of PHP 7.1
PPT
Test::Base
PDF
TDOH 南區 WorkShop 2016 Reversing on Windows
vfsStream - effective filesystem mocking
vfsStream - a better approach for file system dependent tests
The bones of a nice Python script
Metadata-driven Testing
Whatsnew in-perl
Hypers and Gathers and Takes! Oh my!
Hachiojipm11
05 pig user defined functions (udfs)
Legacy applications - 4Developes konferencja, Piotr Pasich
nginx mod PSGI
PHP data structures (and the impact of php 7 on them), phpDay Verona 2015, Italy
Intro to Pig UDF
Diving into HHVM Extensions (php[tek] 2016)
Apache PIG - User Defined Functions
Sbaw091006
Perl 6 by example
The most exciting features of PHP 7.1
Test::Base
TDOH 南區 WorkShop 2016 Reversing on Windows
Ad

Similar to PHP 5.3 And PHP 6 A Look Ahead (20)

ODP
What's new, what's hot in PHP 5.3
PPTX
PHP 5.3
PDF
ODP
Mastering Namespaces in PHP
PPTX
FFW Gabrovo PMG - PHP OOP Part 3
ODP
New Stuff In Php 5.3
PDF
PHP 5.3 Overview
PDF
Practical PHP 5.3
PDF
Object Features
PPT
Go OO! - Real-life Design Patterns in PHP 5
PPT
PPT
PHP 5 Boot Camp
PDF
Magic methods
PDF
Introduction to PHP 5.3
PDF
Advanced PHP Simplified - Sunshine PHP 2018
PDF
Architecting for PHP5 - Why "Runs on PHP5" is not "Written for PHP5"
PDF
PHP unserialization vulnerabilities: What are we missing?
PPTX
PHP 5 Magic Methods
PDF
PHP OOP
What's new, what's hot in PHP 5.3
PHP 5.3
Mastering Namespaces in PHP
FFW Gabrovo PMG - PHP OOP Part 3
New Stuff In Php 5.3
PHP 5.3 Overview
Practical PHP 5.3
Object Features
Go OO! - Real-life Design Patterns in PHP 5
PHP 5 Boot Camp
Magic methods
Introduction to PHP 5.3
Advanced PHP Simplified - Sunshine PHP 2018
Architecting for PHP5 - Why "Runs on PHP5" is not "Written for PHP5"
PHP unserialization vulnerabilities: What are we missing?
PHP 5 Magic Methods
PHP OOP
Ad

More from thinkphp (13)

PPT
Knut Morris Pratt Algorithm
PPT
String kmp
PPT
String searching
PDF
Functional programming in java script
PDF
Practical functional java script
PDF
Javascript patterns
PDF
Placemaker
PDF
Atom Web Services
PDF
Json Rpc Proxy Generation With Php
PDF
Php And Web Services
PPT
Object Oriented Programming Concepts
PDF
Ajax Introduction Presentation
PPT
Principii Poo
Knut Morris Pratt Algorithm
String kmp
String searching
Functional programming in java script
Practical functional java script
Javascript patterns
Placemaker
Atom Web Services
Json Rpc Proxy Generation With Php
Php And Web Services
Object Oriented Programming Concepts
Ajax Introduction Presentation
Principii Poo

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
KodekX | Application Modernization Development
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Machine learning based COVID-19 study performance prediction
Understanding_Digital_Forensics_Presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KodekX | Application Modernization Development
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Spectral efficient network and resource selection model in 5G networks
Advanced Soft Computing BINUS July 2025.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Unlocking AI with Model Context Protocol (MCP)

PHP 5.3 And PHP 6 A Look Ahead