3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a(int $int1, int2 $int2 = null) { return $int1 + $int2; } function b(int $int1, ?int $int2) { return $int1 + $int2; } var_dump(a(1)); var_dump(b(1));
Output for git.master, git.master_jit, rfc.property-hooks
int(1) Fatal error: Uncaught ArgumentCountError: Too few arguments to function b(), 1 passed in /in/IWsqK on line 12 and exactly 2 expected in /in/IWsqK:7 Stack trace: #0 /in/IWsqK(12): b(1) #1 {main} thrown in /in/IWsqK 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:
27.32 ms | 405 KiB | 5 Q