• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
PHP 5.4 - So what?!
 

PHP 5.4 - So what?!

on

  • 3,085 views

 

Statistics

Views

Total Views
3,085
Views on SlideShare
2,057
Embed Views
1,028

Actions

Likes
1
Downloads
14
Comments
0

4 Embeds 1,028

http://www.mageblog.de 1020
http://feeds.feedburner.com 6
http://webcache.googleusercontent.com 1
http://test.idoc.vn 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    PHP 5.4 - So what?! PHP 5.4 - So what?! Presentation Transcript

    • PHP 5.4So what?!
    • Always prefer the english manual!
    • Backward Incompatible Changes
    • Safe mode is no longer supported
    • Magic quotes has been removed.
    • The register_globals andregister_long_arrays ini directives have been removed.
    • Call-time pass by reference has been removed.
    • The break and continue statements no longer accept variable arguments.
    • In the date and time extension, thetimezone can no longer be set using the TZ environment variable.
    • Non-numeric string offsets - e.g.$a[foo] where $a is a string - now return false on isset() and true onempty(), and produce a warning if you try to use them.
    • Converting an array to a string will now generate an E_NOTICE level error
    • The default character set is now UTF-8, instead of ISO-8859-1
    • New Reserved Keywords• trait• callable• insteadof
    • New Features
    • Traits
    • Short array syntax• $a = [1, 2, 3, 4];• $a = [one => 1, two => 2, three => 3, 4];
    • Function array dereferencing• foo()[0]
    • Closures now support $this
    • <?= is now always available,regardless of the short_open_tag ini option.
    • Class member access on instantiation has been added• (new Foo)->bar()
    • Session Upload Progress• Session extension can now track the upload progress of files.• ini settings – session.upload_progress.enabled = true – session.upload_progress.cleanup = true – session.upload_progress.prefix = "upload_progress_ " – session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS " – session.upload_progress.freq = "1%" – session.upload_progress.min-freq = 1
    • Built-in web server in CLI mode• php -S localhost:8000 -t foo/• C:UsersfuhrDownloadsphp-5.4.0-Win32- VC9-x86>.php -c php.ini-development -S localhost:8181 -t Usersfuhrworkspacephp54src
    • Changed Functions
    • Stack Frame Limit• array debug_backtrace ([ int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT [, int $limit = 0 ]] )• void debug_print_backtrace ([ int $options = 0 [, int $limit = 0 ]] )
    • New Classes and Interfaces
    • JsonSerializable
    • SessionHandler &SessionHandlerInterface
    • CallbackFilterIterator &RecursiveCallbackFilterIterator
    • New Methods
    • SPL• RegexIterator::getRegex()• SplObjectStorage::getHash()• DirectoryIterator::getExtension()• SplDoublyLinkedList::serialize()• SplDoublyLinkedList::unserialize()• SplFileInfo::getExtension()• SplFileObject::fputcsv()• SplQueue::serialize()• SplQueue::unserialize()• SplStack::serialize()• SplStack::unserialize()• SplTempFileObject::fputcsv()
    • Further Reading• http://www.php.net/manual/en/migration54. php• http://css.dzone.com/articles/writing-clean- code-php-54• http://net.tutsplus.com/tutorials/php/php-5- 4-is-here-what-you-must-know/