SlideShare a Scribd company logo
1 of 19
Introduction in PHP5



Jeroen van Sluijs
Software Engineer
Ibuildings.nl
                    Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.
About ibuildings.nl
  • PHP development since 1999
  • Vlissingen, Amsterdam, Sittard, London
  • 43 employees, 18 ZCE
      •   jobs@ibuildings.nl

  • ‘Official Zend Representative’ for Benelux and Scandinavie
         PHP5-migration support and training
         Professionalise PHP in Netherlands

      Professional Services
  •

         Consulting for PHP projects, applications and infrastructure
         Development-methods and software processes
         Application auditing (scalability, performance, security)
         Zend Onsite Training (PHP, Products)
Short Term Benefits




Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.
Out of the Box Enhancements
• The migration will present performance
  enhancements
• Immediate robust improvements with almost no effort
• There is no need to redesign your application!
• Your code only needs to be adjusted to run on PHP5




                                                        4/19
Migrating To Php5
• Only 5 (major) things to take in account
   in order to migrate from PHP4 to PHP5:
    Direct assignment in a class to $this is not allowed anymore
    Function array_merge no longer accepts no-array parameters
    Functions strrpos and strripos search the full $needle
      parameter

    Function get_class returns the case-preserved version of the
      class name (Case sensitive)

    Objects always passed by reference

• No new development on PHP4 besides security fixes


                                                                    5/19
Immediate Benefits #1
• Improved Security
      echo filter_var($int, FILTER_VALIDATE_INT);

• Flexibility
    Programming both OO and Procedural code

• Better error handling using exceptions
• Native support for modern web technologies
    JSON (Javascript object notation)
    SOAP (Simple Object Access Protocol)
    Better and faster XML processing (DOM, SimpleXML and more..)
       • 20-50% faster in PHP5.2.1
    Better MVC frameworks (Zend Framework, Symfony, Prado)



                                                              6/19
Immediate Benefits #2

• Test compares PHP binaries 4.4.4, 5.0.5, 5.1.6 and 5.2.0

• Several scripts tested
    Simple scripts
    Complex object oriented




                                                         7/19
PHP4 vs. PHP5 Statistics




                           8/19
Long Term Benefits




Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.
Object Oriented Programming
in PHP5
• OOP improves your application development in the
   following areas:

    Modular development
    Code is much easier to maintain
    Exceptions allow much easier error handling
    Object Oriented Programming




                                                     10/19
PHP5 Features
In Details #1

 • Improved object model
    1.   Visibility (PPP) - Public, Protected, Private, Final
    2.   Abstraction
    3.   Interfaces
    4.   Object constructors and destructors
    5.   Magic methods
    6.   Type hinting
    7.   Static class properties




                                                                11/19
PHP5 Features
In Details #2

 • New Exception Model (try/catch/throw)
    try {
     if ($error) {
       throw new Exception (“This is my error”);
      }
     } catch (Exception $e) {
       // handle exception
    }

 • Introspection/Reflection
    echo reflection_method::export('Foo', 'func');


 • Iterators (SPL)
     Access Objects as Arrays
    $dir = new DirectoryIterator('.');
      foreach ($dir as $file) {
        echo $file.quot;rnquot;;
      }


                                                     12/19
PHP5 Features
In Details #3

• Native SOAP/WSDL support
     SOAP Server and SOAP Client
       • class MySOAPServer {
           public function getMessage() {
                return “Hello World!”;
          }};
       • $options = array('uri'='http://example.org/soap/server');
       • $server = new SoapServer(NULL, $options);
       • $client = new SoapClient(NULL, $options);
         echo $client->getMessage();



• Many new array and stream functions




                                                                     13/19
PHP5 Features
In Details #4

