<?php$cadena="textotextotextonx00";$cuatroUltimos = substr($cadena, (strlen($cadena) - 4), 4);echo $cuatroUltimos; //imprime: nx00?>