fork download
  1. <?php
  2. function feetToInches( $height) {
  3. preg_match('/((?P<feet>\d+)\')?[\s\xA0]*((?P<inches>\d+)")?/', $height, $match);
  4. $inches = (($match['feet']*12) + ($match['inches']));
  5.  
  6. return $inches;
  7. }
  8. $val = urldecode('6%27%A03%22');
  9. echo feetToInches( $val);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
75