Php If Text In String Python Methods