- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
- preg_split: documentation ( source)
<?php
$str = 'e |a\\|b\\\\|c\\\\\\|d\\';
preg_match_all('/(?:[^\x5c\|]|\x5c(?:.|$))+/', $str, $matches);
var_dump($str, $matches[0]);
$result = preg_split('/(?<!\x5c)(?:\x5c.)*\K\|/s', $str);
var_dump($result);