PHPZ FOR THE REST OF US
github.com/divarvel/phpz
FUNCTIONAL
PROGRAMMING
Purity
No side effects
Equational reasoning
Live code on FTP
No type system
Easy and robust deployment
Strong ecosystem
HOW TO COMBINE
THE BEST OF BOTH
WORLDS?
Z
Functional data
structures in
PHP
TYPE
CLASSES
IMPLICIT RESOLUTION AT
COMPILE TIME
No types
No generics
No implicits
No compile time
No nothing
SOLUTION: GLOBAL
MUTABLE STATE
Mutable dictionary
Mutable dictionary at runtime
Mutable dictionary at runtime
String indexes everywhere
Mutable dictionary at runtime
String indexes everywhere
Mutable dictionary at runtime
String indexes everywhere

Methods injection with __call
It works!
Defining an instance
Using typeclasses
Userland code
I did it for the LULz
Get it hot
https://github.com/divarvel/phpz
https://github.com/Geal/pharsec
https://github.com/Geal/pod
http://blog.clemen...
PHPz for the rest of us
PHPz for the rest of us
PHPz for the rest of us
Upcoming SlideShare
Loading in …5
×

PHPz for the rest of us

1,215 views

Published on

Functional programming for PHP

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,215
On SlideShare
0
From Embeds
0
Number of Embeds
250
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PHPz for the rest of us

  1. 1. PHPZ FOR THE REST OF US github.com/divarvel/phpz
  2. 2. FUNCTIONAL PROGRAMMING
  3. 3. Purity
  4. 4. No side effects
  5. 5. Equational reasoning
  6. 6. Live code on FTP
  7. 7. No type system
  8. 8. Easy and robust deployment
  9. 9. Strong ecosystem
  10. 10. HOW TO COMBINE THE BEST OF BOTH WORLDS?
  11. 11. Z
  12. 12. Functional data structures in PHP
  13. 13. TYPE CLASSES
  14. 14. IMPLICIT RESOLUTION AT COMPILE TIME
  15. 15. No types
  16. 16. No generics
  17. 17. No implicits
  18. 18. No compile time
  19. 19. No nothing
  20. 20. SOLUTION: GLOBAL MUTABLE STATE
  21. 21. Mutable dictionary
  22. 22. Mutable dictionary at runtime
  23. 23. Mutable dictionary at runtime String indexes everywhere
  24. 24. Mutable dictionary at runtime String indexes everywhere
  25. 25. Mutable dictionary at runtime String indexes everywhere Methods injection with __call
  26. 26. It works!
  27. 27. Defining an instance
  28. 28. Using typeclasses
  29. 29. Userland code
  30. 30. I did it for the LULz
  31. 31. Get it hot https://github.com/divarvel/phpz https://github.com/Geal/pharsec https://github.com/Geal/pod http://blog.clement.delafargue.name/posts/2013-04-01delicious-burritos-in-php-with-phpz.html @clementd on twitter

×