Php Turn String Into Array Python Memory