SlideShare a Scribd company logo
PHP 5.3 – Part 1 Introduction to PHP 5.3 A Sydney PHP Group Presentation 4 th  September 2008 By Timothy Chandler
So what’s the big deal!? PHP 5.3 = PHP 6 - Unicode + MORE! Tomorrow’s PHP Today. Forwards Compatibility.
So what’s new? New Syntax New Functions & Methods New Extensions Namespaces Lambda Functions & Closures Late Static Binding Lots of important changes A few gotchas.
Important Changes & Gotchas Functions Array functions “next()” & “current()” no longer work with objects. “ session_start()” will now return a Boolean response “false” if it fails to start a session. By default, “ clearstatcache()” will no longer clear “realpath()” cache. Backwards Compatibility
Important Changes & Gotchas Magic Methods All magic methods must now be declared as “public”. “static” declarations are no longer allowed. “ __toString()” will no longer accept any parameters. Backwards Compatibility
Important Changes & Gotchas New Reserved Words “ namespace” “ goto” New Reserved Classes “ Closure” Backwards Compatibility
Important Changes & Gotchas Depreciations Ticks This includes “register_tick_function()” Undepreciations “ is_a()” Backwards Compatibility
Important Changes & Gotchas Windows Any Windows OS prior to Windows 2000 is no longer supported. Backwards Compatibility
Important Changes & Gotchas Removed ncurses fpdf sybase dbase fbsql Extensions Added Phar Internationalization (Intl) File Information (Fileinfo) SQLite3
Important Changes & Gotchas Not allowed to disable. PCRE Reflections SPL Extensions
Important Changes & Gotchas More powerful ini. A whole slew of changes which may or may not affect you. The PHP INI File
New Syntax It’s like HEREDOC, but it doesn’t evaluate it’s contents. Syntax: <<<‘NOWDOC’ <CONTENT> NOWDOC; “ NOWDOC”, like “HEREDOC”, can be replaced with any non-reserved word. NOWDOC
New Syntax The Ternary Operator has been given a shortcut. Testing for only “true” or “false” is now possible. Syntax: $foo=true; !$foo?:print '$foo is True<br />'; $bar=false; $bar?:print '$bar is False<br />'; Ternary Operator
New Syntax You can now cast a variable to NULL while using it and remove it from memory in one fell swoop. Syntax: $foo='foo'; $foo=(unset)print $foo; Unset Casting
New Syntax The new “goto” keyword is useful for controlling breaks in loops and switches. Not recommended outside of loops and switches. Easy to abuse – be careful with your GCP. Syntax: print 1; goto label1; print 2; print 3; label1: print 4; goto
New Functions & Methods Too many for this presentation. They include: Array Date GMP Hash Image Math Mcrypt Network PCNTL PHP Core SHM SPL Streams Strings
New Functions & Methods “ array_replace()” – Finds and replaces based on key and merges the remainder. “ array_replace_recursive()” – Recursively finds and replaces based on key and merges the remainder. Array Functions
New Functions & Methods “ date_add()” – Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object. “ date_sub()” – Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object  “ date_diff()” – Takes two DateTime Objects and calculates the difference. Date Functions
New Functions & Methods “ class_alias()” – Creates an alias of a class name. “ forward_static_call()” and “forward_static_call_array()” – Related to Late Static Binding. This will be discussed in another presentation. PHP Core
Coming Up October Part 2 – New PHP Internals Lambda Functions and Closures Namespaces – maybe? November Part 3 – New PHP Extensions Internationalization Phar

More Related Content

Viewers also liked (20)

PDF
Appendex b
swavicky
 
PPT
5 Accessing Information Resources
Patty Ramsey
 
PDF
Appendex c
swavicky
 
PPTX
Setting up a gmail account
keelyswitzer
 
PPT
PHP - Introduction to PHP Date and Time Functions
Vibrant Technologies & Computers
 
PDF
Drought: Looking Back and Planning Ahead, Todd Votteler
TXGroundwaterSummit
 
PPTX
Ch4(saving state with cookies and query strings)
Chhom Karath
 
PPTX
Ch5(ms access with php)
Chhom Karath
 
PPTX
CIS 110 Chapter 1 Intro to Computers
Patty Ramsey
 
PDF
final emoji-board EMAIL ME NOWSWAG11
Joe Humphreys
 
