敲错了
<?php
print_r($_POST);
$_POST['test1']='testtest';
function test(){
$_POST['test2']='testaaa';
print_r($_POST);
}
test();
print_r($_POST);
?>