29 ms·
Rambling On [PHP] Internals
- astrodust 13y agoI'd often wondered if the patchwork, self-contradicting, non-standard, anarchistic nature of PHP was a reflection of the mind-set of the creators.
- yogo 13y agoI'll give you that. No clear direction. As I thought about this a little more in Ruby you have Matz, Python has Guido, Scala has Odersky, C# has Anders (those are just those that come to mind and I'm not sure of the current involvement). I can't think of who PHP really has like this. Rasmus maybe, but I don't think it's the same as the other languages I mentioned--understandably so due to other projects/engagements.
- Pxtl 13y agoAny large community has these problems. This is the advantage to using forum engines that allow non-anonymous upvotes/downvotes over a naive mail-list - people can silently agree and separate the wheat from the chaff, and consensus becomes far more visible. You can even give the important contributors greater "weight" to the ups/downs (this is not a democracy, contributors are worth more).
- Supermighty 13y agoHe's not looking for up/down votes. He's looking for a discussion. Which well-meaning participants in an open source project should be able to have with some civility.
- maratd 13y agoYou can find discussion greatly facilitated when everyone has the power to silence the imbeciles by down-voting them into oblivion.
- Supermighty 13y agoI agree that technical solutions help. But they will never be a real solution. The eager troll will find a way around them. The real problem is a lack of strong leadership and stewardship. There is no BDFL setting the tone and punishing those who don't toe the line. Or maybe there is and this is the result. Ha!
- willvarfar 13y agoFor a long time I've thought that rather than absolute up/down votes, collaborative filtering might work better. I've tried to drum up attention to it before now: http://williamedwardscoder.tumblr.com/post/15581427232/self-organizing-reddit http://williamedwardscoder.tumblr.com/post/15581427232/self-...
- wvenable 13y agoThe problem is the mailing list is open to anyone and the majority of people on the list should be providing input.
- Supermighty 13y agoThere are moderated lists. When someone gets out of hand give them a temporary ban, and tell everyone why there were banned. People will learn that if they want to participate they will have to behave. After time, when the community scares away the trolls, they can loosen the moderation rules. There are plenty of communities that self moderate after having a strong leader show them what was socially acceptable and what was not.
- wvenable 13y agoIt's not necessarily about misbehaving. You can "behave" and yet still derail a discussion or provide no useful input. I'd say there wasn't terrible uncivil about the internals list. But it's less like a technical discussion list and more like an open forum. The signal to noise ratio is pretty low.
- jlgreco 13y agoAll the "forum" software that I have seen (opposed to more "ephemeral discussion" software like HN/Slashdot/Reddit) provides such a goddamn awful reading/browsing/discoverability experience that any benefits it may have over mailing lists are completely lost. Just for starters, mailing lists allow the discussion to thread (as do sites like HN, Slashdot, and Reddit) and don't force you to use a shoddy web interface that shows you only a few dozen posts on a single page. If I have to scroll to the bottom of a page and click a link that says "513", I am having a bad day. I have never seen a large open-source project that uses "forums" in a way that doesn't impose massive overhead. Without fail, forums for open source projects are dreadful while mailing lists are, with a few notable exceptions, pleasant. When I am looking for information about a project and discover that all the project officially has is a forum, my heart sinks; it ranks up there with finding out the project is still hosted on sourceforge or a mega/rapidshare/whatever clone.
- shabble 13y agoEvery time I'm forced to use a forum for something, I wish usenet hadn't succumbed to spam & binary warez. Many of the clients from 20 years ago have more (useful) features than modern forums. It's probably about time to reinvent it again, tunneled over Websockets with a Flat Responsive html5 Retina-Aware Interhyperface or something.
- Pxtl 13y agoI've always wanted to see a nested-discussion system with upvotes/downvotes that does the kind of seamless no-F5 updating you see on facebook.
- jdjb 13y agoWouldn't that mean that as you're reading a comment it could suddenly start moving up or down the screen? That'd make it pretty hard to read the stuff tailored for shills/fanboys/antifanboys...oh you may be onto something..
- jlgreco 13y ago
- i386 13y agoWhy not put RFCs in a special issue tracker?
- dkhenry 13y agoI think the only hope PHP has of continuing development is if someone big like Facebook can add some direction to it. Maybe they will but I think last I checked even they were giving up on using it for much more then a thin veneer to their back end services.
- myko 13y agoFacebook isn't built with PHP (using hiphop-php) anymore?
- noelwelsh 13y agoThe PHP code is the tip of the iceberg. The real work in Facebook is done by the many systems behind it, which are very definitely not written in PHP.
- dubcanada 13y agoFacebook is entirely written in PHP. It uses all sorts of databases and other systems to handle stuff, but so does every other website. It's still written in PHP. Facebook has their own PHP fork, which they use/and modify. I do not believe that Facebook pushes their modifications to PHP as a whole.
- byroot 13y agoAFAIK it's not true. First they don't use raw php: https://github.com/facebook/xhp/wiki https://github.com/facebook/xhp/wiki Then they use it only for the view layer, it only pull some data from memcache to render HTML. But all the hard work is C++ / Java / Tornado / etc
- pavs 13y agoCorrect me if I am wrong, but very few large scale project (if any at all) use raw PHP. Most of them rely on some kind of framework. Besides FB said it themselves that large portion of their code is PHP.
- bayesianhorse 13y agoWriting in PHP is a war against the platform - that's why PHP code tends to look like a battlefield...
- camus 13y agoThat's why i'm impressed with Symfony and Doctrine. Taking one of the worst language out there , and creating these well crafter libraries , that's insane. I think type hinting and basic POO saved PHP.
- paulhauggis 13y agoSymfony..maybe..but Doctrine? Do we really need a sudo-sql language for creating object->db table relational mappings? I used Doctrine extensively at my last job..and I will not be using it for any personal projects. It's bloated and when I need to optimize a sql query, I have to essentially create a hack outside of the main ORM..which kinda defeats the purpose in the first place. I much prefer Zend or Codeigniter.
- jtreminio 13y agoDoctrine1 was a mess. It was riddled with magic functions that were horrible to work with. It was slow, too. Doctrine2, mixed with entities, is awesome. Its relationship manager is fun and easy to work with and it works very well. You can even create hand-written custom queries if you want, using its own DSL that's fairly similar to what you would expect.
- camus 13y agoUse the Query builder, you dont need to use DQL.
- ck2 13y agoSubscribe to it for awhile and you'll see. It also turned off the suhosin author to the point where he moved onto other stuff. He had some great ideas, now lost (no longer works with PHP > 5.3 ) But Zend shows up and folds back in some great stuff into PHP once in awhile. Take a look at their now opensourced opcode cache, it's faster than all others.
- McGlockenshire 13y ago> But Zend shows up and folds back in some great stuff into PHP once in awhile. That's kind of the exception instead of the rule, really. Andi and Zeev are very, very infrequent contributors to php-internals. They proposed releasing the thing that became opcache after Rasmus finally convinced everyone how much of a pain in the rear end maintaining APC was.
- 0x0 13y agoIs this just a case of meritocracy at play? I haven't followed the full discussion and events leading up to here, but would it be very wrong to assume this just a case of a bystander starting a discussion that didn't really catch on with any of the active maintainers?
- Joeri 13y agoI've read about the toxicity of php-internals so many times, without any opposing views, that i'm quite willing to believe it. However, I'm not convinced other projects that aren't run by a benevolent dictator fare any better. This is just how projects get when everyone on the internet can throw their 2 cents into the game.
- mintplant 13y agoGiven the responses cited at the end of the post, I would assume that the author was previously a contributor of some significance to the project.
- McGlockenshire 13y ago> would it be very wrong to assume this just a case of a bystander starting a discussion that didn't really catch on with any of the active maintainers? Anthony (ircmaxell) contributed some patches to the past few major releases (including the new password API and PBKDF functions) and is well-respected by a large number of PHP developers. He's also proposed nearly a dozen RFCs including working patches, most of which include incremental but major feature improvements. He and some of the others are trying to improve PHP as a language. The problem is that there are a handful of people that do not want language changes, think that some changes are confusing for developers, and are generally not actually able to understand the use case behind things, like, oh, I dunno, named parameters. So instead of having a well-reasoned discussion, they basically shout the proposal down. Thankfully the RFC and voting process can bypass the volume of their arguments, but not always.
- gesman 13y agoPHP is addictive. You can create whole web app in one PHP file from scratch and it will have everything including API and DB management layer and be secure and fully functioning. And it will work on all servers and on all operating systems. Millions are made by average developers developing themes and plugins for wordpress. Hard to beat all that. #drama is for queens :)
- jarrett 13y ago> You can create whole web app in one PHP file from scratch and it will have everything including API and DB management layer and be secure and fully functioning. You can. But I shudder to imagine one file containing everything you just said. Also, I'm skeptical about the security claim. I'm not talking about PHP-specific vulnerabilities here. Rather, the developer of such an app might be pretty naive, and might build in his own vulnerabilities. > And it will work on all servers and on all operating systems. The same is true of most mainstream languages. Ruby, Python, Java, and Node are probably the big competitors in the web dev space. All of them can run on Windows.
- krapp 13y agoYou can. But I shudder to imagine one file containing everything you just said. Look on my works ye mighty and despair (i know I have): https://gist.github.com/kennethrapp/0ebbd15b509d8f18b095 https://gist.github.com/kennethrapp/0ebbd15b509d8f18b095
- gngeal 13y agoCommon Lisp is addictive. You can create a whole web app in one CL file from scratch and it will have everything including API and DB management layer and be secure and fully functioning. And it will work on all servers and on all operating systems. Also hard to beat that.
- jrabone 13y agoJust need to find a CL developer for hire...
- MrZongle2 13y agoAm I the only one who feels like this is a temper-tantrum of somebody who wanted to be in charge of more toys, punctuated with some salient (but obvious) points about PHP?
- citricsquid 13y agoircmaxwell has contributed a hell of a lot to PHP recently, this is not some worthless shmuck complaining, this is someone that can and does provide significant value to the community.
- MrZongle2 13y agoWho said he was a "worthless schmuck"? Geniuses can have temper-tantrums, too. Just because he has made worthy contributions doesn't mean that he isn't acting like a drama queen.
- gngeal 13y agoWho said he was a "worthless schmuck"? You've implied that what he's in charge of right now are "toys". Does that qualify?
- chris_wot 13y agoThat was ad hominem. Try addressing the individual issues he raised.
- mwfunk 13y agoYou referred to his post as a temper tantrum (subtext: he's being childish), refer to him as someone who just wants more "toys" (subtext: also childish), and just had to point out that his points about PHP were obvious (subtext: nothing interesting to say). Then you suggested that he might be a drama queen (subtext: too numerous to list here). That may not reflect your feelings, but that is what you communicated, whether you meant to or not. It's the nature of electronic communication- it's very easy to misinterpret. Maybe you talk like this in real life and being somewhat hyperbolic in your choice of words is a humorous verbal quirk, but none of that comes across electronically.
- robrenaud 13y agoThis is super relevant. How to protect your open source project from poisonous people. http://www.slideshare.net/vishnu/how-to-protect-yourhow-to-protect-your-open-source-project-from-poisonous-people http://www.slideshare.net/vishnu/how-to-protect-yourhow-to-p...
- eksith 13y agoThat's extremely helpful advice. The video to those slides : https://www.youtube.com/watch?v=ZSFDm3UYkeE https://www.youtube.com/watch?v=ZSFDm3UYkeE
- DavidHogue 13y agoThey also have a few other talks on youtube about similar topics and a book now: http://shop.oreilly.com/product/0636920018025.do http://shop.oreilly.com/product/0636920018025.do
- segmondy 13y agoHe complains about how internals lacks leadership, so why doesn't step up and fill that void instead of running away?
- danudey 13y agoBecause you can't take a toxic community and suddenly say 'Okay, I'm in charge!' without everyone else tearing you down. And perhaps he has other things to do with his time than babysit a bunch of (apparently) arrogant, condescending grown children.
- eksith 13y agoHe tried that. He also cites an example : "To illustrate why this is an issue, I posted this reply explicitly asking for feedback on two items. How many replies did I get? One. A single reply. Oh, there were more replies to the thread afterwards. But they were too busy arguing over the other off-topic or non-constructive things in the above list to actually discuss the open issues with the proposal." The problem here seems to be quite endemic and I don't think there are any simple fixes. This seems to be a cultural problem. I'm not even sure how to tackle something like that.
- McGlockenshire 13y agoBeyond the fact that the PHP community doesn't really do the BDFL thing, the process for adopting changes to the language is designed to be run by group consensus, not by the older model of having a small group of self-appointed leaders. I suppose a core problem is that before the current process, a very large number of the people causing trouble happened to also be the self-appointed leaders.
- progx 13y agoIt is not possible to change people, that dont want to be changed. As long as they not see, that there is something wrong, they will be against any change. This is absolutely normal, this ist humanly. He did the only right thing, he change himself and leave them. He want a change.
- deleted 13y ago[deleted]
- bowlofpetunias 13y agoThe author is complaining about lack of vision, leadership and regulations. And most of us can perfectly understand that, except: those are exactly the things that set PHP apart from most other major open source projects. It is by far the most anarchic and disorganized major OSS project and yet it still thrives. It still moves forward, it still gets better. Yes, it's design foundations as a language are not particularly elegant (to put it mildly), but that's pretty much the only major thing that's wrong with the resulting product. According to all known wisdom about how an OSS community should function, PHP should have imploded and forked a long time ago. It should no longer exist. And yet, despite this "I quit" rant, PHP has had relatively few major conflicts. The PHP way is unique, and while it may offend the sensibilities of people who like a nicely organized and disciplined community ran by a benevolent dictator or inspiring visionary, dammit, it works. I strongly suspect that any successful attempt to solve PHP's organizational "problems" would actually result in killing it stone dead. We already have Python and Ruby ea. PHP should stay weird.
- eksith 13y agoDeath by a thousand cuts is still a death (and a slow and painful one at that). I'm hopeful that this is just the kick in the pants the project needs to get its act together. It's unquestionably gotten better in recent years, but it still has a long and seemingly never ending list of warts. I don't see PHP getting forked anytime soon, but I do see developers moving to other languages routinely. And that's a shame since PHP is still, for better or for worse, the easiest language to get into for the novice.
- kbenson 13y agoPHP as an emergent phenomenon that is forcefully evolved by the sheer amount of need presented by the massive user base, in which any large scale forced reorganization would break the cycle and cause it to die (or at least fork)? I can see that.
- petervandijck 13y agoKeep PHP weird. Love it :)
- dasil003 13y ago
- mappu 13y agoI read php-internals every day, and.. this is totally understandable. There's a lot of opinionated people on that list with totally different visions - nikic, stas, that one guy Lester who is convinced 5.3 and E_STRICT was the worst thing in the world... PHP just appeals to too many people to have a consensus. Possibly the point this was made most clear was when the property accessors RFC was declined on a hairpin vote despite having a majority (and the time that switching to an actual AST-based parser was a non-starter). Your contributions and voice will be missed.
- TazeTSchnitzel 13y ago>that one guy Lester who is convinced 5.3 and E_STRICT was the worst thing in the world Ahahaha, it's all coming back now. I used to find his emails funny. I also remember why I unsubscribed from php-internals as well, though...
- Miyamoto 13y agoHN white knights JavaScript but hates PHP. I can't figure it out. Each language is horrible in similar ways.
- dasil003 13y agoThe similar horrible things are the superficial warts related to dynamic typing and heavy usage by amateurs leading to poor code quality in the wild. However there's a big difference which is that Javascript has always had first-class functions, lexical scope, and object-oriented via prototypal inheritance. PHP attempted to bolt on some approximation of all of these over the years, but the result is a sort of Frankenstein shambler. Javascript for all its problems at least was designed with a reasonably powerful core. That said, HN has plenty of terrible things to say about JS, so I think you're exaggerating a bit.
- greenlakejake 13y agoI've used both. Each of these languages has its quirks. But JS's design makes PHP's design look like it was done with crayons.
- frozenport 13y agoI will never forgive JS for the `this` pointer.
- greenlakejake 13y agoI will never forgive PHP for all kinds of shit.
- antiglacier 13y agoCare to expand on that a bit (without repeating items found in the "Fractal of Bad Design" article)?
- TazeTSchnitzel 13y agoNot really. JS has some design flaws, but if you look past them it is a really solid language. On the other hand, PHP started with design flaws, then accumulated different design flaws from all paradigms, so it is now a frankenstein of design flaws.
- buster 13y agoAn eyeopener for me was reading parts of the discussion how the new namespace seperator was chosen: http://pastebin.com/2iJP4Qhx http://pastebin.com/2iJP4Qhx (from https://wiki.php.net/rfc/namespaceseparator https://wiki.php.net/rfc/namespaceseparator) If you read that IRC log and truly believe that a multi-million/billion dollar ecosystem/environment should be ruled by what reads like kids between 12-16 chatting, then go ahead. I won't. Apart from that there is enough rant on PHP on the internet already ;)
- torino_devc 13y agoThere is pretty much new independent PHP engines nowadays, one of my favorite is an embedded PHP5 implementation named PH7 written in ANSI C and following the SQLite3 coding style (very impressive) http://ph7.symisc.net http://ph7.symisc.net
- camus 13y agoMove to Python, I'm sure the community can benefit from your skills. I see no future in PHP development. If the core is rotten ,you can have the best libs in the world (symfony,doctrine,...) in the end you still need to face PHP architectural problems. Or back to the JVM maybe.
- pavs 13y agoI recently started learning PHP as my first programming language and I love it so far. But the amount of negativity and hatred I see towards PHP on the internet (even among so-called PHP lovers) makes me question my decision of learning PHP. My main purpose for learning PHP is for web-development. I have looked into java code and I felt like I am going to shit pants if I have to learn that. 2 questions. - Am I wasting my time with PHP? - What are some good alternative for web-development that preferably doesn't have a steep learning curve?
- circuiter 13y agoNo, you're not wasting your time.
- jaequery 13y agouse what you love. don't listen to what anyone else says.
- babby 13y ago- nodejs: Write in coffeescript or javascript on the server, two bird with one stone philosophy. Will let you build better programming techniques in respect to structure due to (1) it's async and (2) it's module based. Unlike php the global namespace should not be used. Additionally, JS is just better than PHP in every way I can think of. Node has a thriving user module community. Cons are that you have to deal with async, module dependencies and setting node up on a server (or really anything besides PHP) is far more complex. - GO: google's lang, seems to be trending lately. Lets you build potentially more elegant, higher performance web apps (if you believe the benchmarks) than node but will have a higher learning curve, less of a userbase. - Python: Someone else will have to comment on python (and probably GO). Afaik it's a useful language to use overall.
- Kiro 13y ago> Unlike php the global namespace should not be used What do you mean? What's the "global namespace" in PHP and why do you need to use it?
- anuraj 13y agoPHP will be useful if the bloat is eliminated. Just plain procedural scripting, simple, straight - Nothing else is needed. By the way, that is my view of any scripting language. Languages used to write complex systems should be type safe and strictly structured.
- gexla 13y agoI think what's important here is that PHP developers shouldn't look past the curtain. The whole web stack is a house of cards. The state of PHP doesn't change that. ;) PHP is powering a huge industry. A lot of money is flowing on PHP code, from PHP developers banging out code for paying clients to companies like Facebook which got started as PHP apps. Wordpress powers a ridiculous number of companies which run on its code. PHP may be a mess, but lets keep things in perspective. The state of what really matters is alive and well.
- patkai 13y agoSlightly off topic, but relevant question: how many people move away from PHP because they get too annoyed to work with it - even if it does "work" - and how many are moving from other languages _to_ PHP because they had enough of another language.