def php_str_noquotes(data):
 encoded = ''
 for char in data:
  encoded += 'chr({0}).'.format(ord(char))
 return encoded[:(-1)]

def php_str_noquotes ( data ) : encoded = '' for char in data : encoded += 'chr({0}).' . format ( ord ( char ) ) return encoded [ : ( - 1 ) ]
convert string to chr .