3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Return type declaration, // how does it work with nullable declaration // and void / null / nothing returned ... function return_null_or_void_1(): ?string { return null; } function return_null_or_void_2(): ?string { return; } function return_null_or_void_3(): ?string { // return; } var_dump(return_null_or_void_1()).'<br>'; var_dump(return_null_or_void_2()).'<br>'; var_dump(return_null_or_void_3()).'<br>';
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: A function with return type must return a value (did you mean "return null;" instead of "return;"?) in /in/5NTvg on line 12
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:
130.65 ms | 995 KiB | 7 Q