4 ms·
I used PHP in mid-2000s, and then again in ~2017. By 2017, with the power of IDEA/WebStorm at my hands, it felt pretty much like developing a Java or a C# appli
by dmitriid 4y ago
I used PHP in mid-2000s, and then again in ~2017. By 2017, with the power of IDEA/WebStorm at my hands, it felt pretty much like developing a Java or a C# application: the stuff you needed was there, at your fingertips.
And I still prefer PHP docs over pretty much any other language doc.
- bluetomcat 4y agoAs of PHP 5, it lost its way and started imitating the Java OO model with a worse botched-on syntax. PHP 4 used to be a compact "hypertext preprocessor" with many built-in groups of functions, enabling you to process forms, talk to databases or process images without much code.
- ceejayoz 4y agoThose functions are all still there. You can still do <?php echo “Hello world!” ?> if you like.
- zeptonix 4y ago<? mysql_connect(...) ?> isn't doing too well
- ceejayoz 4y agoIf you wanna hang your hat on that, go for it. The hacky approach the parent poster yearns for is still entirely possible, even if you have to update a half-dozen lines of mysql_connect to mysqli_connect.
- tehbeard 4y agoIt's a pretty dumb argument to make on the basis that no functionality was lost (There is both the MySQLi extension, and the more general PDO one), and if you really, really can't get the budget to refactor it, you can drop a single shim file in to "get those functions back" while using either of the mentioned extensions to do the actual work.
- dmitriid 4y agomysql_connect has been heavily discouraged for at least 15 years now.
- chippiewill 4y agoPHP 4.1 came out with mysqli in 2001. So you could argue that mysql_ functions have been bad practice for over 20.
- dmitriid 4y agoThis made me realize how ild I am :) Weren't the 90s just 10 years ago?
- esskay 4y agoHow has PHP lost its way? It grew up from a poorly thought out hacky scripting language to a major programming language. All the nasty code you could write in PHP 4 or 5 is still possible, but everyone will look at your code and laugh.
- bluetomcat 4y agoThere are many other possible directions the language could have evolved in since then. For example, an emphasis on its dynamism and statelessness rather than introducing a static Java-like OO model for building hierarchies of classes. Or a modular system that encourages the user to put “complex” code in C modules, making application development as simple as calling a few functions.
- danjac 4y agoMaybe because there are already major programming languages at that level already, which arguably do things better: if you are going to have a Java-like OO model, then just use Java (and leverage its ecosystem, tooling etc). Whereas there is a niche for a quick-and-dirty scripting language for just getting something up and running.
- tehbeard 4y ago... You can still hacky script in it, my dude. I have to do that several times a year for stuff like one-off ETL's for customer data, or to verify an idea before rewriting it properly.. Absolutely nothing about modern PHP stops you from writing like the crayon-muncher you were back in the early 2000's... You just also have the option, to, you know, use battle tested libraries and work with cohesive community driven standards now as well.
- esskay 4y agoIf you honestly think Java is the solution to replace PHP you clearly know very little about the language and its usage.
- cbsjjxhcc 4y agoPoorly thought out? Only the language that runs most of the internet and invented the term tight development loop. All the modern crap has just moved us further away from this.