3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_SESSION ['test'] [ 't****' ] = 'Hello'; var_dump($_SESSION); echo "\n" . $_SESSION [ 'test' ] [ 't****' ]; $var = "test2"; for ($i = 4 ; $i > 0 ; $i--){ $var [$i] = "*"; echo "\n" . $_SESSION['test'][$var]; } $var = "test2"; for ($i = 0 ; $i < 4 ; $i++){ $var = substr($var, count($var)-1, -$i) . '*'; echo "\n" . $_SESSION['test'][$var]; }
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["test"]=> array(1) { ["t****"]=> string(5) "Hello" } } Hello Warning: Undefined array key "test*" in /in/A5AID on line 12 Warning: Undefined array key "tes**" in /in/A5AID on line 12 Warning: Undefined array key "te***" in /in/A5AID on line 12 Hello Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /in/A5AID:18 Stack trace: #0 {main} thrown in /in/A5AID on line 18
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:
33.68 ms | 402 KiB | 8 Q