php static 聲明的變量在函數執行完畢不會被刪除;

<?php function myTest() { static $x=0; echo $x; $x++; } myTest(); myTest(); myTest(); ?>
相關文章
相關標籤/搜索