Skip to content

Instantly share code, notes, and snippets.

@stfalconaleks
Created October 26, 2017 14:13
Show Gist options
  • Save stfalconaleks/fc06e11beb2690e04d3817ebb0086c18 to your computer and use it in GitHub Desktop.
Save stfalconaleks/fc06e11beb2690e04d3817ebb0086c18 to your computer and use it in GitHub Desktop.
// Cut the carrot into 4 pieces
$piecesOfCarrot = $carrot / 4;
// Let the rabbit eat all pieces of carrot one by one
foreach ($piecesOfCarrot as $pieceOfCarrot) {
$rabbit->eat($pieceOfCarrot); // Rabbit eats the piece of carrot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment