Posts marked with “functional php”
Using Algebras in PHP
Algebras are commonplace in Functional Programming, paradigm incrementally gaining mainstream appeal in PHP. They offer a means of enforcing referential transparency in codebases rife with a plethora of side-effects endemic to real-world programs that typically feature some combination of I/O interactions and error handling.
Fiendish Functions—Filtering Fact From Fiction
By Camilo Payan Functional programming is a paradigm that has gained in popularity recently with the rise of several new functional programming languages and integration of new features in existing languages. All the same, there are many concerns about functional programming in the developer community. Is functional programming useful for the PHP developer? Will it […]
Lambda PHP
Whether you’re on a greenfield project or an archaeological expedition into legacy code, this month, we have articles on serverless PHP stacks with AWS, functional PHP in practice, refactoring code, writing APIs, docker containers, and more.
Fiendish Functions—Filtering Fact From Fiction
Functional programming is a paradigm that has gained in popularity recently with the rise of several new functional programming languages and integration of new features in existing languages. All the same, there are many concerns about functional programming in the developer community. Is functional programming useful for the PHP developer? Will it add complexity to […]
A Case for Functional Programming in PHP
Functional Programming constructs do not predominantly feature in PHP parlance despite the language’s aptness for the paradigm. Part of accepting the paradigm’s offerings might require introducing a paradigm-centric perspective of PHP: an effort that portrays the language—whose more prominent features allow for the style to exist in its ecosystem—as an enabler of Functional Programming.
Education Station: Calling All Callables
By Chris Tankersley When facing a challenging problem, you want a flexible codebase that adapts quickly. Object-oriented programming facilitates it by giving you the power through inheritance, encapsulating code in reusable objects, and generally making them work for your application as you see fit. However, we can find flexibility in other programming approaches. Languages such […]
Education Station: Calling all Callables
When facing a challenging problem, you want a flexible codebase that adapts quickly. Object-oriented programming facilitates it by giving you the power through inheritance, encapsulating code in reusable objects, and generally making them work for your application as you see fit. However, we can find flexibility in other programming approaches.
Advanced Design & Development
PHP adds syntax and slowly adapts to enable new programming techniques. Whether you are comfortable with imperative, object-oriented, or functional programming, the language does make it possible, and new syntax like arrow functions simplify the syntax. This issue looks into asynchronous PHP, new Browser APIs, building REST APIs, callables and closures in PHP, Code Igniter 4, and more!
Map, Filter, and Reduce in PHP
Even though MapReduce was created for parallelization, which PHP does not natively support, the syntax is supported. In this article, I outline how to use map, filter, and reduce with PHP collections and the benefits you can gain over traditional for loops.