Changing built-in PHP variable to a local variable

Sometimes script can be simplified and makes debugging a lot easier as can be seen in this post