Match new PHP 7 implementation tests and fix incorrect to_float hex string validation