- var_dump: documentation ( source)
- end: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$text = '9 - 1';
preg_match_all('/\d+/', $text, $out);
var_dump(end($out[0]));
$text = '5-3';
preg_match_all('/\d+/', $text, $out);
var_dump(end($out[0]));