3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Antes de PHP 8.1, se podían utilizar números decimales que PHP // convertía a enteros quitando la parte decimal. // Todavía se puede hacer, pero PHP genera errores E_DEPRECATED print "<p>" . intdiv(17.1, 3.1) . "</p>\n"; print "<p>" . 17.1 % 3.1 . "</p>\n"; ?>
Output for 8.1.30, 8.2.23 - 8.2.25, 8.3.5 - 8.3.13
Deprecated: Implicit conversion from float 17.1 to int loses precision in /in/QKJUr on line 6 Deprecated: Implicit conversion from float 3.1 to int loses precision in /in/QKJUr on line 6 <p>5</p> Deprecated: Implicit conversion from float 17.1 to int loses precision in /in/QKJUr on line 7 Deprecated: Implicit conversion from float 3.1 to int loses precision in /in/QKJUr on line 7 <p>2</p>
Output for 8.0.30
<p>5</p> <p>2</p>

preferences:
57.18 ms | 407 KiB | 5 Q