PHP type comparison tables Digest

Comparisons of $x with PHP functions
Expression gettype() empty() is_null() isset() boolean : if($x)
$x = “”; string TRUE FALSE TRUE FALSE
$x = null; NULL TRUE TRUE FALSE FALSE
var $x; NULL TRUE TRUE FALSE FALSE
$x is undefined NULL TRUE TRUE FALSE FALSE
$x = array(); array TRUE FALSE TRUE FALSE
$x = false; boolean TRUE FALSE TRUE FALSE
$x = true; boolean FALSE FALSE TRUE TRUE
$x = 1; integer FALSE FALSE TRUE TRUE
$x = 42; integer FALSE FALSE TRUE TRUE
$x = 0; integer TRUE FALSE TRUE FALSE
$x = -1; integer FALSE FALSE TRUE TRUE
$x = “1”; string FALSE FALSE TRUE TRUE
$x = “0”; string TRUE FALSE TRUE FALSE
$x = “-1”; string FALSE FALSE TRUE TRUE
$x = “php”; string FALSE FALSE TRUE TRUE
$x = “true”; string FALSE FALSE TRUE TRUE
$x = “false”; string FALSE FALSE TRUE TRUE

Continue reading “PHP type comparison tables Digest”

Regular Expressions Digest

here are some good tools and sources about RegEx:

http://www.regular-expressions.info/

http://regex101.com/

http://gskinner.com/RegExr/

http://regexpal.com/

http://regexlib.com/

4 easiest ways to install LAMP server on Ubuntu

In this guide I will show you the easiest way, how to install a LAMP server. LAMP stands for Linux, Apache, MySQL, PHP. There are many methods to install LAMP, for example the standart one see this howto for ubuntu: Howto: Install LAMP and phpMyAdmin on Ubuntu

Method One (using Terminal)

Under Terminal type command:

sudo tasksel

Select LAMP server and hit OK

Tasksel - select LAMP server

Continue reading “4 easiest ways to install LAMP server on Ubuntu”

Agile Toolkit All In One Digest – Part 2

Part 1 of all in one series:
http://webelizer.net/211/agile-toolkit-all-in-one-digest.html

Database Integration

Agile Toolkit features two basic classes for model creation. The class “Model” is a lightweight implementation for NoSQL and non-relational databases. “Model_Table” class provides a more powerful model implementation which can rely on the power of relational database…

Continue reading “Agile Toolkit All In One Digest – Part 2”