## Regex:
## ^[a-zA-Z_x80-xff][a-zA-Z0-9_x80-xff]*$
// PHP validate variable name
$regex = '/^[a-zA-Z_x80-xff][a-zA-Z0-9_x80-xff]*$/i';
// Valid
preg_match($regex, '_aas', $matches);
[
"_aas",
]
// Valid
preg_match($regex, '_validVariable', $matches);
[
"_validVariable",
]
// Valid
preg_match($regex, 'oth3r_valid_variable', $matches);
[
"oth3r_valid_variable",
]
//Invalid
preg_match($regex, 'invalid Variable', $matches);
[]
//Invalid
preg_match($regex, '0th3r_invalid_vriable', $matches);
[]
//Invalid
preg_match($regex, '0th3r_invalid_variable', $matches);
[]