3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(int $foo) { var_dump($foo); } f(1); f(1.5); f("10"); f("10;gaklj");
Output for git.master, git.master_jit, rfc.property-hooks
int(1) Deprecated: Implicit conversion from float 1.5 to int loses precision in /in/hkdLE on line 3 int(1) int(10) Fatal error: Uncaught TypeError: f(): Argument #1 ($foo) must be of type int, string given, called in /in/hkdLE on line 10 and defined in /in/hkdLE:3 Stack trace: #0 /in/hkdLE(10): f('10;gaklj') #1 {main} thrown in /in/hkdLE on line 3
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:
49.14 ms | 401 KiB | 8 Q