I'm experienced with php but I'm a novice to the php source and php extensions. I want to extend php so that it randomly chooses an upload_tmp_dir from an array, rather than one fixed dir.
It doesn't look like php and the ini-file reading code has any natural ability to parse arrays in the ini file.
Is there any existing code or extension (either in the tree or outside it) that allows for mapping an ini-defined array to a global array val in php?
Otherwise I guess I'll introduce ini vals like "num_upload_dirs" and then "upload_tmp_dir_1" and "upload_tmp_dir_2" etc. and then explicitly check for all vals.
OR write the line-parsing and global-array-creating routines myself into the ini-file reader. Neither are very appealing. Any other suggestions?
The ini file format doesn't support arrays.
You will be best served by doing uplaod_tmp_dir_1 etc. You get no benefit from using array syntax.
It is actually fewer bytes if you think about it. ;)