• Improved Native XML support
    The XML implementation in PHP5 was completely rewritten
    XML files are extremely simple to read and modify
    SimpleXML - a vastly improved XML accessing technique that
      can reduce the total code required

      $library = simplexml_load_file('library.xml');

      foreach ($library->book as $book) {
          echo $book['isbn']; // attribute
          echo $book->title; // element};




                                                               14/19
PHP5 Features
In Details #5

• Database Improvements
     PDO: Identical OO interface to many DB systems (MySQL,
      SQLite, Oracle, DB2, Postgres, Informix, ODBC)

     Prepared statements
       $stmt = $mysqli->prepare(quot;INSERT INTO car VALUES (?, ?, ?)quot;);
       $stmt->bind_param('ssd', $brand, $type, $nof_tyres);

       $brand = 'Mazda';
       ...
       $stmt->execute();




                                                                       15/19
Zend Core 2.0
A supported Certified PHP5 Binary

• Zend Core. Distribution for PHP5
• Advantages:
    All components included in a simple setup:
      • PHP5
      • Zend Framework
      • MySQL
      • Apache
      • phpMyAdmin
    Security
    Stability
    Enhanced - Includes fully tested and certified PHP extensions
      such as DB drivers, XML, Web Services, LDAP and more…



                                                                16/19
Zend Core 2.0
A supported Certified PHP5 Binary

• The perfect Web application development environment




                                                  17/19
More information

  • General Info
     http://www.ibuildings.nl
     http://www.zend.com
     http://www.php.net

     info@ibuildings.nl

  • Migration Guide
     http://www.php.net/manual/en/migration5.php




                                                    18/19
Thank you.




        Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.

More Related Content

What's hot

Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程
jeffz
 
PHP Introduction ( Fedora )
PHP Introduction ( Fedora )PHP Introduction ( Fedora )
PHP Introduction ( Fedora )
Kishore Kumar
 

What's hot (20)

Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Professional PHP: an open-source alternative for enterprise development [Kort...
Professional PHP: an open-source alternative for enterprise development [Kort...Professional PHP: an open-source alternative for enterprise development [Kort...
Professional PHP: an open-source alternative for enterprise development [Kort...
 
Hidden Gems in ColdFusion 11
Hidden Gems in ColdFusion 11Hidden Gems in ColdFusion 11
Hidden Gems in ColdFusion 11
 
Web performance optimization
Web performance optimizationWeb performance optimization
Web performance optimization
 
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
POX to HATEOAS: Our Company's Journey Building a Hypermedia APIPOX to HATEOAS: Our Company's Journey Building a Hypermedia API
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
 
PHP Project PPT
PHP Project PPTPHP Project PPT
PHP Project PPT
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
php_tizag_tutorial
php_tizag_tutorialphp_tizag_tutorial
php_tizag_tutorial
 
Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10
 
Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程
 
php basics
php basicsphp basics
php basics
 
Api Design
Api DesignApi Design
Api Design
 
PHP and Web Services
PHP and Web ServicesPHP and Web Services
PHP and Web Services
 
PHP Introduction ( Fedora )
PHP Introduction ( Fedora )PHP Introduction ( Fedora )
PHP Introduction ( Fedora )
 
The Skinny on Slim
The Skinny on SlimThe Skinny on Slim
The Skinny on Slim
 
Introduction to CakePHP
Introduction to CakePHPIntroduction to CakePHP
Introduction to CakePHP
 
PHP7.1 New Features & Performance
PHP7.1 New Features & PerformancePHP7.1 New Features & Performance
PHP7.1 New Features & Performance
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Constructor and encapsulation in php
Constructor and encapsulation in phpConstructor and encapsulation in php
Constructor and encapsulation in php
 
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)
 

Viewers also liked (6)

Community Wireless Networks
Community Wireless NetworksCommunity Wireless Networks
Community Wireless Networks
 
Rails南蛮通事
Rails南蛮通事Rails南蛮通事
Rails南蛮通事
 
Supernova
SupernovaSupernova
Supernova
 
PresentacióN De Des Encuentro
PresentacióN De Des EncuentroPresentacióN De Des Encuentro
PresentacióN De Des Encuentro
 
Bears Do Shit In The Woods
Bears Do Shit In The WoodsBears Do Shit In The Woods
Bears Do Shit In The Woods
 
Quemalaeslaenvidia
QuemalaeslaenvidiaQuemalaeslaenvidia
Quemalaeslaenvidia
 

Similar to Introduction into PHP5 (Jeroen van Sluijs)

Similar to Introduction into PHP5 (Jeroen van Sluijs) (20)

Migrating from PHP4 To PHP5 - Zend Webinar
Migrating from PHP4 To PHP5 - Zend WebinarMigrating from PHP4 To PHP5 - Zend Webinar
Migrating from PHP4 To PHP5 - Zend Webinar
 
Becoming A Php Ninja
Becoming A Php NinjaBecoming A Php Ninja
Becoming A Php Ninja
 
PHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM iPHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM i
 
Start using PHP 7
Start using PHP 7Start using PHP 7
Start using PHP 7
 
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)
 
How To Start Up With PHP In IBM i
How To Start Up With PHP In IBM iHow To Start Up With PHP In IBM i
How To Start Up With PHP In IBM i
 
How To Start Up With Php In Ibm I
How To Start Up With Php In Ibm IHow To Start Up With Php In Ibm I
How To Start Up With Php In Ibm I
 
PHP Batch Jobs on IBM i
PHP Batch Jobs on IBM iPHP Batch Jobs on IBM i
PHP Batch Jobs on IBM i
 
Unleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ PlatformUnleash your Symfony projects with eZ Platform
Unleash your Symfony projects with eZ Platform
 
Current state-of-php
Current state-of-phpCurrent state-of-php
Current state-of-php
 
Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009
 
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
 
第1回PHP拡張勉強会
第1回PHP拡張勉強会第1回PHP拡張勉強会
第1回PHP拡張勉強会
 
green
greengreen
green
 
Phpyahoo
PhpyahooPhpyahoo
Phpyahoo
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
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
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 

More from Stefan Koopmanschap

Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)
Stefan Koopmanschap
 

More from Stefan Koopmanschap (20)

A Practical Look At Symfony2
A Practical Look At Symfony2A Practical Look At Symfony2
A Practical Look At Symfony2
 
Git for Subversion Users (ZendCon 2011)
Git for Subversion Users (ZendCon 2011)Git for Subversion Users (ZendCon 2011)
Git for Subversion Users (ZendCon 2011)
 
A Practical Look at Symfony2 (PHPNW11)
A Practical Look at Symfony2 (PHPNW11)A Practical Look at Symfony2 (PHPNW11)
A Practical Look at Symfony2 (PHPNW11)
 
Git For Subversion Users (PHPNW11)
Git For Subversion Users (PHPNW11)Git For Subversion Users (PHPNW11)
Git For Subversion Users (PHPNW11)
 
Conference Speaking 101
Conference Speaking 101Conference Speaking 101
Conference Speaking 101
 
Open Up (International PHP Conference Spring Edition 2011)
Open Up (International PHP Conference Spring Edition 2011)Open Up (International PHP Conference Spring Edition 2011)
Open Up (International PHP Conference Spring Edition 2011)
 
Git for Subversion Users (phpDay 2011)
Git for Subversion Users (phpDay 2011)Git for Subversion Users (phpDay 2011)
Git for Subversion Users (phpDay 2011)
 
Would you like docs with that? - Zend Webinar
Would you like docs with that? - Zend WebinarWould you like docs with that? - Zend Webinar
Would you like docs with that? - Zend Webinar
 
Git workshop (2value, 14-12-2010)
Git workshop (2value, 14-12-2010)Git workshop (2value, 14-12-2010)
Git workshop (2value, 14-12-2010)
 
Git Workshop (Pfz Workshopdag)
Git Workshop (Pfz Workshopdag)Git Workshop (Pfz Workshopdag)
Git Workshop (Pfz Workshopdag)
 
Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)
 
Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)Would you like docs with that? (IPC 2010)
Would you like docs with that? (IPC 2010)
 
