title: Accessing PHP object properties when property name has non allowed chars
body: <p>I need to access a php object property which I specify as variable.</p>
  
  <p>$phpObj->$property</p>
  
  <p>This $property might contain chars like dash(-), quotes, percent, even whitespace ect. PHP does not allow these chars to be used as variable names, resulting which I am unable to access these properties.</p>
  
  <p>What would be a good solution to handle this? I'm open with encoding the $property to something alphanumeric first and then using it as property variable but this encoding should be unique for a particular string. </p>
  
  <p>Eg, I want to make sure that $phpObj->First-Prop and $phpObj->first-prop  should be identified differently.</p>