What is the scope of action on date_default_timezone_set in PHP?
I mean if I use:
function foo()
{
date_default_timezone_set('valid string'); /* where valid string is a valid date_default_timezone_set parameter */
echo (date('bla bla'));
}
after the use of foo() the dates will get back to normal/default time zone?
No, the scope is the lifetime of the executing script. Typically you call
date_default_timezone_setonce (on script initialization) and then just forget about it.