Probably every framework and programming language provides some functionality which is nice to have but not that essential. An example are the magic find functions in CakePHP. With this magic you can write the following statement to return all users named “Miller”:

$this->User->findAllByName('Miller');

The same statement without magic looks like:

$this->User->findAll(array('User.name' => 'Miller'));

CakePHP 1.2 introduces some more magic, it is now possible to define a “find” over multiple fields. Say, you want to find all users named “Miller” born in 1970. You can accomplish that with:

$this->User->findAllByNameAndYearOfBirth('Miller', 1970);

And without magic:

$this->User->findAll(array('User.name' => 'Miller', 'User.year_of_birth' => 1970));

As you see you have to type lesser thanks to the magic. You can also use OR in the magic find functions (but you cannot mix AND and OR). So to find all users named “Miller” and/or born in 1970 you can do:

$this->User->findAllByNameOrYearOfBirth('Miller', 1970);

And without magic:

$this->User->findAll(array('or' => array('User.name' => 'Miller', 'User.year_of_birth' => 1970)));

I am not sure if this will work with PHP4, as far as I remember you have to use a slightly different syntax.