3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arryvalue = array( "a","b","c","d","e","f" ); $samp = ""; foreach ($arryvalue as $vales) { $samp = $samp."". $vales; if (next($arryvalue)) { $samp = $samp."". $vales.","; } else{ $samp = $samp.","; } } echo rtrim($samp,",");
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
aa,bb,cc,dd,ee,f
Output for 5.3.7 - 5.6.28
aa,bb,cc,dd,e,f