What a nice, whimsical message.
What a nice, whimsical message.
Back in the day, you could:
* Be bold enough to use Linux or FreeBSD and use CGI or Perl as the only free version
* Use ASP but pay license fees for Windows NT, ISS and SQL Server
* Use ColdFusion which was kind of trendy but was pretty expensive.
When PHP arrived it was so refreshing. I used to make my stuff in Apache+PHP, MySQL and Linux and it was magical what you could do with very few lines of code.
The worse part was to manually get the sources of the dependencies one by one, hit ./configure and make, so you can compile a php module for Apache
In those days Microsoft was pretty strong, everything used to be closed source and payed and that's why for people who understand what it was back then, this does not sound like the splashy announcements of today.
That's why every time you see Linus, Stallman or any person that was active in the open source movement, you should pay a beer to them. The world of technology owe a lot to them, specially the underdogs.
We are so lucky that Bill Gates missed how important internet would turn out to be..
They were paying a lot for ASP and a shitty product(cant remember the name..it was something like WebObjects) that was taking too long to load, the newly born company i was hired for would cease to exist, so even thought i was hired as a sysadmin to manage the network, linux and databases, i've used my low skills as a programmer, without nobody asking me, and designed the thing in secret, in about two or three weeks with PHP, Linux and MySql instead.
The (news based, with a lot of personalization page) loaded in about 400 milliseconds instead of what once was a 10 seconds load.
My bosses were a little skeptic at first, because the ASP folks was a team formed with university professors and skilled pros, and i was a teen that was not even hired as a coder. Also it was so much faster that they thought i could only be cheating somehow (like static instead of personalized with data from a backend db)..
Linux and open source was also faced with skepticism, specially when confronted with Microsoft stuff that everybody was used to back then.
The LAMP stack was a wonder back in those days, and it helped a lot to popularize Linux, MySQL, Apache and PHP. I know today PHP doesn't look so cool giving all the other players, but in the context it was launched it was so much better than all the status quo of the nineties where the options were quite limited.
I've seen lots great, well structured and performant PHP code - the quality depends on the programmer, as it does for any other language.
The language is bad, but... you can still write great code in a bad language. And you don’t need a good language, or even good code to build a great website. Facebook has made more money with questionable PHP code than any site built with elegant pearl webscripts that I know of. Wikipedia is PHP. So was Digg (RIP). Your users don’t give a darn how good your language or code is so long as it usually works.
So tl;dr, PHP sucks, but I love PHP.
The rest of what you say I agree with, but the language was never a performance bottleneck over other scripting languages.
It certainly scaled better than ruby or perl or python apps with the same logic.
The fact that each request was fundamentally stateless and ephemeral helped this if you needed to distribute your app and made development faster as well.
Back to V5 it outperformed its competition in benchmarks
Files are autoloaded lazily, meaning only classes that are touched are loaded on any given request. If the code is split into well sized, purposeful modules, it becomes a non issue.
It's a talk by the creator of PHP about how PHP grew to what it is today. The entire thing is really interesting.
There is actually a reason for things like 'inconsistent' argument ordering. They're ordered based on the C API, rather than being consistent in user land ;).
I'm sure it's nostalgia but I think the PHP 4 -> 5 transition was the best era of PHP. Codebases at that time mixed OO and C-ish function based programming in pragmatic and easy to understand ways. That weird shitshow of objects, functions that accept pass by reference or pass by value, request scoped global state, etc was fun and anarchic and, for whatever reason, totally made sense to a self-taught programmer like me at the time.
Wasn't Amazon originally written in Perl?
This is quite hard to fix, as it would break almost everything. So you'd end up with a Python 3 situation. However, as of PHP 8, it's less of an issue. If you can't remember the order for arguments, you can use named arguments <https://3v4l.org/cY1PB> like so:
strpos(needle: "foo", haystack: "foobar")
> It throws errors written in HebrewIf you're referring to T_PAAMAYIM_NEKUDOTAYIM, this is no longer true as of PHP 8: https://3v4l.org/2T8qQ -- the error is just this:
Parse error: syntax error, unexpected token "::", expecting end of file
Internally, the token is still called T_PAAMAYIM_NEKUDOTAYIM, but you can also refer to it by T_DOUBLE_COLON: <https://www.php.net/manual/en/tokens.php> and I suspect eventually they'll phase out the Hebrew spelling.