3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0 => "aaa", 1 => "bbb", 2 => "ccc", 3 => "bbb", 4 => "ddd", 5 => "ccc"]; end($array); $key = key($array); foreach($array as $k=>$v){ if($k !== $key){ print "${k}=>${v} まだ最後じゃないよ\n"; }else{ print "${k}=>${v} これが最後だよ\n"; } }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/E3Doe on line 16 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/E3Doe on line 16 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/E3Doe on line 18 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/E3Doe on line 18 0=>aaa まだ最後じゃないよ 1=>bbb まだ最後じゃないよ 2=>ccc まだ最後じゃないよ 3=>bbb まだ最後じゃないよ 4=>ddd まだ最後じゃないよ 5=>ccc これが最後だよ

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:
65.1 ms | 402 KiB | 8 Q