Is char *envp[] as a third argument to main() portable

The function getenv is the only one specified by the C standard. The function putenv, and the extern environ are POSIX-specific. EDIT The main parameter envp is not specified by POSIX but is widely supported. An alternative method of accessing the environment list is to declare a third argument to the main() function: int main(int … Read more

Required parameter $xxx follows optional parameter $yyy

This style of function declaration has been deprecated in PHP 8.0. Writing functions like this has never made sense, since all parameters (up to the last required one) would need to be specified when the function was called. It also caused confusion with use of the ReflectionFunctionAbstract class to analyze functions and methods. The new … Read more