4 ms·
> How so? Because when I put a PHP script on a server with "<?php echo 'Hello world' . date('Y' time()); ?>" that is a one-liner and I'm sure it'll work for the
by vatotemking 9y ago
> How so? Because when I put a PHP script on a server with "<?php echo 'Hello world' . date('Y' time()); ?>" that is a one-liner and I'm sure it'll work for the next 20 years.
Web hostings have abstracted this for you. In reality, you need to install Apache or Nginx first. PHP does have a built-in server but its for testing only not production.
Nodejs is both a server and a webapp. You just need to install nodejs at bare minimum to run a "hello world".
Try installing nodejs and php on DO to see what I mean.
With regards to nodejs overtaking PHP, various stats from various sources back this up.
> it doesn't change all the time and you can be quite confident that it'll keep running for another decade.
Now thats just false. The switch to PHP7 from PHP5 alone has many BC breaks. Latest Drupal is a rewrite. Laravel LTS dont last "a decade". Code breaks all the the time in PHP land. The only thing that dont change in PHP world is WordPress.....