3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "Deri Renk|kırmızı-siyah-beyaz-sarı-lacivert,kadife Renk|kırmızı-sarı"; $list = explode(",", $input); $list1 = []; foreach( $list as $item ) { list($key,$data) = explode("|", $item); $list1[$key] = explode("-", $data); } foreach ( $list1 as $heading=>$out ) { echo "<div><h1>$heading</h1><ul>\n"; echo "<li>".implode("</li><li>",$out)."</li>\n"; echo "</ul</div>\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
<div><h1>Deri Renk</h1><ul> <li>kırmızı</li><li>siyah</li><li>beyaz</li><li>sarı</li><li>lacivert</li> </ul</div> <div><h1>kadife Renk</h1><ul> <li>kırmızı</li><li>sarı</li> </ul</div>

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:
170.99 ms | 405 KiB | 5 Q