3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); ini_set('display_errors', TRUE); $loc_de = setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); date_default_timezone_set('Europe/Berlin'); $string = "B 20:15, H 21:00, H 21:00, H 21:15, M 22:30, H 21:30, R 00:00, R 23:30, M 22:30, M 22:45, M 22:45, H 21:30, R 23:35"; $ergebnis = explode(", ", $string); asort($ergebnis); $ergebnis1 = array_unique($ergebnis, SORT_STRING); $string_neu = ""; foreach($ergebnis1 AS $a){ if (!strpos($string_neu, substr($a, 0, 1))) { $string_neu .= $a .', '; } } echo substr($string_neu, 0, -2);
Output for git.master, git.master_jit, rfc.property-hooks
B 20:15, H 21:00, M 22:30, R 00:00

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