<?php

function strposNth($texto, $procurar, $n){
	switch($n){
		case $n === 0:
			return false;
			break;
		case $n === 1:
			return(strpos($texto, $encontrar) + 1);
			break;
		default:
			return(strpos($texto, $procurar, strposNth($texto, $procurar, $n - 1) +
			strlen($procurar)) + 1);
			break;
	}
}

echo strposNth("overflow", "o", 2);


