3v4l.org

run code in 300+ PHP versions simultaneously
<?php $repl = [ '033' => 'FY', '101' => 'CY', '143' => 'AY', '147' => 'GG', '175' => 'CA' ]; $locationabbrev = '033-101-143-147-175'; $arr = explode("-", $locationabbrev); Foreach($arr as &$val){ $val= $repl[$val]; } $result = implode("-", $arr); Echo $result;
Output for git.master, git.master_jit, rfc.property-hooks
FY-CY-AY-GG-CA

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.9 ms | 405 KiB | 5 Q