This file contains 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
Starting benchmark, it takes several minutes... | |
1010 files | |
110 directories | |
10 iterations | |
9 cases | |
2 adapters |
This file contains 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
1010 files | |
110 directories | |
10 iterations | |
9 cases | |
2 adapters | |
case php gnu_find | |
0 1,407,415 958,688 | |
1 1,653,591 858,276 | |
2 4,286,048 1,183,027 |
This file contains 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
1010 files | |
110 directories | |
10 iterations | |
6 cases | |
2 adapters | |
case php gnu_find | |
0 1,471,663 1,022,287 | |
1 1,592,656 191,331 | |
2 1,643,954 744,985 |
This file contains 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
1010 files | |
110 directories | |
10 iterations | |
18 cases | |
2 adapters | |
case php gnu_find | |
0 873,349 125,462 | |
1 950,045 152,989 | |
2 1,035,071 128,547 |
This file contains 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
/** | |
* Je veux afficher les semaines et leur nombre d'évènements | |
* associés groupées par mois pour l'année 2011. | |
*/ | |
$year = new CalendarUnit($calendar, new TimeUnitInterval(TimeUnitFactory::year(), 2011)); | |
foreach ($year->getChildren(TimeUnitFactory::month()) as $month) { | |
echo 'Mois n°'.($month->getIndex() + 1)."\n"; |
This file contains 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
/** | |
* Content negotiator. | |
*/ | |
interface NegotiatorInterface | |
{ | |
/** | |
* Adds a qualifier. | |
* | |
* @param VariantQualifierInterface $qualifier | |
*/ |
This file contains 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_once 'vendor/autoload.php'; | |
$routes = new \Symfony\Component\Routing\RouteCollection(); | |
$routes->add('negotiation', new \Symfony\Component\Routing\Route( | |
'/negotiation.{_locale}.{_format}', | |
array(), | |
array('_locale' => 'fr|en|es', '_format' => 'html|xml'), | |
array('negotiate' => array('_locale', '_format')) |
This file contains 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
// fix previously broken serialized arrays content lengths | |
$content = preg_replace_callback( | |
'/s:(\d+):"(.*?)";/e', | |
function (array $matches) { | |
return sprintf('s:%s:"%s";', strlen($matches[1]), $matches[1]); | |
}, | |
$content | |
); |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am jfsimon on github. | |
* I am jfsimon (https://keybase.io/jfsimon) on keybase. | |
* I have a public key whose fingerprint is 6AEA 6B20 ECE1 0380 367E 0A0C F7BD 5638 1F9F 5811 | |
To claim this, I am signing this object: |