mustangostang / spyc

A simple YAML loader/dumper class for PHP
MIT License
701 stars 207 forks source link

Support hexadecimal values. #32

Closed tienvx closed 10 years ago

tienvx commented 10 years ago

Support hexadecimal values.

ryanuber commented 10 years ago

Hey @tienvx,

Good catch, looks like is_numeric() actually returns true for hex strings - I didn't know that! I'm thinking though, that perhaps a better fix would be to use ctype_digit() instead of is_numeric() here.

What do you think?

tienvx commented 10 years ago

I think ctype_digit() will return false if $value is float. So we should use is_numeric().