3v4l.org

run code in 300+ PHP versions simultaneously
<?php const POSITION_KEY = 0; const POSITION_VAL = 2; const POSITION_DESC = 1; $key = 'key'; $val = 'val'; $desc = 'desc'; $arr = array( POSITION_KEY => $key, POSITION_VAL => $val, POSITION_DESC => $desc, ); echo kimplode('=',$arr); // key=desc=val echo '<br>'; echo krimplode('=',$arr); // val=desc=key function kimplode($glue,$arr){ ksort($arr); return implode($glue,$arr); } function krimplode($glue,$arr){ krsort($arr); return implode($glue,$arr); }
Output for git.master, git.master_jit, rfc.property-hooks
key=desc=val<br>val=desc=key

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:
45.95 ms | 401 KiB | 8 Q