Everyone here is talking about how great PHP is, but why don't we consider it for use nowadays? I know some people still use it, but it's not really an option most people consider anymore. Is that just because it's not cool or modern anymore, or are there some fundamental problems with it that make it a non-starter?
PHP 3.0 Final is out (1998)
151–160 of 176 posts
Re: PHP 3.0 Final is out (1998)
#152Earlier quoted context omitted.
Need ssh access. Can't deploy via ftp. A non-techincal person can deploy a WordPress site they will not be able to deploy a golang binary. If the binary fails for whatever reason the application is either down or you have to have something ensuring it stays running. With PHP if it breaks, it'll be ok for the next run.
I am not familiar with tooling designed to allow non-programmers to deploy. For a programmer, a single binary is trivial stuff. My point being you can drop a golang in any linux environment and it will just run. It doesn't get simpler than that.
You say you just drop a golang binary into any linux enviroment and it'll just run. Except it won't. If I just upload the file it won't just run. I need to run the binary. Literally, you need to do more than just upload the binary to the enviroment. Where as with PHP with many hosters you do just need to upload the files and it is deploy. As you said you can't get simplier than just uploading the files.
Secondary, if you have to make exclusions to proof your point of simplicity then it is not as simple as you state.
Thirdly, your deployment would be unstable. If an error occurs someone would manually have to restart it. For any production deployment you would need supervisior. And if you were going to deploy a new version you would have to stop supervisor, stop your process, upload and then restart supervisor. Quite simply your trival deployment is not production ready and would not be how someone would deploy it.
I get it you like golang, I like it to, but PHP has it beat on deployablity. It's got years on it when it comes to improving the ecosystem around it.
Re: PHP 3.0 Final is out (1998)
#153Everyone here is talking about how great PHP is, but why don't we consider it for use nowadays? I know some people still use it, but it's not really an option most people consider anymore. Is that just because it's not cool or modern anymore, or are there some fundamental problems with it that make it a non-starter?
I see the same with modern VB.NET. It's my go-to 'utility' language because I can knock up tools in it without having to think or look up code fragments. However it still has the stink of old BASIC on it for some reason and as such draws the distain of 'real' coders. I just don't get it.
Re: PHP 3.0 Final is out (1998)
#154Earlier quoted context omitted.
If you need to cook an egg, you can serve 1 request per second with PHP and use your CPU as heat source.
Performance is the last thing one can blame php for. Its quite fast for a non compiled dynamic language and most bottlenecks are usually I/O and db access
Re: PHP 3.0 Final is out (1998)
#155Earlier quoted context omitted.
Not for a programming language calling itself portable Hypertext processor, no. In fact, it's bordering on criminally negligent.
PHP have htmlspecialchars() and parameterized queries since 2000.
Re: PHP 3.0 Final is out (1998)
#156Earlier quoted context omitted.
`apt install apache2 php libapache2-mod-php` will perfectly set up Apache with PHP all Debian-based distros. What's complex about that? And if you really need php-fpm (which you should, anyway), at least in Ubuntu (never set up on other distro), the boilerplate nginx config is there.
How bad will be running the built-in web server on public network?
Neither mod_php nor php-fpm is related to the built-in server though. Both are designed for production.
Re: PHP 3.0 Final is out (1998)
#157Earlier quoted context omitted.
`apt install apache2 php libapache2-mod-php` will perfectly set up Apache with PHP all Debian-based distros. What's complex about that? And if you really need php-fpm (which you should, anyway), at least in Ubuntu (never set up on other distro), the boilerplate nginx config is there.
How bad will be running the built-in web server on public network?
Re: PHP 3.0 Final is out (1998)
#158Earlier quoted context omitted.
> Good memories; deploying a site cheaply by scp/rsync the files. Well. I have a minio instance running for static small sites, every time I wanted to create a new bucket I had to re-read my own notes and fiddle around for half an hour with s3cmd and mc before getting something live. Today I threw the things out and started using scp again. It's much easier, it's not in the way.
Have you tried IaaC Tools like terraform?
Re: PHP 3.0 Final is out (1998)
#159Earlier quoted context omitted.
> Good memories; deploying a site cheaply by scp/rsync the files. Well. I have a minio instance running for static small sites, every time I wanted to create a new bucket I had to re-read my own notes and fiddle around for half an hour with s3cmd and mc before getting something live. Today I threw the things out and started using scp again. It's much easier, it's not in the way.
Have you tried IaaC Tools like terraform?
I originally set up minio because I wanted to test out some backup solutions relying on S3 but I didn't want to use amazon (can't remember why). Turns out minio is great but not a 1:1 S3 clone and not every app can swap out amz for minio anyway.
I was thinking reading about ansible soon though.
Re: PHP 3.0 Final is out (1998)
#160Earlier quoted context omitted.
Sadly along with Laravel and Symfony came PSR culture where idiomatic PHP, with its fanfold docblock comments and double-spaced lines of code means you're lucky if you can see a dozen lines of code on a typical screen. I don't call that productive at all.
Double spaced lines of code? What do you mean? FWIW, I no longer use DocBlocks because PHP's own type system is usually expressive enough.