3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FizzBuzz { public function __call($n, $args) { return [0b10=>@Fizz,0b01=>@Buzz,0b11=>@FizzBuzz][(!($n%3)<<1)|!($n%5)]??$n; } } $fb = new FizzBuzz; var_dump($fb->{"0"}()); var_dump($fb->{"1"}()); var_dump($fb->{"2"}()); var_dump($fb->{"3"}()); var_dump($fb->{"4"}()); var_dump($fb->{"5"}()); var_dump($fb->{"6"}()); var_dump($fb->{"7"}()); var_dump($fb->{"8"}()); var_dump($fb->{"9"}()); var_dump($fb->{"10"}());
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "Fizz" in /in/l4F8j:7 Stack trace: #0 /in/l4F8j(12): FizzBuzz->__call('0', Array) #1 {main} thrown in /in/l4F8j on line 7
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:
60.3 ms | 401 KiB | 8 Q