PPTX
eMail 101 (4) Class for Self help Virtual Senior Center
SnowSugar Video
 
PPT
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability Extension
Safe Software
 
PPT
Chapter 4 Form Factors & Power Supplies
Patty Ramsey
 
PPT
Introduction to PHP
prabhatjon
 
PDF
Aquifer Storage and Recovery, Kelley Neumann
TXGroundwaterSummit
 
PPT
Final morris esri_nwgis_lidar
Eric Morris
 
PPTX
Survey Grade LiDAR Technologies for Transportation Engineering
Quantum Spatial
 
PDF
Appendex f
swavicky
 
PPT
Chapter 4 Form Factors Power Supplies
Patty Ramsey
 
PDF
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
eWater
 
Appendex b
swavicky
 
5 Accessing Information Resources
Patty Ramsey
 
Appendex c
swavicky
 
Setting up a gmail account
keelyswitzer
 
PHP - Introduction to PHP Date and Time Functions
Vibrant Technologies & Computers
 
Drought: Looking Back and Planning Ahead, Todd Votteler
TXGroundwaterSummit
 
Ch4(saving state with cookies and query strings)
Chhom Karath
 
Ch5(ms access with php)
Chhom Karath
 
CIS 110 Chapter 1 Intro to Computers
Patty Ramsey
 
final emoji-board EMAIL ME NOWSWAG11
Joe Humphreys
 
eMail 101 (4) Class for Self help Virtual Senior Center
SnowSugar Video
 
Preparing LiDAR for Use in ArcGIS 10.1 with the Data Interoperability Extension
Safe Software
 
Chapter 4 Form Factors & Power Supplies
Patty Ramsey
 
Introduction to PHP
prabhatjon
 
Aquifer Storage and Recovery, Kelley Neumann
TXGroundwaterSummit
 
Final morris esri_nwgis_lidar
Eric Morris
 
Survey Grade LiDAR Technologies for Transportation Engineering
Quantum Spatial
 
Appendex f
swavicky
 
Chapter 4 Form Factors Power Supplies
Patty Ramsey
 
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
eWater
 

Similar to PHP 5.3 Part 1 - Introduction to PHP 5.3 (20)

ODP
Practical catalyst
dwm042
 
ODP
Best practices tekx
Lorna Mitchell
 
PDF
PHP 8: What's New and Changed
Ayesh Karunaratne
 
PDF
Python tools for testing web services over HTTP
Mykhailo Kolesnyk
 
PPTX
Designing CakePHP plugins for consuming APIs
Neil Crookes
 
PDF
From Legacy to Hexagonal (An Unexpected Android Journey)
Jose Manuel Pereira Garcia
 
PPTX
PHP 7
Joshua Copeland
 
PPT
course slides -- powerpoint
webhostingguy
 
PDF
Last train to php 7
Damien Seguy
 
PPT
Starting with PHP and Web devepolment
Rajib Ahmed
 
PDF
Interview questions on Apache spark [part 2]
knowbigdata
 
PPTX
Gohan
Nachi Ueno
 
PDF
Current state-of-php
Richard McIntyre
 
PPT
Add (Syntactic) Sugar To Your Java
Pascal-Louis Perez
 
PDF
Php 7.2 compliance workshop php benelux
Damien Seguy
 
PPT
Advanced PHPUnit Testing
Mike Lively
 
ODP
Ldap Synchronization Connector @ 2011.RMLL
sbahloul
 
PPT
Xadoop - new approaches to data analytics
Maxim Grinev
 
ODP
Implementing Comet using PHP
King Foo
 
Practical catalyst
dwm042
 
Best practices tekx
Lorna Mitchell
 
PHP 8: What's New and Changed
Ayesh Karunaratne
 
Python tools for testing web services over HTTP
Mykhailo Kolesnyk
 
Designing CakePHP plugins for consuming APIs
Neil Crookes
 
From Legacy to Hexagonal (An Unexpected Android Journey)
Jose Manuel Pereira Garcia
 
course slides -- powerpoint
webhostingguy
 
Last train to php 7
Damien Seguy
 
Starting with PHP and Web devepolment
Rajib Ahmed
 
Interview questions on Apache spark [part 2]
knowbigdata
 
Gohan
Nachi Ueno
 
Current state-of-php
Richard McIntyre
 
Add (Syntactic) Sugar To Your Java
Pascal-Louis Perez
 
