(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 -D

Deprecated: The (real) cast is deprecated, use (float) instead -D
1

After

PHP Parse error:  The (real) cast has been removed, use (float) instead -D

Parse error: The (real) cast has been removed, use (float) instead -D

PHP version change

This behavior changed in 8.0

Error Messages