+ All Categories
Home > Lifestyle > PHP's Filter Module

PHP's Filter Module

Date post: 27-May-2015
Category:
Upload: chris-tankersley
View: 3,158 times
Download: 0 times
Share this document with a friend
Description:
An overview of PHP's Filt
Popular Tags:
16
PHP’s Filter Extension August 16, 2011 NWO-PUG 1 E-mail: [email protected] Twitter: @dragonmanta Identi.ca: dragonmanta
Transcript
Page 1: PHP's Filter Module

PHP’s Filter Extension

August 16, 2011 NWO-PUG 1

E-mail: [email protected]: @dragonmantankIdenti.ca: dragonmantank

Page 2: PHP's Filter Module

Who Are You and Why Are You In My House?

Chris Tankersley Doing PHP for 8 Years Lots of projects no one uses, and a

few that some do TL;DR

https://github.com/dragonmantank

April 26, 2011 NWO-PUG 2

Page 3: PHP's Filter Module

Some Background

Enabled by default since 5.2.0 Provides both Validation and

Sanitization Very easy to use to work with data Exposed via the filter_var() function

April 26, 2011 NWO-PUG 3

Page 4: PHP's Filter Module

Validation

Makes sure that data meets specifications An e-mail address looks like an e-mail address

Allows basic validation Boolean E-mail Float Int IP Regex URL

April 26, 2011 NWO-PUG 4

Page 5: PHP's Filter Module

Validating Data

April 26, 2011 NWO-PUG 5

Page 6: PHP's Filter Module

What Filters are Available?

April 26, 2011 NWO-PUG 6

Page 7: PHP's Filter Module

Sanitization

Removes data that does not meet specifications

Many more options with this

April 26, 2011 NWO-PUG 7

Page 8: PHP's Filter Module

Sanitizing Data

April 26, 2011 NWO-PUG 8

Page 9: PHP's Filter Module

What Sanitizers are Available?

April 26, 2011 NWO-PUG 9

Page 10: PHP's Filter Module

What Sanitizers are Available?

April 26, 2011 NWO-PUG 10

Page 11: PHP's Filter Module

Manual Filters

April 26, 2011 NWO-PUG 11

Page 12: PHP's Filter Module

filter_has_var

Used as further validation for data input

April 26, 2011 NWO-PUG 12

Page 13: PHP's Filter Module

April 26, 2011 NWO-PUG 13

Page 14: PHP's Filter Module

Questions?

April 26, 2011 NWO-PUG 14

Page 15: PHP's Filter Module

LinksWhere to Find Stuff I Talked About

April 26, 2011 NWO-PUG 15

Page 16: PHP's Filter Module

Links

Filter Documentation http://www.php.net/manual/en/

book.filter.php

April 26, 2011 NWO-PUG 16


Recommended