Your SlideShare is downloading. ×
0
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch

1,041

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,041
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
31
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  1. What is new in PHP 5.3?What is new in PHP 5.3? Stefan Priebsch, e-novative GmbHStefan Priebsch, e-novative GmbH
  2. DisclaimerDisclaimer
  3. First Plans for PHP 6First Plans for PHP 6 ● Paris Developer MeetingParis Developer Meeting ● Derick's Meeting MinutesDerick's Meeting Minutes ● www.php.net/~derick/meeting-notes.htmlwww.php.net/~derick/meeting-notes.html ● First Release Candidate late 2006First Release Candidate late 2006
  4. First Plans for PHP 6First Plans for PHP 6 ● Paris Developer MeetingParis Developer Meeting ● Derick's Meeting MinutesDerick's Meeting Minutes ● www.php.net/~derick/meeting-notes.htmlwww.php.net/~derick/meeting-notes.html ● First Release Candidate late 2007First Release Candidate late 2007
  5. First Plans for PHP 6First Plans for PHP 6 ● Paris Developer MeetingParis Developer Meeting ● Derick's Meeting MinutesDerick's Meeting Minutes ● www.php.net/~derick/meeting-notes.htmlwww.php.net/~derick/meeting-notes.html ● First Release Candidate ... some dayFirst Release Candidate ... some day
  6. And PHP 6 ...And PHP 6 ...
  7. ... became PHP 5.3 ...... became PHP 5.3 ...
  8. ... almost... almost
  9. UnicodeUnicode
  10. UnicodeUnicode ● One Standard to rule them all ● PHP 6's killer feature ● One character != one byte
  11. Garbage CollectionGarbage Collection
  12. Garbage CollectionGarbage Collection ● Free memory while script is running ● gc_enable(); ● gc_disable();
  13. SPL ImprovementsSPL Improvements
  14. SPL ImprovementsSPL Improvements ● SplDoublyLinkedList ● SPLStack ● SPLQueue ● SplPriorityQueue
  15. SPL StackSPL Stack $stack = new SplStack(); $stack->push('a'); $stack->push('b'); $stack->push('c'); echo $stack->pop(); echo $stack->pop(); echo $stack->pop();
  16. SPL StackSPL Stack $stack = new SplStack(); $stack->push('a'); $stack->push('b'); $stack->push('c'); echo $stack->pop(); echo $stack->pop(); echo $stack->pop(); -> cba
  17. Magic Static CallsMagic Static Calls
  18. Magic CallsMagic Calls class Foo { public function __call($aName, $aParameters) { var_dump($aName); var_dump($aParameters); } } $foo = new Foo(); $foo->test('something');
  19. Magic CallsMagic 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" }
  20. Magic CallsMagic Calls Strict standards: Non-static method Foo::test() should not be called statically
  21. Magic Static CallsMagic Static Calls class Foo { public static function __callStatic($aName, $aParameters) { ... } } Foo::doSomething(...);
  22. Late Static BindingLate Static Binding
  23. Late Static BindingLate Static Binding class Foo { protected static $foo = 'Test'; public static function getFoo() { return self::$foo; } } var_dump(Foo::getFoo());
  24. Late Static BindingLate Static Binding class Foo { protected static $foo = 'Test'; public static function getFoo() { return self::$foo; } } var_dump(Foo::getFoo()); -> Test
  25. Late Static BindingLate 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());
  26. Late Static BindingLate 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"
  27. Late Static BindingLate 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());
  28. Late Static BindingLate 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"
  29. NamespacesNamespaces
  30. class File { ... } NamespacesNamespaces
  31. class File { ... } // somewhere else class File { ... } NamespacesNamespaces
  32. class my_Web_Framework_Foo_Bar_Baz { ... } NamespacesNamespaces
  33. namespace my::Web::Framework::Foo::Bar; class Baz { ... } NamespacesNamespaces
  34. namespace my::Web::Framework::Foo::Bar; class Baz { ... } // somewhere else: $baz = new my::Web::Framework::Foo::Bar::Baz(); NamespacesNamespaces
  35. use my::Web::Framework::Foo::Bar::Baz as MyBaz; $baz = new myBaz(); NamespacesNamespaces
  36. namespace crypt; function gnupg_decrypt($aText, $aKeyFile) { return 'some plaintext'; } NamespacesNamespaces
  37. namespace crypt; function gnupg_decrypt($aText, $aKeyFile) { return 'some plaintext'; } var_dump(gnupg_decrypt('sa45hzq734hrq243rwaefsd80', 'my.key')); NamespacesNamespaces
  38. namespace foo; class bar { static public function baz() { return 'baz method'; } } var_dump(foo::bar::baz()); NamespacesNamespaces
  39. namespace foo; class bar { static public function baz() { return 'baz method'; } } var_dump(foo::bar::baz()); -> string(10) "baz method" NamespacesNamespaces
  40. namespace foo::bar; function baz() { return 'baz function'; } namespace foo; class bar { static public function baz() { return 'baz method'; } } var_dump(foo::bar::baz()); NamespacesNamespaces
  41. NamespacesNamespaces ● Access built-in functions/classes by prefixing :: ● some_fn(...) vs. ::some_fn(...) ● __NAMESPACE__ constant ● Multiple namespaces per file
  42. More New FeaturesMore New Features ● ifsetor ● OpenID support ● SQLite3 ● getopt() works on Windows ● __DIR__ = dirname(__FILE__)
  43. Error HandlingError Handling
  44. Error HandlingError Handling ● New error class E_DEPRECATED ● E_ALL includes E_STRICT
  45. Future-ProofingFuture-Proofing
  46. Regular ExpressionsRegular Expressions ● ereg will move to PECL ● replace ereg_* by preg_* ● by the way, ereg is not binary safe
  47. Deprecated php.ini SettingsDeprecated php.ini Settings ● short open tags ● magic quotes ● register_globals ● register_long_arrays ● ze1.compatibility_mode ● allow_call_time_pass_reference ● safe_mode
  48. Blatant AdvertisementBlatant Advertisement
  49. Thank you.Thank you.
  50. http://www.priebsch.de (de)http://www.priebsch.de (de) http://inside.e-novative.de (en)http://inside.e-novative.de (en) stefan.priebsch@e-novative.destefan.priebsch@e-novative.de

×