<?php
class bjorked {
public function do_non_static() {
echo 'before assignment: ', var_export($_REQUEST, true), "\n";
$_REQUEST = array();
echo 'after assignment: ', var_export($_REQUEST, true), "\n";
self::do_static();
}
public static function do_static() {
echo 'in ', __METHOD__, ': ', var_export($_REQUEST, true), "\n";
}
}
$_REQUEST['foo'] = 'bar';
$c = new bjorked();
echo 'before call: ', var_export($_REQUEST, true), "\n";
$c->do_non_static();
echo 'after call: ', var_export($_REQUEST, true), "\n";
preferences:
60.49 ms | 402 KiB | 5 Q