3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "12&Shoes&28&Jewelry&30&Watch&96&Beauty&98&Kids&Baby"; var_export( preg_match_all( '/(\d+)&([a-z]+(?:&[a-z]+)?)/i', $string, $m ) ? array_combine($m[1], $m[2]) : [] );

preferences:
25.47 ms | 406 KiB | 5 Q