- https://joind.in/talk/view/13174
- http://ddd.io/2015/01/26/review-of-the-unofficial-ddd-track-for-phpbenelux-2015/
- http://www.freeklijten.nl/home/2015/01/24/PHP-Benelux-conference
- https://twitter.com/sgrame/status/558954481359282176/photo/1
- http://www.future500.nl/articles/2015/01/phpbenelux-2015-revisited/
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 | |
$request = \Zend\Http\Request::fromString( | |
<<<REQ | |
GET /?foo=bar HTTP/1.1\r\n\r\n | |
REQ | |
); | |
var_dump($request->getQuery()->get('foo')); | |
// Expected "bar", got null |
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
class MyClass | |
{ | |
/** | |
* Lots of comments | |
*/ | |
public function importantMethodAtTheTop() | |
{ // braces on new lines | |
// lots of newlines to create structure |
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 | |
// test data | |
class Foo { | |
private $a; | |
private $b; | |
function __construct($a, $b) | |
{ |
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 | |
$dispatcher = new EventDispatcher; | |
class SendWelcomeEmail implements QueuedEventHandler { | |
public function when(Event $event) { | |
// delegate to whenUserHasRegistered, whenFoo.. | |
} | |
private function whenUserHasRegistered(UserHasRegistered $event) { |
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 __DIR__ . '/../src/Verraes/Lambdalicious/load.php'; | |
// non generic, only deals with functions with arity=2 | |
function curry($f) { | |
return function($x) use($f) { | |
return function($y) use($f, $x) { | |
return $f($x, $y); | |
}; | |
}; |
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 __DIR__ . 'path/to/src/Verraes/Lambdalicious/load.php'; | |
assert( | |
isatom(@my_atom) | |
); | |
atom(@my_atom); | |
assert( | |
isatom(my_atom) |
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
-module(bla). | |
-compile(export_all). | |
a_friend(_, []) -> false; | |
a_friend(_, _) -> true. | |
main() -> | |
multiremberco(tuna, [strawberries, tuna, swordfish], fun a_friend/2). | |
multiremberco(_Atom, [], Cont) -> |
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 | |
final class Basket implements RecordsEvents | |
{ | |
private $basketCanOnlyContainFiveProducts; | |
private function __construct() | |
{ | |
$this->basketCanOnlyContainFiveProducts = new BasketCanOnlyContainFiveProducts(); | |
} |
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 mathiasverraes on github. | |
* I am mathiasverraes (https://keybase.io/mathiasverraes) on keybase. | |
* I have a public key whose fingerprint is 3BCD D69A 3CBA E8EE 380A BA63 C938 C231 E989 3D78 | |
To claim this, I am signing this object: |