3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function testFloat(): float { return 1; } var_dump(is_float(testFloat())); var_dump(is_float(1)); function testInteger(): int { return 1; } var_dump(is_int(testInteger())); var_dump(is_int(1));
based on OmevY
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.28, 7.4.0 - 7.4.13, 8.0.0 - 8.0.3
bool(true) bool(false) bool(true) bool(true)