This is available as Legacy_FIXME\lt in the www repository.
Does the PHP style behaviour when doing <, <=, >, >=, <=>
namespace HH\Lib\Legacy_FIXME;
function lt(
  mixed $l,
  mixed $r,
): bool;
tl/dr this involves a lot of potential implicit coercions. see __cast_and_compare for the complete picture.
mixed $lmixed $rbool