Php Create Json Array Python Definition Function