Python-like string slices in PHP