I hereby claim:
- I am davidstanley01 on github.
- I am davidstanley01 (https://keybase.io/davidstanley01) on keybase.
- I have a public key ASDgJerxBZNNodWKDiHtx4MPQsGCaa1OBD0Vx8dOB1Mg-wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| // Given 2 collections of nested, indexed arrays, | |
| // find the items in the first array that are not | |
| // found in the second array using a given key | |
| // in this example, find items in $collection1 that | |
| // are not found in $collection2, and return all of | |
| // them as a new collection | |
| $collection1 = collect([ | |
| ['product' => 'Desk', 'price' => 200], |
| <?php | |
| function getFizzBuzz($max) { | |
| for ($i = 0; $i < $max; $i++) { | |
| $string = null; | |
| $string = ($i % 15) === 0 && is_null($string) ? 'FizzBuzz' : null; | |
| $string = ($i % 3) === 0 && is_null($string) ? 'Fizz' : $string; | |
| $string = ($i % 5) === 0 && is_null($string) ? 'Buzz' : $string; | |
| yield $string; |