PHP Classes

File: examples/example01_intParam.php

Recommend this page to a friend!
  Packages of Domenico Pontari   param   examples/example01_intParam.php   Download  
File: examples/example01_intParam.php
Role: Example script
Content type: text/plain
Description: In this example we retrieve an int param setted as string but returned as integer
Class: param
Validate and filter request values
Author: By
Last change:
Date: 16 years ago
Size: 556 bytes
 

 

Contents

Class file image Download
<?php
/**
 *  @package Param
 *  @author Domenico Pontari <fairsayan@gmail.com>
 *  @copyright Copyright (c) 2009, Domenico Pontari
 *  @license http://opensource.org/licenses/bsd-license.php New and Simplified BSD licenses
 *  @version 1.0
 *
 *  In this example we retrieve an int param setted as string but returned as integer
 */
 
    require_once ('../param.php');
    
    $myInt = param::register(array('name' => 'myParam', 'type' => PARAM_TYPE_INT));
    $myInt->value = "5";
    echo "Result: ";
    var_dump($myInt->value);

?>