Created
March 11, 2015 12:01
-
-
Save lorenzo/5de6cdf8dde9fb6d6b29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
$connection = new PDO(getenv('MYSQL')); | |
$looper = function () use ($connection) { | |
foreach ([1, 2, 3] as $number) { | |
yield $connection->query('select * from categories'); | |
} | |
}; | |
$list = (new \Cake\Collection\Collection($looper()))->map(function($r) { return $r; }); | |
iterator_to_array($list, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
composer require cakephp/collection=dev-master | |
php bug.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment