Skip to content

Instantly share code, notes, and snippets.

@h3rj4n
Last active November 3, 2016 12:36
Show Gist options
  • Save h3rj4n/cdca994c9b9e6d4d1d5e792616580ed8 to your computer and use it in GitHub Desktop.
Save h3rj4n/cdca994c9b9e6d4d1d5e792616580ed8 to your computer and use it in GitHub Desktop.
<?php
// Include the autoload that includes our packages.
require_once 'vender/autoload.php';
// Test the debugging tool!
r('hallow testing');
// Keep track of count.
$i = 0;
// Er zijn 100 takken nodig om de boom op te bouwen.
$var = 100;
// Array containing all the branches.
$banches = [];
// Blijf uitvoeren tot het aantal takken berijkt is
while ($i > $var) {
// Add a branch to the array.
$banches[] = array(
'number' => $i,
'color' => get_random_color();
);
// Increase the count by one each time the loop is executed.
$i++;
}
// For debug purposes: dump the tree!
print_r($branches);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment