SlideShare una empresa de Scribd logo
1 de 109
Descargar para leer sin conexión
{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
?

Más contenido relacionado

La actualidad más candente

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 Systemabrummett
 
Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015Lin Yo-An
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersLin 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 Overlordsheumann
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021Ayesh 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-mostunknownpartsBastian Feder
 
Business Rules with Brick
Business Rules with BrickBusiness Rules with Brick
Business Rules with Brickbrian 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 8XSolve
 
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Seri Moth
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of SmartmatchAndrew 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 PHPBeneluxMichelangelo van Dam
 
PHP Language Trivia
PHP Language TriviaPHP Language Trivia
PHP Language TriviaNikita Popov
 
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11Michelangelo 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 2Kacper Gunia
 

La actualidad más candente (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 a Functional Structures in PHP

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 Functionsmussawir20
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHPpwmosquito
 
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 5Stephan 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 PerformanceIvan Chepurnyi
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In PerlKang-min Liu
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developersStoyan Stefanov
 
Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011Jacopo Romei
 
PHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return TypesPHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return TypesEric 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 newRemy Sharp
 
Generating Power with Yield
Generating Power with YieldGenerating Power with Yield
Generating Power with YieldJason Myers
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Workhorse Computing
 
Elements of Functional Programming in PHP
Elements of Functional Programming in PHPElements of Functional Programming in PHP
Elements of Functional Programming in PHPJarek Jakubowski
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest UpdatesIftekhar 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.4Jeff 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 a 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?
 

Más de Marcello Duarte

Introducing Eager Design
Introducing Eager DesignIntroducing Eager Design
Introducing Eager DesignMarcello Duarte
 
Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015Marcello Duarte
 
Understanding craftsmanship
Understanding craftsmanshipUnderstanding craftsmanship
Understanding craftsmanshipMarcello Duarte
 
The framework as an implementation detail
The framework as an implementation detailThe framework as an implementation detail
The framework as an implementation detailMarcello Duarte
 
PhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesPhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesMarcello Duarte
 
Emergent design with phpspec
Emergent design with phpspecEmergent design with phpspec
Emergent design with phpspecMarcello 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 thingsMarcello Duarte
 
BDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpecBDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpecMarcello Duarte
 

Más de 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
 

Último

%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 

Último (20)

%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Functional Structures in PHP