Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:
<?php
$a = 1;
$c = $a + $a++;
i | |
me | |
my | |
myself | |
we | |
our | |
ours | |
ourselves | |
you | |
your |
" ============================================================================= | |
" Miller Medeiros .vimrc file | |
" ----------------------------------------------------------------------------- | |
" heavily inspired by: @factorylabs, @scrooloose, @nvie, @gf3, @bit-theory, ... | |
" ============================================================================= | |
" ----------------------------------------------------------------------------- | |
" BEHAVIOR |
function tailrec($func) | |
{ | |
$acc = array(); | |
$recursing = FALSE; | |
$func = new ReflectionFunction($func); | |
return function() use ($func, &$acc, &$recursing) { | |
$acc[] = func_get_args(); |
(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.
<?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()). |
<?php | |
/** | |
* Controller for the CouchDB-React-Bingo project | |
* | |
* @package The Bingo Framework | |
* @author Lochemem Bruno Michael | |
*/ | |
namespace App\Controllers; |
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