Determines if a PHP value would require single quoting in YAML.
string $value A PHP value:
Boolean True if the value would require single quotes.
public static function requiresSingleQuoting($value) {
return preg_match('/[ \\s \' " \\: \\{ \\} \\[ \\] , & \\* \\# \\?] | \\A[ - ? | < > = ! % @ ` ]/x', $value);
}