Live data from Hacker News

PHP 3.0 Final is out (1998)

web.archive.org

151–160 of 176 posts

Re: PHP 3.0 Final is out (1998)

#151

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?

I had this thought before I entered my job one year ago. There I experienced how fast php can be. Since php7 and the opcache things make fun again

Re: PHP 3.0 Final is out (1998)

#152

Earlier 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.

I understand what your point is, it is just your point is invalid.

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)

#153

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?

It's because it's not 'cool' like the young backends on the block. HNer's like to be 'in' with the cool crowd, so collectively dump on stuff like PHP for no reason whatsoever.

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)

#154

Earlier 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

Exactly, if there is one thing that is to blame for cooking CPU's it's an ORM, and those aren't very typical to see in PHP at all.

Re: PHP 3.0 Final is out (1998)

#155
post #142

Earlier 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.

When I developed in PHP, the first line of my code was usually renaming "htmlspecialchars" to "h". This significantly reduced the length of code and increased its legibility.

Re: PHP 3.0 Final is out (1998)

#156

Earlier 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?

You meant PHP built-in server (php -S)? It doesn't even support concurrent connection.

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)

#157

Earlier 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?

This has been debugged for 20+ years now. Not bad at all.

Re: PHP 3.0 Final is out (1998)

#158

Earlier 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?

But how is that easier than just uploading your files though? And it is more expensive, more overhead, more setup etc. Depends on the use case but for some things (like a personal or small company site), why would you over engineer it?

Re: PHP 3.0 Final is out (1998)

#159

Earlier 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?

No, I don't have yet a use-case for it. It'd be a bit overkill for what I need.

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)

#160
post #61

Earlier 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.

Blank line above and below each line of code made even worse with opening brackets at column 1 of yet another new line. WTF!?
Post reply on HN