3v4l.org

run code in 300+ PHP versions simultaneously
<?php $makefoo = true; /* 我们不能在处调用foo()函数, 因为它还不存在,但可以调用bar()函数。*/ bar(); if ($makefoo) { function foo() { echo "I don't exist until program execution reaches me.\n"; } } /* 现在我们可以安全调用函数 foo()了, 因为 $makefoo 值为真 */ if ($makefoo) foo(); function bar() { echo "I exist immediately upon program start.\n"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
I exist immediately upon program start. I don't exist until program execution reaches me.

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:
42.05 ms | 401 KiB | 8 Q