Skip Navagation

Full On Design

A Web Development & Technology Blog

 

How to use the Filter Functions in PHP

When I started learning PHP (Back in the PHP4 days) validating data was always a pain (for me at least). Most of the resources available cited the POSIX functions as the most effective way of validating an email address or URL.

Thankfully since then, the PHP community has embraced the PCRE functions which are more efficient and are Perl-compatible. However the downside to PCRE (and POSIX for that matter) is that you need to know regular expressions, which for a newbie to learn can feel like walking through a minefield.

Recently though the Filter Functions have become a very popular method to validate data. This is due to their small learning curve.

How to use the Filter Functions

In this example (Using the filter_var() function) the filter function takes the data you input (For example: email@example.com) and will return either the data (if it’s valid) or false (if the data is not valid).

Read the rest of this entry »

What is the future of the UI?

I’m sure most of you have watched Minority Report and thought that the computer interface they use in it is pretty awesome. But have you ever wondered how long it will be until we have a system like that available for the average user?

This talk by John Underkoffler at TED shows that the technology is available today: