More than 40 years of software development, software architect, team leader, speaker and PHP evangelist. Currently working for CCMBenchmark Group company.
Programmierer aus Leidenschaft. Ich lege besonders Wert auf Clean Code und liebe es mich durch legacy Code zu wühlen... und den dann zu refaktorieren 😉.
From a performance perspective on server side, Dart is ahead of PHP:
Sample:
wrk http://localhost:1337 -c 8 -d 60 -t 8
/// Dartimport'dart:io';Futuremain()async{varserver=awaitHttpServer.bind(InternetAddress.loopbackIPv4,1337,);print('Listening on localhost:${server.port}');awaitfor(HttpRequestrequestinserver){request.response.write('Hello World');awaitrequest.response.close();}}
More than 40 years of software development, software architect, team leader, speaker and PHP evangelist. Currently working for CCMBenchmark Group company.
<?php
use Swoole\Http\Server;
use Swoole\Http\Request;
use Swoole\Http\Response;
$server = new Swoole\HTTP\Server("127.0.0.1", 9501);
$server->on("start", function (Server $server) {
echo "Awesomeness of PHP has been initialized\n";
});
$server->on("request", function (Request $request, Response $response) {
$response->header("Content-Type", "text/plain");
$response->end("Hello Philippines!\n");
});
$server->start();
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.
PHP is designed for app on server side, and Dart for app on client side. So, use both.
From a performance perspective on server side, Dart is ahead of PHP:
Sample:
Looks very interesting, I think I should give it a try 🙂
yes, but PHP is more simple (just 2 lines), so it's better for newbies, simple to edit, to maintain, etc. :)
How about this...