3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{:de}Hallo Welt{:}{:en}Helo world{:}'; Preg_match_all("/\{:(.*?)}(.*?)\{/", $str, $matches); $matches = array_combine($matches[1], $matches[2]); Var_dump($matches);

preferences:
27.4 ms | 406 KiB | 5 Q