Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Michael Wilson michaelpwilson

🎯
Focusing
View GitHub Profile
@michaelpwilson
michaelpwilson / Horse.php
Created Aug 28, 2014
Feed a horse with PHP5
View Horse.php
<?php
class Horse {
// Calculate when the Horse needs feeding
public function calculate() {
// Check if there is session data about the Horse's feedings
if($_SESSION["last_feeding"]) {
$lastFeeding = $_SESSION["last_feeding"];