gracias, parece buena opción, cotilleando eso también he encontrado la constante PHP_OS que podría servir.
Pero al final la opción que he usado es:
Código PHP:
if (isset($_SERVER['WINDIR'])){
$domingo[$linea] = date("j", strtotime("sunday next week", $currentTime));
}else{
$domingo[$linea] = date("j", strtotime("sunday this week", $currentTime));
}