- preg_match: documentation ( source)
- unserialize: documentation ( source)
- create_function: documentation ( source)
<?php
$fnc = create_function('$a', 'eval("\$GOLBALS[\'get\'] = $a;");');
function set1 ($value) {
global $fnc;
if(preg_match('/^[0-9]{1,9}$/D', $value) === 1)
$fnc($value);
}
function get1 () {
echo $GOLBALS['get'];
}
if (preg_match('/^.*1$/D', $_GET['set']) === 1)
$_GET['set'](unserialize($_GET['parm1']));