Php String Replace All Python Functions