Hay muchas maneras de decir las cosas

Guardar este artículo en Delicious Compartir este artículo en Twitter Compartir este artículo en Facebook
<?php
/**
 * Notification to Berriart readers
 *
 * @package blog
 * @author Alberto Varela (artberri)
 * @version 2.0
 */

$artberri = new myself();

while( time() > strtotime("2009-07-03 19:00:00") && time() < strtotime("2009-07-15 09:30:00") ) {
	holidays($artberri);
}

function holidays($people) {
	if( time() > strtotime("2009-07-06 13:00:00") && time() < strtotime("2009-07-13 19:30:00") ) {
		holidays_in_menorca($people);
	}
	else {
		$people->eat();
		if( !$people->istired() && $people->isbored() ) {
			$people->party();
		}
		sleep(8*3600);
	}
}

function holidays_in_menorca($people) {
	$people->beach();
	$people->eat();
	$people->beach();
	if( !$people->istired() && $people->isbored() ) {
		$people->party();
	}
	sleep(8*3600);
}

?>
2 Comentarios
  1. Vicente

    Muy bueno, te lo has currado de verdad.

    Que pases buenas vacaciones.

  2. JT

    Buenísimo xD

    ¡Disfruta!

Deja un comentario