PHP 5.3
DAvide Mendolia
http://davidemendolia.blogspot.com

dmendolia@php.net

lead developer APM (Alternative PHP
Monitor)

Contr...
Will Be Release...
30 June 2009
Features


Language

Extensions

No major compatibility break
NAmespace



Avoid things like :
Zend_Search_Lucene_Analysis_Analyzer_Common_Tex
t_CaseInsensitive
NAMESPACE
namespace blueplanet;

class Animal {
	 public function saveTheWorld($when) {	
	 }
}

$animal = new blueplanetAn...
Why  ?

namespace foo::bar;
function baz(){ echo "func";}

namespace foo;
class bar {
	 public static function baz() {
   ...
Still the Problem with MaC
           keyboard




Use Alt + Shift + /
LAMBDA FUNCTIONS

$lambda = function() { echo "particles"; }
$lambda();


$list = array(0, 1, 1, 2, 3, 5, 8,
13, 21, 34, 5...
LAMBDA FUNCTIONS
$lambda = create_function('',
   'echo "particles";'
);
$lambda();

$list = array(0, 1, 1, 2, 3, 5, 8, 13...
Closures

   Usage differ from javascript

   kind of parameter passed at declaration time



$container = "bottle";
$clos...
FunctOrs

class Functor {
	 public function __invoke() {
	 	 echo "functionoids";
	 }	
}

$functor = new Functor;
$functor...
Extensions

FileInfo

Intl

Phar

SQLite3

Mysql(mysqlnd)
FileInfo


Based on libmagic

finfo_file()  return the mime type based on the
structure of the file
Intl


Internationalization

Based on ICU library (International
Components for Unicode)

Originally planned for PHP 6
Intl - Classes
Locale : Identifier for a language, culture or regional
specific

Collator : string comparison locale-sensiti...
Phar

PHP Archive

Similar to Jar concept from Java

Allow the possibility to put an entire applications in one
file.

Exte...
Mysqlnd


Mysql Native Driver

ext/mysql, ext/mysqli, PDO_MYSQL

better performance fetching buffered result
DEPRECATED

safe_mode

register_globals

register_long_arrays

magic_quotes_gpc

...
More info



http://www.php.net/migration53
Questions ?
PHP 5.3
Upcoming SlideShare
Loading in...5
×

PHP 5.3

1,719

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,719
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

PHP 5.3

  1. 1. PHP 5.3
  2. 2. DAvide Mendolia http://davidemendolia.blogspot.com dmendolia@php.net lead developer APM (Alternative PHP Monitor) Contributor of php-benchmark ZCE PHP5 - ZF, CMDEV Working @ AUSY
  3. 3. Will Be Release...
  4. 4. 30 June 2009
  5. 5. Features Language Extensions No major compatibility break
  6. 6. NAmespace Avoid things like : Zend_Search_Lucene_Analysis_Analyzer_Common_Tex t_CaseInsensitive
  7. 7. NAMESPACE namespace blueplanet; class Animal { public function saveTheWorld($when) { } } $animal = new blueplanetAnimal(); $animal->saveTheWorld('now'); // or use blueplanet as caprica; $animal = new capricaAnimal(); $animal->saveTheWorld('now');
  8. 8. Why ? namespace foo::bar; function baz(){ echo "func";} namespace foo; class bar { public static function baz() { echo "method"; } } foo::bar::baz();
  9. 9. Still the Problem with MaC keyboard Use Alt + Shift + /
  10. 10. LAMBDA FUNCTIONS $lambda = function() { echo "particles"; } $lambda(); $list = array(0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89); array_map( function($n){ return $n * $n;}, $list );
  11. 11. LAMBDA FUNCTIONS $lambda = create_function('', 'echo "particles";' ); $lambda(); $list = array(0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89); $func = create_function('$n', 'return $n * $n;'); array_map( $func, $list );
  12. 12. Closures Usage differ from javascript kind of parameter passed at declaration time $container = "bottle"; $closure = function() use ($container) { echo $container; } $closure();
  13. 13. FunctOrs class Functor { public function __invoke() { echo "functionoids"; } } $functor = new Functor; $functor();
  14. 14. Extensions FileInfo Intl Phar SQLite3 Mysql(mysqlnd)
  15. 15. FileInfo Based on libmagic finfo_file() return the mime type based on the structure of the file
  16. 16. Intl Internationalization Based on ICU library (International Components for Unicode) Originally planned for PHP 6
  17. 17. Intl - Classes Locale : Identifier for a language, culture or regional specific Collator : string comparison locale-sensitive NumberFormatter : format numbers, currencies and percentages in locale-sensitive IntDateFormatter : format date locale-sensitive MessageFormatter : format string with time, date, number or choice input
  18. 18. Phar PHP Archive Similar to Jar concept from Java Allow the possibility to put an entire applications in one file. Extensions not required to execute the file Facilitate the distribution Can improve performance with a byte code cache system
  19. 19. Mysqlnd Mysql Native Driver ext/mysql, ext/mysqli, PDO_MYSQL better performance fetching buffered result
  20. 20. DEPRECATED safe_mode register_globals register_long_arrays magic_quotes_gpc ...
  21. 21. More info http://www.php.net/migration53
  22. 22. Questions ?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×