* Performs encoding of the given float value to a binary string * * XXX: This is not endian-aware! The Avro::checkPlatform() * called in AvroIOBinaryEncoder::__construct() should ensure the * library is only used on little-endian platforms, which ensure the little-endian * encoding required by the Avro spec. * * @param float $float * @
($float)
| 143 | * @see Avro::checkPlatform() |
| 144 | */ |
| 145 | public static function floatToIntBits($float) |
| 146 | { |
| 147 | return pack('g', (float) $float); |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * @param float $datum |