<?php $arr = [66, 233, 204, 205]; $res = array_reduce( $arr, function($c,$i) { $c.=dechex( $i ); return $c; }); $temp = "0x" . $res; $int = filter_var( $temp, FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ); if (false === $int) { throw new Exception("Invalid integer!"); } $arr = (unpack('f', pack('i', $int ))); $f = array_pop($arr); printf("%.3f",$f);
You have javascript disabled. You will not be able to edit any code.