#reactphp
Explore tagged Tumblr posts
leashade · 2 years ago
Text
As a side note, I kind of like how PHP changed during past 3-4 years. I always used PHP as a sort of mix of Python and Bash in my day-to-day life, and it was also my go-to language for prototyping.
And with all the PHP7+ stuff, ReactPHP, Composer and PSRs, it started to be more and more enjoyable to me.
And I had very little experience with stuff like Laravel or Symfony so far, but they seem to be pretty cool as well.
When I started some of my projects, I used PHP as a language for prototyping, then quickly switched to something else. And my "big" projects that use PHP are just stuck on it because of legacy code.
Now I'm not even sure I would want to change the stack in the future, I kinda like it.
And ReactPHP proved to be pretty stable for async/server apps. Currently have 5 different ones running, some of them for 5+ years almost without stopping, no issues whatsoever.
Well, there were issues in some cases, but these were purely because of my fuckups and the apps were still working fine.
And there were some restarts in this 5 year run, but because I wanted to migrate everything to another node or upgrade the existing one. Stability, speed and memory consumption were never an issue.
Though I never made any performance tests with some real numbers. But at a glance it felt no worse than Node apps really.
And stuff like PXP popping up is great too, adding some TypeScript treatment to the mix.
And there are also ways to merge React.js with PHP, as well as "run" PHP in the browser if you REALLY need it. That seem to be an overkill, but the option is still there, which is awesome.
There are two features I would like to add: operator overload (PXP has this in plans though) and some metaprogramming features from D lang.
0 notes
winstonmhangoblog · 5 years ago
Photo
Tumblr media
React, axios,PHP, MySQL and tailwindcss CRUD application. My next big blog post to help new developers get a real feel on The basics of React we have covered so far. This post (to complete soon) looks at how you can use React and intergrate with other web technologies to achieve a dynamic and interactive web application. #reactjs #reactaxios #axios #reactphp #reactmysql #reacttailwindcss (at Area 23 Lilongwe) https://www.instagram.com/p/B-tEt0XJxzY/?igshid=18gprnjdfshtr
0 notes
hinge · 27 days ago
Photo
Tumblr media
Hinge presents an anthology of love stories almost never told. Read more on https://no-ordinary-love.co
1K notes · View notes
straven-loft · 6 years ago
Text
Дайджест PHP #19
Свеж��я подборка со ссылками на новости и материалы мира PHP. В выпуске: изменены правила голосования за RFC в PHP Internals, новое расширение для реализации параллельного исполнения кода, свежие материалы для обучения, видео, порция полезных инструментов, и многое другое. Приятного чтения!
(more…)
View On WordPress
0 notes
phpprogrammingblr · 5 years ago
Photo
Tumblr media
Getting started with ReactPHP ☞ http://go.codetrick.net/333a7d703a #php #laravel
0 notes
phpdeveloperfan · 5 years ago
Photo
Tumblr media
Getting started with ReactPHP ☞ http://go.codetrick.net/333a7d703a #php #laravel
0 notes
wordpresstemplateslove · 5 years ago
Photo
Tumblr media
Getting started with ReactPHP ☞ http://go.codetrick.net/333a7d703a #php #laravel
0 notes
hinge · 16 days ago
Photo
Tumblr media
Hinge presents an anthology of love stories almost never told. Read more on https://no-ordinary-love.co
555 notes · View notes
macronimous · 6 years ago
Text
Building a RESTful API Using #ReactPHP and #MySQL https://t.co/f3mS1r1qyb https://t.co/5k4lnuVFKk
Building a RESTful API Using #ReactPHP and #MySQL https://t.co/f3mS1r1qyb pic.twitter.com/5k4lnuVFKk
— Macronimous.com (@macronimous) July 20, 2019
from Twitter https://twitter.com/macronimous July 21, 2019 at 12:22AM via IFTTT
0 notes
phptutorialforyou · 6 years ago
Photo
Tumblr media
@phpc : RT @astrocasts: During today's live coding session we'll be working with #reactphp periodic timers to track and report #twitch viewership. Join us! 5pm ET / 2p PT / 10p UTC #php #asyncphp #twitchdev https://t.co/louddyAPyE https://t.co/c2MpjqpaAF
0 notes
tryhyperhost · 7 years ago
Text
Smoke testing ReactPHP applications with Cigar - Cees-Jan Kiewiet
ICYMI: http://dlvr.it/QJCfrX https://hyper.host
0 notes
laravelvuejs · 8 years ago
Text
mnvx/laravel-reactphp for Laravel
[ad_1]
Integration of ReactPHP Server for Laravel 5.4 and Lumen 5.4.
This fork works with requests contained JSON body.
Now using reactphp/http 0.7.0!
Installation
Install via composer
composer require mnvx/laravel-reactphp:dev-master
After installing, add provider on config/app.php on your project.
// app.php 'providers' => [ // ... 'LaravelReactPHPProvidersReactCommandProvider', ],
View On WordPress
0 notes
hinge · 27 days ago
Photo
Tumblr media
Hinge presents an anthology of love stories almost never told. Read more on https://no-ordinary-love.co
3K notes · View notes
straven-loft · 7 years ago
Text
PHP-дайджест #15
Свежая подборка со ссылками на новости и материалы. В выпуске: PHP 7.3 RC2, Codeception 2.5 и другие релизы, типизированные свойства в PHP 7.4, порция полезных инструментов, и многое другое. Приятного чтения!
(more…)
View On WordPress
0 notes
t-baba · 8 years ago
Photo
Tumblr media
Writing Async Libraries – Let’s Convert HTML to PDF
I can barely remember a conference where the topic of asynchronous PHP wasn't discussed. I am pleased that it's so frequently spoken about these days. There's a secret these speakers aren't telling, though...
Making asynchronous servers, resolving domain names, interacting with file systems: these are the easy things. Making your own asynchronous libraries is hard. And it's where you spend most of your time!
The reason those easy things are easy is because they were the proof of concept – to make async PHP competitive with NodeJS. You can see this in how similar their early interfaces were:
var http = require("http"); var server = http.createServer(); server.on("request", function(request, response) { response.writeHead(200, { "Content-Type": "text/plain" }); response.end("Hello World"); }); server.listen(3000, "127.0.0.1");
This code was tested with Node 7.3.0
require "vendor/autoload.php"; $loop = React\EventLoop\Factory::create(); $socket = new React\Socket\Server($loop); $server = new React\Http\Server($socket); $server->on("request", function($request, $response) { $response->writeHead(200, [ "Content-Type" => "text/plain" ]); $response->end("Hello world"); }); $socket->listen(3000, "127.0.0.1"); $loop->run();
This code was tested with PHP 7.1 and react/http:0.4.2
Today, we're going to look at a few ways to make your application code work well in an asynchronous architecture. Fret not – your code can still work in a synchronous architecture, so you don't have to give anything up to learn this new skill. Apart from a bit of time...
You can find the code for this tutorial on Github. I've tested it with PHP 7.1 and the most recent versions of ReactPHP and Amp.
Promising Theory
There are a few abstractions common to asynchronous code. We've already seen one of them: callbacks. Callbacks, by their very name, describe how they treat slow or blocking operations. Synchronous code is fraught with waiting. Ask for something, wait for that thing to happen.
So, instead, asynchronous frameworks and libraries can employ callbacks. Ask for something, and when it happens: the framework or library will call your code back.
In the case of HTTP servers, we don't preemptively handle all requests. We don't wait around for requests to happen, either. We simply describe the code that should be called, should a request happen. The event loop takes care of the rest.
A second common abstraction is promises. Where callbacks are hooks waiting for future events, promises are references to future values. They look something like this:
readFile() ->then(function(string $content) { print "content: " . $content; }) ->catch(function(Exception $e) { print "error: " . $e->getMessage(); });
It's a bit more code than callbacks alone, but it's an interesting approach. We wait for something to happen, and then do another thing. If something goes wrong, we catch the error and respond sensibly. This may look simple, but it's not spoken about nearly enough.
We're still using callbacks, but we've wrapped them in an abstraction which helps us in other ways. One such benefit is that they allow multiple resolution callbacks...
$promise = readFile(); $promise->then(...)->catch(...); // ...let's add logging to existing code $promise->then(function(string $content) use ($logger) { $logger->info("file was read"); });
There's something else I'd like us to focus on. It's that promises provide a common language – a common abstraction – for thinking about how synchronous code can become asynchronous code.
Let's take some application code and make it asynchronous, using promises...
Continue reading %Writing Async Libraries – Let’s Convert HTML to PDF%
by Christopher Pitt via SitePoint http://ift.tt/2lbVBKD
0 notes
aboutlinux · 7 years ago
Text
PHP-PM es un administrador de procesos, un supercargador y Balanceador de Carga para aplicaciones PHP
PHP-PM es un administrador de procesos de código abierto, supercargador y equilibrador de carga para aplicaciones PHP. Utiliza ReactPHP para lograr E / S no bloqueada y controlada por eventos con PHP.
Se basa en ReactPHP y funciona mejor con aplicaciones que usan marcos de solicitud-respuesta como HTTPKernel de Symfony. El enfoque de esto es eliminar el costoso bootstrap de PHP (declarar…
View On WordPress
1 note · View note
baazzilhassan-blog · 12 years ago
Text
ReactPHP: an event-driven non-blocking IO in PHP
0 notes
hinge · 28 days ago
Photo
Tumblr media
Hinge presents an anthology of love stories almost never told. Read more on https://no-ordinary-love.co
2K notes · View notes
macronimous · 6 years ago
Text
Fast #WebScraping With #ReactPHP: Download All Images From a Website https://t.co/LIcrehjdew https://t.co/m3I6Op9SDZ
Fast #WebScraping With #ReactPHP: Download All Images From a Website https://t.co/LIcrehjdew pic.twitter.com/m3I6Op9SDZ
— Macronimous.com (@macronimous) July 19, 2019
from Twitter https://twitter.com/macronimous July 19, 2019 at 09:31PM via IFTTT
0 notes
phptutorialforyou · 6 years ago
Photo
Tumblr media
@phpc : RT @beausimensen: I'll be diving into #reactphp promises in about 30 minutes on today's @astrocasts #livestream. I'm pretty new to *creating* promises... what can go wrong? Join me in 30! https://t.co/KzKRJ8nqud #php
0 notes