Integrating symfony and Zend Framework (IPC 2010)
Integrating symfony and Zend Framework (IPC 2010)Integrating symfony and Zend Framework (IPC 2010)
Integrating symfony and Zend Framework (IPC 2010)
 
symfony 1.4 workshop
symfony 1.4 workshopsymfony 1.4 workshop
symfony 1.4 workshop
 
Would you like docs with that? (Pfcongres 2010)
Would you like docs with that? (Pfcongres 2010)Would you like docs with that? (Pfcongres 2010)
Would you like docs with that? (Pfcongres 2010)
 
The Symfony Community - How to (get) help
The Symfony Community - How to (get) helpThe Symfony Community - How to (get) help
The Symfony Community - How to (get) help
 
Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)
 
Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)
 
Integrating symfony and Zend Framework
Integrating symfony and Zend FrameworkIntegrating symfony and Zend Framework
Integrating symfony and Zend Framework
 
Scrum (dutch)
Scrum (dutch)Scrum (dutch)
Scrum (dutch)
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Introduction into PHP5 (Jeroen van Sluijs)

  • 1. Introduction in PHP5 Jeroen van Sluijs Software Engineer Ibuildings.nl Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.
  • 2. About ibuildings.nl • PHP development since 1999 • Vlissingen, Amsterdam, Sittard, London • 43 employees, 18 ZCE • jobs@ibuildings.nl • ‘Official Zend Representative’ for Benelux and Scandinavie  PHP5-migration support and training  Professionalise PHP in Netherlands Professional Services •  Consulting for PHP projects, applications and infrastructure  Development-methods and software processes  Application auditing (scalability, performance, security)  Zend Onsite Training (PHP, Products)
  • 3. Short Term Benefits Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.
  • 4. Out of the Box Enhancements • The migration will present performance enhancements • Immediate robust improvements with almost no effort • There is no need to redesign your application! • Your code only needs to be adjusted to run on PHP5 4/19
  • 5. Migrating To Php5 • Only 5 (major) things to take in account in order to migrate from PHP4 to PHP5:  Direct assignment in a class to $this is not allowed anymore  Function array_merge no longer accepts no-array parameters  Functions strrpos and strripos search the full $needle parameter  Function get_class returns the case-preserved version of the class name (Case sensitive)  Objects always passed by reference • No new development on PHP4 besides security fixes 5/19
  • 6. Immediate Benefits #1 • Improved Security  echo filter_var($int, FILTER_VALIDATE_INT); • Flexibility  Programming both OO and Procedural code • Better error handling using exceptions • Native support for modern web technologies  JSON (Javascript object notation)  SOAP (Simple Object Access Protocol)  Better and faster XML processing (DOM, SimpleXML and more..) • 20-50% faster in PHP5.2.1  Better MVC frameworks (Zend Framework, Symfony, Prado) 6/19
  • 7. Immediate Benefits #2 • Test compares PHP binaries 4.4.4, 5.0.5, 5.1.6 and 5.2.0 • Several scripts tested  Simple scripts  Complex object oriented 7/19
  • 8. PHP4 vs. PHP5 Statistics 8/19
  • 9. Long Term Benefits Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.
  • 10. Object Oriented Programming in PHP5 • OOP improves your application development in the following areas:  Modular development  Code is much easier to maintain  Exceptions allow much easier error handling  Object Oriented Programming 10/19
  • 11. PHP5 Features In Details #1 • Improved object model 1. Visibility (PPP) - Public, Protected, Private, Final 2. Abstraction 3. Interfaces 4. Object constructors and destructors 5. Magic methods 6. Type hinting 7. Static class properties 11/19
  • 12. PHP5 Features In Details #2 • New Exception Model (try/catch/throw) try { if ($error) { throw new Exception (“This is my error”); } } catch (Exception $e) { // handle exception } • Introspection/Reflection echo reflection_method::export('Foo', 'func'); • Iterators (SPL)  Access Objects as Arrays $dir = new DirectoryIterator('.'); foreach ($dir as $file) { echo $file.quot;rnquot;; } 12/19
  • 13. PHP5 Features In Details #3 • Native SOAP/WSDL support  SOAP Server and SOAP Client • class MySOAPServer { public function getMessage() { return “Hello World!”; }}; • $options = array('uri'='http://example.org/soap/server'); • $server = new SoapServer(NULL, $options); • $client = new SoapClient(NULL, $options); echo $client->getMessage(); • Many new array and stream functions 13/19
  • 14. PHP5 Features In Details #4 • Improved Native XML support  The XML implementation in PHP5 was completely rewritten  XML files are extremely simple to read and modify  SimpleXML - a vastly improved XML accessing technique that can reduce the total code required $library = simplexml_load_file('library.xml'); foreach ($library->book as $book) { echo $book['isbn']; // attribute echo $book->title; // element}; 14/19
  • 15. PHP5 Features In Details #5 • Database Improvements  PDO: Identical OO interface to many DB systems (MySQL, SQLite, Oracle, DB2, Postgres, Informix, ODBC)  Prepared statements $stmt = $mysqli->prepare(quot;INSERT INTO car VALUES (?, ?, ?)quot;); $stmt->bind_param('ssd', $brand, $type, $nof_tyres); $brand = 'Mazda'; ... $stmt->execute(); 15/19
  • 16. Zend Core 2.0 A supported Certified PHP5 Binary • Zend Core. Distribution for PHP5 • Advantages:  All components included in a simple setup: • PHP5 • Zend Framework • MySQL • Apache • phpMyAdmin  Security  Stability  Enhanced - Includes fully tested and certified PHP extensions such as DB drivers, XML, Web Services, LDAP and more… 16/19
  • 17. Zend Core 2.0 A supported Certified PHP5 Binary • The perfect Web application development environment 17/19
  • 18. More information • General Info  http://www.ibuildings.nl  http://www.zend.com  http://www.php.net  info@ibuildings.nl • Migration Guide  http://www.php.net/manual/en/migration5.php 18/19
  • 19. Thank you. Copyright © 2007 Ibuildings.nl / Zend Technologies LTD.