Return null instead of false on cast failure
Update readme
To adhere to the principle of zero data-loss, to_int and to_float should reject leading 0, +
Add readme examples for empty string and leading 0, +
Fix empty string readme example
Update Packagist version in readme
Throw exceptions on cast failure instead of returning null
Add corresponding try_* functions which return null on failure
Don't output passed value in exception message (included in stack trace)
FormatException should extend base Exception class
Test valid casts with both to_* and try_* functions
Use CastException instead of DomainException and BadMethodCallException
Use CastException for all errors (rather than multiple exception types)
CastException should extend RuntimeException
to_int and to_float should accept leading + sign
Update error messages to match official implementation
Update readme
Fix comment
Use regular expressions as alternative to FILTER_VALIDATE_FLOAT