3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(mb_ereg_replace('\B', '|', 'abc'));
Output for 5.6.0 - 5.6.24, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.30, 8.0.0 - 8.0.23, 8.1.0 - 8.1.10
string(6) "a||b|c"

preferences:
40.59 ms | 410 KiB | 5 Q