PHP Modify Variable

There is a PHP file called test2.php,the code is in follow:

<?php
$data=array(
    'name' => 'jack',
    'age' => 8,
);
?>

I want to modify the $data in anoher php file called test1.php,
but i find that if only use:

require_once "./test2.php";
$data['age']=10;
echo $data['age'];

Although the output is 10,but $data in test2.php dosen’t change.

I want to know how to edit a PHP file in anoher PHP file.