Skip to content

Drarok/php-5.5-demos

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

PHP 5.5 Demos

Here's a handful of demos showing some of the new features in PHP 5.5.

Empty Expressions

Prior to PHP 5.5, empty() would only accept variables, not function results.

Finally Keyword

You can now use the 'finally' keyword after a 'catch' block to execute code after a 'try', no matter if an Exception was thrown or not.

Generators

Generators allow efficient iteration without having to create a complex Iterator class.

Non-Scalar Foreach Keys

Under PHP 5.5 and later, you can return non-scalar keys from Iterators (and Generators).

Set CLI Proc Title

Under PHP 5.5 and later, you can set the process title under the CLI SAPI, without the need for any extensions (such as proctitle, required under PHP <= 5.4).

About

Some simple demos of some new features in PHP 5.5.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages