3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '1d20+3d6-4d8+10'; print_r(preg_split('/(?=[+-])/', $string));

preferences:
33.9 ms | 405 KiB | 5 Q