1、缓存数组到文件:
<?php $arr = array(2,3,5,76,7,8,22); $data = "<?php return ".var_export($arr, true)."; ?>"; file_put_contents("p.php",$data); ?>