command | description |
---|---|
ctrl + a | Goto BEGINNING of command line |
This gist is about:
- https://twitter.com/taylorotwell/status/600680897550098432
- https://twitter.com/Ocramius/status/600705252539691008
Mainly:
function
cannot (should not) be used when side-effects occur
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 declare(strict_types = 1); | |
function testPerformance($name, Closure $closure, $runs = 1000000) | |
{ | |
$start = microtime(true); | |
for (; $runs > 0; $runs--) | |
{ | |
$closure(); | |
} | |
$end = microtime(true); |
A list of requirements:
- stakeholders expect a list of provided features, every few days, in a human-friendly report
- every change must have been reviewed, before being deployed
- every change must have passed our automated checks, before being deployed
- every change must have been verified by QA staff, before being deployed
I had an interesting use-case with a customer for which I provide consulting services: they needed multiple fields to be marked as "optional".
We will take a CRUD-ish example, for the sake of simplicity.
For example, in the following scenario, does a null
$description
mean "remove the description",