Friday, May 24, 2013

5 Reasons Why the Web Platform War is Over: PHP Won with 75% says Google



Google I/O is a event mainly for developers that Google organizes every year to present the latest developments of their products.
This year Google announced a new language being supported in AppEngine, their so called "cloud" hosting platform. This time the new language was PHP.
A Google manager for AppEngine explained that PHP is running in 75% of the Web sites. That explains why PHP support is the top most requested feature for AppEngine.

For more please see here.


http://www.phpclasses.org/blog/post/208-5-Reasons-Why-the-Web-Platform-War-is-Over-PHP-Won-with-75-says-Google.html

Wednesday, May 22, 2013

Ternary Operators (?:)


What Does Ternary Logic Look Like?

/* most basic usage */
$var = 5;
$var_is_greater_than_two = ($var > 2 ? true : false); // returns true

What Are The Advantages of Ternary Logic?
There are some valuable advantages to using this type of logic:
  • Makes coding simple if/else logic quicker
  • You can do your if/else logic inline with output instead of breaking your output building for if/else statements
  • Makes code shorter
  • Makes maintaining code quicker, easier