I have a few big arrays stored in separate files that are included into PHP as and when they are required:
<?php $cty_arr["af"] = "Afghanistan"; $cty_arr["ax"] = "Åland Islands"; $cty_arr["al"] = "Albania"; $cty_arr["dz"] = "Algeria"; $cty_arr["as"] = "American Samoa"; ... ?>
<?php require("/var/www/include/array_file.php"); ... ?>
I am not very sure how PHP utilizes memory, but I have this thought that some RAM is allocated to store the big array for each instance that the script is run. Since these arrays are static, could there be a better way of loading such arrays to achieve some memory savings?