(real) Is Replaced By (float)

(real) is replaced by (float) in PHP 8. It used to be a synonym of (float), and there is only one left.

PHP code

<?php

print (real) 1;


?>

Before

PHP Deprecated:  The (real) cast is deprecated, use (float) instead in /codes/real_cast.php on line 3

Deprecated: The (real) cast is deprecated, use (float) instead in /codes/real_cast.php on line 3
1

After

PHP Parse error:  The (real) cast has been removed, use (float) instead in /codes/real_cast.php on line 3

Parse error: The (real) cast has been removed, use (float) instead in /codes/real_cast.php on line 3

PHP version change

This behavior changed in 8.0

Error Messages