<?php class exd { public $vars; protected $checkVars; protected $typeHttpVars; function __construct( $type, $args = '' ) { $this->typeHttpVars = $type; $this->vars = $args; $this->checkVars = $args; } function __get( $name ) { return $this->vars[\"$name\"]; } function __set( $name, $value ) { $this->vars[\"$name\"] = $value; } // czy nie jest wykorzystany function isUntapped() { return false; } } $_POST = new exd( post, $_POST ); $_GET = new exd( get, $_GET ); ?>
Do zmiennej dostajemy się przez $_GET->zmienna.
Czy jest inna możliwość, niż jak w tym przykładzie; sprawdzania które argumenty zostały wykorzstane?