3v4l.org

run code in 300+ PHP versions simultaneously
<?php //unset($a); $b = ['translator' => 5]; function testA() { // global $a; return $a['translator']->transChoice($args[0]); } function testB() { global $b; return $b['translator']->transChoice($args[0]); } testA();
Output for git.master, git.master_jit
Warning: Undefined variable $a in /in/FPfUC on line 6 Warning: Trying to access array offset on value of type null in /in/FPfUC on line 6 Fatal error: Uncaught Error: Call to a member function transChoice() on null in /in/FPfUC:6 Stack trace: #0 /in/FPfUC(12): testA() #1 {main} thrown in /in/FPfUC on line 6
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $a in /in/FPfUC on line 6 Warning: Trying to access array offset on null in /in/FPfUC on line 6 Fatal error: Uncaught Error: Call to a member function transChoice() on null in /in/FPfUC:6 Stack trace: #0 /in/FPfUC(12): testA() #1 {main} thrown in /in/FPfUC on line 6
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:
39.97 ms | 401 KiB | 8 Q