3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'a_global'; function foo() { $a = 'a_local'; var_dump($a); static $a; var_dump($a); $a = 'a_static'; var_dump($a); global $a; var_dump($a); } foo(); echo "---\n"; foo();
Output for git.master_jit, git.master, rfc.property-hooks
string(7) "a_local" NULL string(8) "a_static" string(8) "a_global" --- string(7) "a_local" string(8) "a_static" string(8) "a_static" string(8) "a_global"

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:
68.49 ms | 405 KiB | 5 Q