Closed
Description
Description
Raising to a negative power is similar to a division, so applying those to 0 should raise a DivisionByZeroError
The following code:
<?php
echo 0 ** -1;
echo 0 ** -2;
echo pow(0, -4);
Resulted in this output:
INF
INF
INF
But I expected this output instead:
PHP Fatal error: Uncaught DivisionByZeroError: Division by zero
PHP Version
8.1.2
Operating System
N/A