I'm fascinated by FP and I maintain several PHP codebases. I'd love PHP to be more functional than it is.
What PHP has:
First class functions.
Arrow functions (as of 7.4).
Built in map / filter / reduce.
What PHP lacks:
Generics (not needed, but useful).
Function types (like TypeScript has, very useful for refactoring / detecting type errors).
A proper include mechanism (the autoloading PSRs for mapping namespaces to filesystem paths in order to require / include the right file all presuppose you're going to do OOP).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm fascinated by FP and I maintain several PHP codebases. I'd love PHP to be more functional than it is.
What PHP has:
What PHP lacks:
require
/include
the right file all presuppose you're going to do OOP).