<?php 
 
ini_set("error_reporting", E_ALL); 
ini_set("display_errors", true); 
 
require_once __DIR__ . "/GPC_Validate.class.php"; 
 
$_GET['id'] = 22; 
$_GET['name'] = "nicolas"; 
$_GET['nodes'] = array("a"=>12, 13, 14); 
$_GET['matrix'] = array("a"=>array("b"=>14), 13, 14); 
 
$_GET = new GPC_Validate($_GET); 
 
echo $_GET->getInt("id") . chr(10); 
 
echo $_GET->getString("name", "HTML") . chr(10); 
echo $_GET["nodes"]->getInt("a") . chr(10); 
 
$nodes = $_GET["nodes"]; 
 
echo $_GET["matrix"]["a"]->getInt("b"); 
 
foreach ($nodes as $key=>$value) { 
    echo $key .chr(10);#cannot use the key null value returned 
    echo $value->toInt() .chr(10); 
} 
 
 |