- Version: 1.0
- Date: 2019-02-05
- Author: Paul Crovella, Levi Morrison
- Status: Draft
- First Published at: https://wiki.php.net/rfc/partial_function_application
Think about "PHP" for a few seconds… What came to mind? It’s very likely you thought about your average product catalog, a blogging platform or how the platform is inferior to things like Node.js. But wait, it’s 2018! What if I told you PHP’s huge ecosystem has way more to offer and PHP is not inferior at all to its evil cousin Node.js?
Hands-on workshop given at PHPYorkshire (2018-04-13)
In this hands-on tutorial you will learn about the core concepts of async PHP and why you too should care about ReactPHP being a real thing. The workshop has a strong focus on sparking the idea that PHP can be way faster and more versatile than you probably thought. Bring along an open mind and through lots of interesting examples and live demos learn why what sounds crazy at first might soon be a valuable addition in your toolbox.
You’re already familiar with PHP and want to learn what ReactPHP is all about? Then this tutorial is for you! We will
<?php | |
/** | |
* Controller for the CouchDB-React-Bingo project | |
* | |
* @package The Bingo Framework | |
* @author Lochemem Bruno Michael | |
*/ | |
namespace App\Controllers; |
<?php | |
/** | |
* @file | |
* Basic demonstration of how to do parallel threads in PHP. | |
*/ | |
// This array of "tasks" could be anything. For demonstration purposes | |
// these are just strings, but they could be a callback, class or | |
// include file (hell, even code-as-a-string to pass to eval()). |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
In the mid-80s, while reading through my roommate's collection of Scientific American back issues, I encountered this introduction to Lisp written by Douglas Hofstadter. I found it very charming at the time, and provide it here (somewhat illegally) for the edification of a new generation of Lispers.
In a testament to the timelessness of Lisp, you can still run all the examples below in emacs if you install these aliases:
(defalias 'plus #'+)
(defalias 'quotient #'/)
(defalias 'times #'*)
(defalias 'difference #'-)
function tailrec($func) | |
{ | |
$acc = array(); | |
$recursing = FALSE; | |
$func = new ReflectionFunction($func); | |
return function() use ($func, &$acc, &$recursing) { | |
$acc[] = func_get_args(); |
" ============================================================================= | |
" Miller Medeiros .vimrc file | |
" ----------------------------------------------------------------------------- | |
" heavily inspired by: @factorylabs, @scrooloose, @nvie, @gf3, @bit-theory, ... | |
" ============================================================================= | |
" ----------------------------------------------------------------------------- | |
" BEHAVIOR |