3v4l.org

run code in 300+ PHP versions simultaneously
<?php // bcpowmod ( string $base , string $exponent , string $modulus [, int $scale = 0 ] ) : string // Returns the result as a string, or NULL if modulus is 0 or exponent is negative. // ^ false // modulus is 0 assert(is_bool(bcpowmod('2', '2', '0'))); // bcpowmod -> FALSE // exponent is negative assert(is_bool(bcpowmod('2', '-2', '2'))); // bcpowmod -> FALSE // Output proof var_dump(false === bcpowmod('2', '2', '0') && false === bcpowmod('2', '2', '0'));
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/co5Ge:8 Stack trace: #0 /in/co5Ge(8): bcpowmod('2', '2', '0') #1 {main} thrown in /in/co5Ge on line 8
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
151.8 ms | 405 KiB | 5 Q