original_string: public static function is_valid_number(string $x) : bool {
          $ap = new qtype_numerical_answer_processor(array());
          list($value, $unit) = $ap->apply_units($x);
          return !is_null($value) && !$unit;
      }
code: public static function is_valid_number(string $x) : bool {
          $ap = new qtype_numerical_answer_processor(array());
          list($value, $unit) = $ap->apply_units($x);
          return !is_null($value) && !$unit;
      }
code_tokens: public static function is_valid_number ( string $ x ) : bool { $ ap = new qtype_numerical_answer_processor ( array ( ) ) ; list ( $ value , $ unit ) = $ ap -> apply_units ( $ x ) ; return ! is_null ( $ value ) && ! $ unit ; }
docstring: Validate that a string is a number formatted correctly for the current locale.
  @param string $x a string
  @return bool whether $x is a number that the numerical question type can interpret.
docstring_tokens: Validate that a string is a number formatted correctly for the current locale .