Php Access Global Variable In Function In Python Syntax If Else Statement