Php 7.2 compliance workshop php benelux
Damien Seguy
 
Advanced PHPUnit Testing
Mike Lively
 
Ldap Synchronization Connector @ 2011.RMLL
sbahloul
 
Xadoop - new approaches to data analytics
Maxim Grinev
 
Implementing Comet using PHP
King Foo
 
Ad

Recently uploaded (20)

PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
visibel.ai Company Profile – Real-Time AI Solution for CCTV
visibelaiproject
 
PPTX
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PPTX
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
visibel.ai Company Profile – Real-Time AI Solution for CCTV
visibelaiproject
 
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Ad

PHP 5.3 Part 1 - Introduction to PHP 5.3

  • 1. PHP 5.3 – Part 1 Introduction to PHP 5.3 A Sydney PHP Group Presentation 4 th September 2008 By Timothy Chandler
  • 2. So what’s the big deal!? PHP 5.3 = PHP 6 - Unicode + MORE! Tomorrow’s PHP Today. Forwards Compatibility.
  • 3. So what’s new? New Syntax New Functions & Methods New Extensions Namespaces Lambda Functions & Closures Late Static Binding Lots of important changes A few gotchas.
  • 4. Important Changes & Gotchas Functions Array functions “next()” & “current()” no longer work with objects. “ session_start()” will now return a Boolean response “false” if it fails to start a session. By default, “ clearstatcache()” will no longer clear “realpath()” cache. Backwards Compatibility
  • 5. Important Changes & Gotchas Magic Methods All magic methods must now be declared as “public”. “static” declarations are no longer allowed. “ __toString()” will no longer accept any parameters. Backwards Compatibility
  • 6. Important Changes & Gotchas New Reserved Words “ namespace” “ goto” New Reserved Classes “ Closure” Backwards Compatibility
  • 7. Important Changes & Gotchas Depreciations Ticks This includes “register_tick_function()” Undepreciations “ is_a()” Backwards Compatibility
  • 8. Important Changes & Gotchas Windows Any Windows OS prior to Windows 2000 is no longer supported. Backwards Compatibility
  • 9. Important Changes & Gotchas Removed ncurses fpdf sybase dbase fbsql Extensions Added Phar Internationalization (Intl) File Information (Fileinfo) SQLite3
  • 10. Important Changes & Gotchas Not allowed to disable. PCRE Reflections SPL Extensions
  • 11. Important Changes & Gotchas More powerful ini. A whole slew of changes which may or may not affect you. The PHP INI File
  • 12. New Syntax It’s like HEREDOC, but it doesn’t evaluate it’s contents. Syntax: <<<‘NOWDOC’ <CONTENT> NOWDOC; “ NOWDOC”, like “HEREDOC”, can be replaced with any non-reserved word. NOWDOC
  • 13. New Syntax The Ternary Operator has been given a shortcut. Testing for only “true” or “false” is now possible. Syntax: $foo=true; !$foo?:print '$foo is True<br />'; $bar=false; $bar?:print '$bar is False<br />'; Ternary Operator
  • 14. New Syntax You can now cast a variable to NULL while using it and remove it from memory in one fell swoop. Syntax: $foo='foo'; $foo=(unset)print $foo; Unset Casting
  • 15. New Syntax The new “goto” keyword is useful for controlling breaks in loops and switches. Not recommended outside of loops and switches. Easy to abuse – be careful with your GCP. Syntax: print 1; goto label1; print 2; print 3; label1: print 4; goto
  • 16. New Functions & Methods Too many for this presentation. They include: Array Date GMP Hash Image Math Mcrypt Network PCNTL PHP Core SHM SPL Streams Strings
  • 17. New Functions & Methods “ array_replace()” – Finds and replaces based on key and merges the remainder. “ array_replace_recursive()” – Recursively finds and replaces based on key and merges the remainder. Array Functions
  • 18. New Functions & Methods “ date_add()” – Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object. “ date_sub()” – Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object “ date_diff()” – Takes two DateTime Objects and calculates the difference. Date Functions
  • 19. New Functions & Methods “ class_alias()” – Creates an alias of a class name. “ forward_static_call()” and “forward_static_call_array()” – Related to Late Static Binding. This will be discussed in another presentation. PHP Core
  • 20. Coming Up October Part 2 – New PHP Internals Lambda Functions and Closures Namespaces – maybe? November Part 3 – New PHP Extensions Internationalization Phar