XS Labs

This is why PHP rocks

by pompo500 on Aug.19, 2010, under Software

PHP lets you concentrate on the most important part of software development: the problem itself. If you manage to put together hig-level APIs that do most of the work for you, then it’s easy as this.

The previous function GetMatchDuration() would be implemented without this library somewhat like this:

$SQL = ‘SELECT MINUTE(MatchEnds – MatchStarts) FROM matches WHERE MatchID = ‘.mysql_escape_string($MatchID);

if(!($Query = mysql_query($SQL)))

return false;

if(!($Row = mysql_fetch_row($Query)))

return false;

return $Row[0];

Quite a lot prettier in the picture, huh?

PHP effin’ rocks.


Leave a Reply

Public service announcement

From the council of desultory bulletins:

The rate, at which feces fly, is simply stunning compared to the ionized gaps between nanoparticles upon impact of the floral microscopic patterns of neutron stars.
You should think about it for a moment. After all, it affects the longevity of random synergized spatulas.