SlideShare a Scribd company logo
{unctionalStructures
byMarcelloDuarte
@_md
f inPHP
@_md#phpbnl17
Expressinganything
@_md#phpbnl17
@_md#phpbnl17
categorytheory
@_md#phpbnl17
categorytheory
somecoolstructures
somearrows
somelaws
{
@_md#phpbnl17
A B
@_md#phpbnl17
A B
"PHPBenelux" 10
@_md#phpbnl17
A B
"PHPBenelux" 10
@_md#phpbnl17
A B
"PHPBenelux"
f
10
@_md#phpbnl17
B
10
C
true
@_md#phpbnl17
B
10
C
true
@_md#phpbnl17
B
10
C
true
g
@_md#phpbnl17
@_md#phpbnl17
github.com/phunkie/phunkie
@_md#phpbnl17
SEMIGROUPS
@_md#phpbnl17
https://upload.wikimedia.org/wikipedia/commons/c/c2/Falkland_Islands_Penguins_40.jpg
@_md#phpbnl17
combine(1, 2) == 3;
combine("a", "b") == "ab";
combine(true, false) == false;
@_md#phpbnl17
h
@_md#phpbnl17
$f = function(string $a): int {
return strlen($a);
};
@_md#phpbnl17
$f = function(string $a): int {
return strlen($a);
};
$g = function(int $b): bool {
return $b % 2 === 0;
};
@_md#phpbnl17
$f = function(string $a): int {
return strlen($a);
};
$g = function(int $b): bool {
return $b % 2 === 0;
};
$h = combine($f, g);
$h("PHPBenelux") == true;
@_md#phpbnl17
combine($f, g) == compose ($f, $g)
// if $f and $g are functions
@_md#phpbnl17
compose ("strlen", odd, Option, ...)
@_md#phpbnl17
laws
@_md#phpbnl17
combine(combine(1, 2), 3) == combine(1, combine(2, 3))
associativity
@_md#phpbnl17
MONOIDS
@_md#phpbnl17
https://upload.wikimedia.org/wikipedia/commons/c/c2/Falkland_Islands_Penguins_40.jpg
@_md#phpbnl17
$identity = function ($x) {
return $x;
};
A
"PHPBenelux"
i
@_md#phpbnl17
zero(42) == 0;
zero("any string") == "";
zero(true, false) == true;
@_md#phpbnl17
laws
@_md#phpbnl17
combine(combine(1, 2), 3) == combine(1, combine(2, 3))
combine(zero($x), $x) == $x
combine($x, zero($x)) == $x
associativity
(left and right) identity
@_md#phpbnl17
interface Monoid extends Semigroup {

public function zero();
// inherited from Semigroup
public function combine($another);
}
@_md#phpbnl17
interface Monoid extends Semigroup {

public function zero();
// inherited from Semigroup
public function combine($another);
}
class Balance implements Monoid { // ... }
@_md#phpbnl17
$deposit100bucks = function(Balance $b) {
return $b->plus(100);
}



$listOfBalances->foldMap($deposit100bucks);
@_md#phpbnl17
FUNCTORS
@_md#phpbnl17
https://upload.wikimedia.org/wikipedia/commons/3/3b/World_Map_1689.JPG
@_md#phpbnl17
kinds
@_md#phpbnl17
proper
{
@_md#phpbnl17
givemeanumber
@_md#phpbnl17
42givemeanumber
@_md#phpbnl17
givemeaword
@_md#phpbnl17
givemeaword "cabuzle"
@_md#phpbnl17
proper
first-order{
@_md#phpbnl17
givemealist
@_md#phpbnl17
givemealist …
@_md#phpbnl17
givemealist alistofwhat?
@_md#phpbnl17
ImmList(1,2,3)
// List<Int>

ImmList("a thing", "another thing")
// List<String>

@_md#phpbnl17
ImmList(1,2,3)
// List<Int>

ImmList("a thing", "another thing")
// List<String>
@_md#phpbnl17
abstract class Option {}
class Some extends Option {}
class None extends Option {}
@_md#phpbnl17
phunkie > Option(42)
$var0: Option<Int> = Some(42)
phunkie > Option(null)
$var1: None = None




@_md#phpbnl17
phunkie > $f = compose(mayBeRubish, Option)

phunkie > $f(42)
$var0: None = None




@_md#phpbnl17
proper
first-order
higherorder
{
@_md#phpbnl17
function fmap(Mappable $mappable, callable $f) {
return $mappable->map($f);
}
@_md#phpbnl17
$listOfWords = ImmList("guacamole", "nose", "penguin");
$lengths = fmap ("strlen") ($listOfWords);
// List (9, 4, 7)
@_md#phpbnl17
$maybeSomeGuaca = Option("guacamole");
$length = fmap ("strlen") ($maybeSomeGuaca);
// Some (9)
@_md#phpbnl17
$maybeSomeGuaca = Option("guacamole");
$length = fmap ("strlen") ($maybeSomeGuaca);
// Some (9)
$maybeSomeGuaca = Option(null);
$length = fmap ("strlen") ($maybeSomeGuaca);



// None
@_md#phpbnl17
// Already Mappable in Phunkie
ImmList
Option
Function1
Validations (Either)
// Planned
ImmMap
ImmSet
Tuples (inc. Pair)
@_md#phpbnl17
laws
@_md#phpbnl17
$fa == fmap(identity)($fa)
fmap(compose($f, $g))($fa) == fmap($g)(fmap($f)($fa))
covariant identity
covariant composition
@_md#phpbnl17
APPLICATIVE
@_md#phpbnl17
https://upload.wikimedia.org/wikipedia/commons/5/5c/Brick_and_block_laying.jpg
@_md#phpbnl17
interface Apply extends Functor

{
public function apply($ff);

public function map2($fb, callable $f);

}
interface Applicative extends Apply

{

public function pure($a);

}
@_md#phpbnl17
/**
* @param A $a
* @return FirstOrderKind<A>
*/
function pure($a)
@_md#phpbnl17
/**
* @param A $a
* @return FirstOrderKind<A>
*/
function pure($a)
Option()->pure(42);
// Some(42)
@_md#phpbnl17
/**
* @param A $a
* @return FirstOrderKind<A>
*/
function pure($a)
Option()->pure(42);
// Some(42)
ImmList()->pure(42);
// ImmList(42)
@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
$increment = function($x){ return $x + 1;};


@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
Some(1)->apply(Some($increment));
@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
Some(1)->apply(Some($increment));
// Some(2)

@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
Some(1)->apply(Some($increment));
// Some(2)

None()->apply(Some($increment));

@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
Some(1)->apply(Some($increment));
// Some(2)

None()->apply(Some($increment));

// None
@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
Some(1)->apply(Some($increment));
// Some(2)

None()->apply(Some($increment));

// None
ImmList(1,2,3)->apply(ImmList($increment));

@_md#phpbnl17
/**
* @param FirstOrderKind<callable<A,B>> $ff
* @return FirstOrderKind<B>
*/
function apply($ff)
Some(1)->apply(Some($increment));
// Some(2)

None()->apply(Some($increment));

// None
ImmList(1,2,3)->apply(ImmList($increment));

// ImmList(2,3,4)
@_md#phpbnl17
/**
* @param FirstOrderKind<B> $fb
* @param (A, B) => C $
* @return FirstOrderKind<C>
*/
function map2($fb, callable $f)
@_md#phpbnl17
/**
* @param FirstOrderKind<B> $fb
* @param (A, B) => C $
* @return FirstOrderKind<C>
*/
function map2($fb, callable $f)
Some(1)->map2(Some(2), function($x, $y) { return $x + $y; });;
@_md#phpbnl17
/**
* @param FirstOrderKind<B> $fb
* @param (A, B) => C $
* @return FirstOrderKind<C>
*/
function map2($fb, callable $f)
Some(1)->map2(Some(2), function($x, $y) { return $x + $y; });;
@_md#phpbnl17
/**
* @param FirstOrderKind<B> $fb
* @param (A, B) => C $
* @return FirstOrderKind<C>
*/
function map2($fb, callable $f)
Some(1)->map2(Some(2), function($x, $y) { return $x + $y; });;
// Some(3)

@_md#phpbnl17
/**
* @param FirstOrderKind<B> $fb
* @param (A, B) => C $
* @return FirstOrderKind<C>
*/
function map2($fb, callable $f)
Some(1)->map2(Some(2), function($x, $y) { return $x + $y; });;
// Some(3)

ImmList(1,2)->map2(ImmList(4,5),
function($x, $y) { return $x + $y; });

@_md#phpbnl17
/**
* @param FirstOrderKind<B> $fb
* @param (A, B) => C $
* @return FirstOrderKind<C>
*/
function map2($fb, callable $f)
Some(1)->map2(Some(2), function($x, $y) { return $x + $y; });;
// Some(3)

ImmList(1,2)->map2(ImmList(4,5),
function($x, $y) { return $x + $y; });

// ImmList(5,6,6,7)
@_md#phpbnl17
laws
@_md#phpbnl17
$fa->apply($fa->pure(identity)) == $fa
$fa->pure($a)->fa->apply($fa->pure($f)) ==

$fa->pure($f($a))
identity
homomorphism
@_md#phpbnl17
$fa->pure($a)->apply ==

$fab->apply($fa->pure(function($f)use($a){return $f($a)}))
$fa->map($f) == $fa->apply($fa->pure($f))
interchange
map
@_md#phpbnl17
whywouldyoueveruseafunctor?
@_md#phpbnl17
weakertypesaremorepredictable
@_md#phpbnl17
$xs = fmap (ImmList(1,2,3)) ($f);
echo $xs->length;
@_md#phpbnl17
MONADS
@_md#phpbnl17
https://upload.wikimedia.org/wikipedia/commons/b/bd/Golden_tabby_and_white_kitten_n01.jpg
@_md#phpbnl17
interface FlatMap extends Functor

{
public function flatMap(callable $f);

}
interface Monad extends FlatMap

{

public function flatten();

}
@_md#phpbnl17
/**
* @param (A) -> FirstOrderKind<B> $a
* @return FirstOrderKind<B>
*/
function flatMap($a)
@_md#phpbnl17
/**
* @param (A) -> FirstOrderKind<B> $a
* @return FirstOrderKind<B>
*/
function flatMap($a)
Option(42)->flatMap(function($x) { return Some($x + 1); });
@_md#phpbnl17
/**
* @param (A) -> FirstOrderKind<B> $a
* @return FirstOrderKind<B>
*/
function flatMap($a)
Option(42)->flatMap(function($x) { return Some($x + 1); });
@_md#phpbnl17
/**
* @param (A) -> FirstOrderKind<B> $a
* @return FirstOrderKind<B>
*/
function flatMap($a)
Option(42)->flatMap(function($x) { return Some($x + 1); });
@_md#phpbnl17
/**
* @param (A) -> FirstOrderKind<B> $a
* @return FirstOrderKind<B>
*/
function flatMap($a)
Option(42)->flatMap(function($x) { return Some($x + 1); });
// Some(43)
@_md#phpbnl17
/**
* @param (A) -> FirstOrderKind<B> $a
* @return FirstOrderKind<B>
*/
function flatMap($a)
Option(42)->flatMap(function($x) { return Some($x + 1); });
// Some(43)
ImmList(1,2,3)->flatMap(function($x) {
return Option($x % 2 === 0 ? null : $x); });
// ImmList(1,3)
@_md#phpbnl17
/**
* @return FirstOrderKind<B>
*/
function flatten()
Some(Some(42))->flatten();
// Some(42)
@_md#phpbnl17
/**
* @param (A) -> FirstOrderKind<B> $a
* @return FirstOrderKind<B>
*/
function flatMap($a)
Option(42)->flatMap(function($x) { return Some($x + 1); });
// Some(43)
ImmList(1,2,3)->flatMap(function($x) {
return Option($x % 2 === 0 ? null : $x); });
// ImmList(1,3)
@_md#phpbnl17
laws
@_md#phpbnl17
$fa->flatMap($f)->flatMap($g) == $fa->flatMap(function($a) use ($f,$g) {
return $f($a)->flatMap( function($b) use ($g) { return $g($b); } ) ;})
$fa->pure($a)->flatMap($f) == $f($a)
associativity
right and left identity
$fa->flatMap(function($a) use ($fa) { return $fa-
>pure($a); }) == $fa;
@_md#phpbnl17
monadsyntaxsugar
@_md#phpbnl17
function repl($state)

{

return read()->

flatMap(evaluate)->

flatMap(andPrint)->

flatMap(loop)

->run($state);

}
def repl(state) =

for {
(s,input) <- read

(s,result)<- evaluate

s <- andPrint

s <- loop

} yield s

@_md#phpbnl17
monadcomposability
@_md#phpbnl17
f(A $a): M<B>



g(B $b): M<C>
f(a) ~= M<B>

f(a) map g ~= M<M<C>>


f(a) ~= M<B>

f(a) map g ~= M<M<C>>


urgh!
@_md#phpbnl17
butyoucancomposethemonad’sfunctions!


flatten f(a) map g ~= M<C>


@_md#phpbnl17
VALIDATIONS
@_md#phpbnl17
http://www.sbs.com.au/topics/sites/sbs.com.au.topics/files/gettyimages-470309868.jpg
@_md#phpbnl17
abstract class Validation {}
class Success extends Validation {}
class Failure extends Validation {}
@_md#phpbnl17
phunkie > Success(42)
$var0: Validation<E, Int> = Success(42)
phunkie > Failure("nay")
$var0: Validation<String, A> = Failure("nay")




@_md#phpbnl17
phunkie > Either("nay")(42)
$var0: Validation<E, Int> = Success(42)
phunkie > Either("nay")(null)
$var0: Validation<String, A> = Failure("nay")




@_md#phpbnl17
marcelloduarte
@PhunkiePhp
{
@_md#phpbnl17
thanks
{bit.ly/inviqa-contact bit.ly/inviqa-careers
you!
@_md#phpbnl17
credits
https://upload.wikimedia.org/wikipedia/commons/c/c2/Falkland_Islands_Penguins_40.jpg
{https://upload.wikimedia.org/wikipedia/commons/3/3b/World_Map_1689.JPG
https://upload.wikimedia.org/wikipedia/commons/5/5c/Brick_and_block_laying.jpg
https://upload.wikimedia.org/wikipedia/commons/b/bd/Golden_tabby_and_white_kitten_n01.jpg
@_md#phpbnl17
Questions?


joind.in/talk/75f65
?

More Related Content

What's hot

Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
brian d foy
 
The Perl6 Type System
The Perl6 Type SystemThe Perl6 Type System
The Perl6 Type System
abrummett
 
Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015
Lin Yo-An
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
Lin Yo-An
 
PHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにPHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くために
Yuya Takeyama
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
heumann
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
Ayesh Karunaratne
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
brian d foy
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
Bastian Feder
 
Business Rules with Brick
Business Rules with BrickBusiness Rules with Brick
Business Rules with Brick
brian d foy
 
Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8
XSolve
 
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02
Seri Moth
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of Smartmatch
Andrew Shitov
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
James Titcumb
 
Unit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBeneluxUnit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBenelux
Michelangelo van Dam
 
PHP Language Trivia
PHP Language TriviaPHP Language Trivia
PHP Language Trivia
Nikita Popov
 
Oops in php
Oops in phpOops in php
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11
Michelangelo van Dam
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2
Kacper Gunia
 
Workshop unittesting
Workshop unittestingWorkshop unittesting
Workshop unittesting
Joshua Thijssen
 

What's hot (20)

Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
 
The Perl6 Type System
The Perl6 Type SystemThe Perl6 Type System
The Perl6 Type System
 
Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
 
PHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにPHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くために
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
Business Rules with Brick
Business Rules with BrickBusiness Rules with Brick
Business Rules with Brick
 
Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8Xlab #1: Advantages of functional programming in Java 8
Xlab #1: Advantages of functional programming in Java 8
 
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of Smartmatch
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
 
Unit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBeneluxUnit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBenelux
 
PHP Language Trivia
PHP Language TriviaPHP Language Trivia
PHP Language Trivia
 
Oops in php
Oops in phpOops in php
Oops in php
 
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2
 
Workshop unittesting
Workshop unittestingWorkshop unittesting
Workshop unittesting
 

Similar to Functional Structures in PHP

Functional php
Functional phpFunctional php
Functional php
Jean Carlo Machado
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges
✅ William Pinaud
 
Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
mussawir20
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
Mariusz Kozłowski
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
pwmosquito
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
Stephan Schmidt
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Ivan Chepurnyi
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
Kang-min Liu
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
Stoyan Stefanov
 
Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011
Jacopo Romei
 
PHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return TypesPHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return Types
Eric Poe
 
jQuery: out with the old, in with the new
jQuery: out with the old, in with the newjQuery: out with the old, in with the new
jQuery: out with the old, in with the new
Remy Sharp
 
Generating Power with Yield
Generating Power with YieldGenerating Power with Yield
Generating Power with Yield
Jason Myers
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6
Workhorse Computing
 
Elements of Functional Programming in PHP
Elements of Functional Programming in PHPElements of Functional Programming in PHP
Elements of Functional Programming in PHP
Jarek Jakubowski
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest Updates
Iftekhar Eather
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
Jeff Carouth
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
 
Why async and functional programming in PHP7 suck and how to get overr it?
Why async and functional programming in PHP7 suck and how to get overr it?Why async and functional programming in PHP7 suck and how to get overr it?
Why async and functional programming in PHP7 suck and how to get overr it?
Lucas Witold Adamus
 

Similar to Functional Structures in PHP (20)

Functional php
Functional phpFunctional php
Functional php
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges
 
Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
 
Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011
 
PHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return TypesPHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return Types
 
jQuery: out with the old, in with the new
jQuery: out with the old, in with the newjQuery: out with the old, in with the new
jQuery: out with the old, in with the new
 
Generating Power with Yield
Generating Power with YieldGenerating Power with Yield
Generating Power with Yield
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6
 
Elements of Functional Programming in PHP
Elements of Functional Programming in PHPElements of Functional Programming in PHP
Elements of Functional Programming in PHP
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest Updates
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Why async and functional programming in PHP7 suck and how to get overr it?
Why async and functional programming in PHP7 suck and how to get overr it?Why async and functional programming in PHP7 suck and how to get overr it?
Why async and functional programming in PHP7 suck and how to get overr it?
 

More from Marcello Duarte

Empathy from Agility
Empathy from AgilityEmpathy from Agility
Empathy from Agility
Marcello Duarte
 
Introducing Eager Design
Introducing Eager DesignIntroducing Eager Design
Introducing Eager Design
Marcello Duarte
 
Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015
Marcello Duarte
 
Transitioning to Agile
Transitioning to AgileTransitioning to Agile
Transitioning to Agile
Marcello Duarte
 
Understanding craftsmanship
Understanding craftsmanshipUnderstanding craftsmanship
Understanding craftsmanship
Marcello Duarte
 
Hexagonal symfony
Hexagonal symfonyHexagonal symfony
Hexagonal symfony
Marcello Duarte
 
The framework as an implementation detail
The framework as an implementation detailThe framework as an implementation detail
The framework as an implementation detail
Marcello Duarte
 
PhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesPhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examples
Marcello Duarte
 
Emergent design with phpspec
Emergent design with phpspecEmergent design with phpspec
Emergent design with phpspec
Marcello Duarte
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
Marcello Duarte
 
Deliberate practice
Deliberate practiceDeliberate practice
Deliberate practice
Marcello Duarte
 
BDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpecBDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpec
Marcello Duarte
 
PHPSpec BDD for PHP
PHPSpec BDD for PHPPHPSpec BDD for PHP
PHPSpec BDD for PHP
Marcello Duarte
 
PHPSpec BDD Framework
PHPSpec BDD FrameworkPHPSpec BDD Framework
PHPSpec BDD Framework
Marcello Duarte
 

More from Marcello Duarte (14)

Empathy from Agility
Empathy from AgilityEmpathy from Agility
Empathy from Agility
 
Introducing Eager Design
Introducing Eager DesignIntroducing Eager Design
Introducing Eager Design
 
Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015
 
Transitioning to Agile
Transitioning to AgileTransitioning to Agile
Transitioning to Agile
 
Understanding craftsmanship
Understanding craftsmanshipUnderstanding craftsmanship
Understanding craftsmanship
 
Hexagonal symfony
Hexagonal symfonyHexagonal symfony
Hexagonal symfony
 
The framework as an implementation detail
The framework as an implementation detailThe framework as an implementation detail
The framework as an implementation detail
 
PhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesPhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examples
 
Emergent design with phpspec
Emergent design with phpspecEmergent design with phpspec
Emergent design with phpspec
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
 
Deliberate practice
Deliberate practiceDeliberate practice
Deliberate practice
 
BDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpecBDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpec
 
PHPSpec BDD for PHP
PHPSpec BDD for PHPPHPSpec BDD for PHP
PHPSpec BDD for PHP
 
PHPSpec BDD Framework
PHPSpec BDD FrameworkPHPSpec BDD Framework
PHPSpec BDD Framework
 

Recently uploaded

Microsoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptxMicrosoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptx
jrodriguezq3110
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
KrishnaveniMohan1
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
mohitd6
 
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical OperationsEnsuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
OnePlan Solutions
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Vince Scalabrino
 
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdfTheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
Ortus Solutions, Corp
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
vaishalijagtap12
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
michniczscribd
 
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Ortus Solutions, Corp
 
Refactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contextsRefactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contexts
Michał Kurzeja
 
Computer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdfComputer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdf
chandangoswami40933
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
WebConnect Pvt Ltd
 
What’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 UpdateWhat’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 Update
VictoriaMetrics
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Streamlining End-to-End Testing Automation
Streamlining End-to-End Testing AutomationStreamlining End-to-End Testing Automation
Streamlining End-to-End Testing Automation
Anand Bagmar
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
widenerjobeyrl638
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
Alina Yurenko
 

Recently uploaded (20)

Microsoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptxMicrosoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptx
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
bgiolcb
bgiolcbbgiolcb
bgiolcb
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
 
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical OperationsEnsuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
 
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdfTheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
 
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
 
Refactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contextsRefactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contexts
 
Computer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdfComputer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdf
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
 
What’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 UpdateWhat’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 Update
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Streamlining End-to-End Testing Automation
Streamlining End-to-End Testing AutomationStreamlining End-to-End Testing Automation
Streamlining End-to-End Testing Automation
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
 

Functional Structures in PHP