Slashdot Mirror


Official Support For PHP 4 Ends

Da Massive writes with this excerpt from ComputerWorld: "For a technology that has been in stable release since May 22, 2000, PHP 4 has finally reached the end of its official life. With the release of PHP 4.4.9, official support has ended and the final security patch for the platform issued. ...With eight years of legacy code out there, it is likely that there are going to be a fairly large number of systems that will not migrate to PHP 5 in the near future, and a reasonable proportion of those that will not make the migration at all. For those who are not able to migrate their systems to the new version of PHP, noted PHP security expert Stefan Esser will continue to provide third party security patching for the PHP 4 line through his Suhosin product."

245 comments

  1. Good to see... by creature124 · · Score: 2, Insightful

    I am glad to see that the PHP devs can allow an old version to die....unlike Microsoft, which seems determined to drag all of its products down with legacy support.

    This is the way progress is made.

    1. Re:Good to see... by ya+really · · Score: 1

      ...unlike Microsoft, which seems determined to drag all of its products down with legacy support.

      Isn't that why there aren't any driver issues with vista?

    2. Re:Good to see... by Foofoobar · · Score: 3, Funny

      heh. Actually there were tons of drivers issues with Vista but for entirely different reasons.

      --
      This is my sig. There are many like it but this one is mine.
    3. Re:Good to see... by shutdown+-p+now · · Score: 1

      I am glad to see that the PHP devs can allow an old version to die....unlike Microsoft, which seems determined to drag all of its products down with legacy support.

      I think it's the other way around - Microsoft has enough resources to support their products for 15+ years (and they have customers who request such level of support), while Zend does not.

    4. Re:Good to see... by Richard_at_work · · Score: 2, Informative

      Tried running ASP or ASP.Net 1/1.1 under .Net 2 (including 3 and 3.5, as they are the same runtime) lately? Won't happen - you have to *specifically* select either ASP page functionality or the .Net 1.1 framework in IIS to run either of these legacy platforms. No legacy support bogging ASP.Net 2 down there...

    5. Re:Good to see... by bloodninja · · Score: 0, Flamebait

      I am glad to see that the PHP community, particularly Stefan Esser, can continue to support the system even after the vendor stops....unlike Microsoft, which seems determined to drag all of its products down with closed source.

      There, fixed that for you.

      --
      Lock the wife and the dog in the boot of the car.
      Return one hour later.
      Who's happy to see you?
    6. Re:Good to see... by creature124 · · Score: 2, Insightful

      I am glad to see that the PHP community, particularly Stefan Esser, can continue to support the system even after the vendor stops....unlike Microsoft, which seems determined to drag all of its products down with closed source.

      There, fixed that for you.

      That is also a valid statement. It is good to see community support continue, especially to ease the transition. Your comment about Microsoft closed source nature is also very perceptive - access to the source code make the difference between good community legacy support and bad community legacy support.

    7. Re:Good to see... by dave420 · · Score: 1

      Well, to be fair, server-side web software being deprecated is a lot different to desktop software. But I guess you have to get your dig in somehow, what?

    8. Re:Good to see... by Anonymous Coward · · Score: 5, Funny

      Now if only they'd let the current version die too, we'd really be making progress..

    9. Re:Good to see... by abirdman · · Score: 1

      Thanks for the laugh. I don't agree with your comment, but it's funny enough to have made coffee blow out my nose.

      --
      Everything I've ever learned the hard way was based on a statistically invalid sample.
    10. Re:Good to see... by ThePhilips · · Score: 1

      Yes. Business would keep old business model as long as possible. Changing infrastructure is something literally everybody avoids in corporations. That's why they are going to be stuck with M$ for some indefinite time.

      But that's absolutely not problem with PHP (and open source in general). First is that you can always pay some 3rd party to do support for your. Second. F/LOSS in corporations has (at least in my experience) different usage pattern. While they would shoot dead anybody even suggesting to update working version of M$Exchange server, they would easily and gladly throw new version of Linux/Apache/MySQL/etc into mix.

      That's quite explainable. To get decent support from M$ is always problem. And problems of e.g. M$Exchange are epic exercise in humiliation. Apache or generic Linux problem? Thanks to Google, within hours you would find somebody on the net with the very same problem. Withing few more hours somebody would suggest solution or workaround. Even more, I see that IT departments which deploy and use F/LOSS internally, do lots of testing. You shouldn't be surprised finding your own admin giving a solution on some forum.

      I'm not sure whom should I praise more in the case: community around many open source projects or Google which makes it possible for the people to find each other and form communities.

      --
      All hope abandon ye who enter here.
    11. Re:Good to see... by barometz · · Score: 1

      Actually that'd be fairly nice - from what I hear the plans for PHP 6 are rather sane. Would be nice to see quadrupled efforts on that.

      --
      "Bi-la Kaifa"
    12. Re:Good to see... by dartmongrel · · Score: 1

      no no, dig, you mean Digg. That's another news site.

    13. Re:Good to see... by shutdown+-p+now · · Score: 1

      Apache or generic Linux problem? Thanks to Google, within hours you would find somebody on the net with the very same problem. Withing few more hours somebody would suggest solution or workaround.

      In my experience, this method of finding answers is popular (because of its efficiency) everywhere, not just in FOSS world. I routinely use it to find workarounds for issues with .NET, MSSQL, and SharePoint, for example. Actually bothering with paid support is much rarer.

  2. You're about a year late by Anonymous Coward · · Score: 0, Informative
    1. Re:You're about a year late by Ron_Fitzgerald · · Score: 1

      Your link is to the announcement about the end of life for PHP4, the article states that the end of life date is finally here.

      --
      ~ Ron Fitzgerald
  3. wow FUDSTER by puto · · Score: 1, Troll

    PHP 4 was released in 2000 and is finally getting an EOL date but is still going to receive patches. Microsoft XP was released in 2001 and its EOL date is 2009, with security patches until 2014. So you have two products with the same span of product life, and still going to have patches for security. Very poor trolling indeed.

    --
    The Revolution Will Not Be Televised
    1. Re:wow FUDSTER by Anonymous Coward · · Score: 2, Interesting

      and yet when microsoft does it there are howls from the idiot gallery that get modded insightful. when it happens with php the same posts get modded as flamebait. very poor trolling indeed.

    2. Re:wow FUDSTER by Stan+Vassilev · · Score: 4, Informative

      PHP 4 was released in 2000 and is finally getting an EOL date but is still going to receive patches. Microsoft XP was released in 2001 and its EOL date is 2009, with security patches until 2014.

      Technically the EOL was announced in 2007, and it was the beginning of 2008. What ends today is official security patch support.

      The patches offered by Mr. Esser are not official, though I'd say he's more than qualified for the job.

      Overall, especially for an open source project, I'd say the transition was handled pretty well. What's worrying me more is where the new versions are heading, but that's another discussion.

    3. Re:wow FUDSTER by satoshi1 · · Score: 0, Troll

      What the hell kind of point are you trying to make?

    4. Re:wow FUDSTER by corsec67 · · Score: 5, Insightful

      People will still be allowed to get PHP 4 after it is EOL'd.

      Try buying a new copy of XP now. Even getting a computer with XP (and not paying for Vista) is getting difficult now.

      That is the difference.

      --
      If I have nothing to hide, don't search me
    5. Re:wow FUDSTER by Firehed · · Score: 1

      True, but for the most part, PHP5 doesn't change things from PHP4 (some default configuration settings have changed for the better, but flipping a bit to go back to the old way isn't exactly hard). It's not like you're dealing with a complete new UI, just some additional functionality. Comparing a close source operating system to an open source scripting language isn't too fair of a comparison.

      --
      How are sites slashdotted when nobody reads TFAs?
    6. Re:wow FUDSTER by Low+Ranked+Craig · · Score: 3, Insightful

      The difference is that PHP5 works great, whereas Vista is a steaming pile of crap. If Vista was any good, I'd be fine with MS killing XP. but it's not.

      --
      I still cannot find the droids I am looking for...
    7. Re:wow FUDSTER by Ariven · · Score: 4, Informative

      I can buy a copy of XP, upgrade or full install, retail or OEM at newegg with no problems.

    8. Re:wow FUDSTER by wmbetts · · Score: 3, Informative

      Not to be an ass, but your wrong.

      In PHP4 objects are passed by value. In PHP5 they're passed by reference.

      In PHP5 you also have public, private, and protected variables.

      In PHP4 class constructors were the same name as the class. In PHP5 it's __construct.

      I could go on about the difference, but I won't. There's a lot of differences between the two.

      I'm glad PHP4 has reached EOL.

      --
      "Ubuntu" -- an African word, meaning "Slackware is too hard for me". - stolen from Dan C alt.os.linux.slackware
    9. Re:wow FUDSTER by that+this+is+not+und · · Score: 4, Insightful

      And I can build PHP4 or PHP5 from source, or intall binaries, without sending any money at all to Newegg.

    10. Re:wow FUDSTER by hdparm · · Score: 1

      I'm, on the other hand, fine with anything Microsoft being killed, with the exception of their optical mouse.

    11. Re:wow FUDSTER by bloodninja · · Score: 1

      The difference is that PHP5 works great, whereas Vista is a steaming pile of crap. If Vista was any good, I'd be fine with MS killing XP. but it's not.

      The difference is that PHP5 works great, whereas Vista is a steaming pile of crap. If Vista was any good, I'd be fine with MS killing XP. but it's not.

      Another difference is that the $$$ cost of upgrading from PHP 4 -> PHP 5 is nill. THe $$$ cost of downgrading from XP to Vista is around $200-$500. That said, the time cost of upgrading to PHP 5 could be on the order of weeks to months, whereas the time cost of downgrading to Vista could be on the order of hours to days.

      Really, comapring an application apple and an OS orange is not quite level.

      --
      Lock the wife and the dog in the boot of the car.
      Return one hour later.
      Who's happy to see you?
    12. Re:wow FUDSTER by Anonymous Coward · · Score: 0

      Not to be an ass, but your wrong.

      Not to be an ass, but you're wrong

    13. Re:wow FUDSTER by CastrTroy · · Score: 1

      In PHP 5 you can use the class name as the constructor. I do it all the time. It hasn't failed me yet. And I'm just working with the default config from my hosting service. A little off topic, but why would they change that? It doesn't offer any advantages that I could think of.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    14. Re:wow FUDSTER by SunBug · · Score: 2, Informative

      In PHP4 objects are passed by value. In PHP5 they're passed by reference.

      This is probably one of the most misunderstood features of PHP5. They are passed by reference, but they're also copy-on-write references. As soon as the variables value is changed, a copy is made, and the function/method then uses the local copy (as if a copy were made in the first place like in php4).

      Nothing has changed for the programmer except a reduction in memory usage.

      In PHP5 you also have public, private, and protected variables.

      Yes, optional. The old var keyword works the same as using public.

      In PHP4 class constructors were the same name as the class. In PHP5 it's __construct.

      Again, optional. There is also a __destruct() method in php5.

      I could go on about the difference, but I won't. There's a lot of differences between the two.

      There are a lot of differences, but backwards compatibility is pretty good. A coworker and I converted a 130k loc mess of a php4 codebase (originally php3) from 4.3 to 5.1 with only a handful of changes. It just took a bit of research and a bit of planning.

      And yes, good riddance to php4. It will not be missed.

    15. Re:wow FUDSTER by drinkypoo · · Score: 0, Flamebait

      There is no difference: Windows and PHP both suck. If the effort that went into PHP had gone into something that doesn't suck (mostly that doesn't involve Zend script) then I'd be fine with comparing that thing to Windows favorably. But I'm not.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    16. Re:wow FUDSTER by Dragonslicer · · Score: 1

      In PHP4 objects are passed by value. In PHP5 they're passed by reference.

      This is probably one of the most misunderstood features of PHP5. They are passed by reference, but they're also copy-on-write references. As soon as the variables value is changed, a copy is made, and the function/method then uses the local copy (as if a copy were made in the first place like in php4).

      Nothing has changed for the programmer except a reduction in memory usage.

      That is not correct. If you pass an object to a function, and modify a property of that object in the function, the object will still have the modified property outside the function.

    17. Re:wow FUDSTER by throup · · Score: 2, Insightful

      For one thing, if I have a class called Fruit, and I create a new subclass which extends Fruit, say Apple, then the following code samples are equivalent:


      class Apple extends Fruit {
          function Fruit() {
              echo 'I am an apple';
              parent::Fruit('apple');
          }
      }

      and


      class Apple extends Fruit {
          public function __construct() {
              echo 'I am an apple';
              parent::__construct('apple');
          }
      }

      However, if I now rename the parent class to RipenedOvary, in the first example I will also need to change every reference to Fruit(); in the second example I will only need to change the first line.

    18. Re:wow FUDSTER by CastrTroy · · Score: 0

      Well, you'd also have to change every other reference to "Fruit" in your entire code base. This is what refactoring tools (or search and replace) are for. I think it adds a bit of help if you happen to be renaming classes. But if you are renaming classes, and you are in a dynamic language, you might have a lot of work anyway, considering you'll have to search through your entire code base for references to that class name, especially, because in your case, the "Fruit" class isn't abstract.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    19. Re:wow FUDSTER by Spatial · · Score: 1

      I wouldn't call it a steaming pile of crap. It's not an improvement over XP SP2, but I think it's approximately as good now that it's received SP1. Where it really fails is value for money - it offers nothing compelling when compared to existing OSes. At least to this audience.

      I downloaded it yesterday, I'm going to mess around with it in a virtual machine later to see if I can make it run at a usable speed. Should be fun.

    20. Re:wow FUDSTER by SunBug · · Score: 1

      Ahh, you are correct. I'd never run into it before since I generally consider it bad form to modify parameters.

      Leave it up to PHP to introduce nuances in every aspect of the language. After 8 years of PHP, issues like this are why I'm trying my best to move on to other languages.

    21. Re:wow FUDSTER by Low+Ranked+Craig · · Score: 1

      Any operating system that takes 2 hours (or more) to copy a 16 GB file is a piece of crap. The same hardware with XP takes a few minutes. I have SP1. Microsoft won't admit there is an issue. I have a long list of Vista deficiencies as compared to XP. Vista costs me at least 2 hours a week. Like shitting a watermelon, only with Vista you get the added insult of being asked to pay for the privilege up front. My various PHP4 to PHP5 transitions, on the other hand, have been fairly painless.

      --
      I still cannot find the droids I am looking for...
    22. Re:wow FUDSTER by waynetv · · Score: 1

      Leave it up to PHP to introduce nuances in every aspect of the language.

      This change brings PHP in line with just about every other object-oriented language on in existence. So it's hardly a nuance.

    23. Re:wow FUDSTER by Anonymous Coward · · Score: 0

      Actually we should talk about the disturbing direction of PHP5 and later. With PHP4 gone, we are another step closer to being forced to us OOP in PHP.

      This is a horrible disaster. PHP is not an OOP language. Converting it into such a beast will only result in a horrible mutant that can't survive.

      I personally find OOP to be much more difficult to maintain especially if I didn't write it. If we wanted OOP we'd have picked Java or some other language that was designed to do OOP from the start.

    24. Re:wow FUDSTER by Ant+P. · · Score: 1

      PHP is gradually turning into Perl 5, but on the other hand Perl is gradually turning into Perl 6.

      As long as there's at least _one_ programming language to fill the void between retarded (VB) and incomprehensible to humans (Perl6) then it's OK with me.

    25. Re:wow FUDSTER by Anonymous Coward · · Score: 0

      You should see OOP as the next level of organization above procedural programming. No one is forcing OOP upon you, it's up to you to separate a huge task into few smaller, easier to understand tasks, so that OOP is beneficial to you.

      If OOP is hard to understand, then it's not written right by whoever wrote it.

    26. Re:wow FUDSTER by jacquesm · · Score: 1

      so, now we only have to get rid of that 'global' keyword and default globally declared variables (variables declared outside the scope of any function) to be globals.

      That's my main gripe with PHP.

    27. Re:wow FUDSTER by Anonymous Coward · · Score: 0

      Like shitting a watermelon, ...

      Thanks a bunch for reminding me of the painful incident three hours ago. I'd nearly recovered...

  4. Now that magic quotes are off by default... by Anonymous Coward · · Score: 5, Funny

    FRIST PSOT!!!!!'); DELETE FROM replies WHERE reply != 'FRIST PSOT!!!!!'; --

    1. Re:Now that magic quotes are off by default... by Drinking+Bleach · · Score: 1

      Yeah, I know this post was meant to be funny, but anyone that depended on magic_quotes for 'security' needs their head examined. All magic_quotes ever did was cause trouble, and I'm sad to see it's still an option in PHP 5 (indeed, many web hosts explicitly enable it too).

      On the plus side, php.net has the work-around to servers with it enabled in a solution that's practically cut-and-paste.

    2. Re:Now that magic quotes are off by default... by Anonymous Coward · · Score: 0

      On the plus side, php.net has the work-around to servers with it enabled in a solution that's practically cut-and-paste.

      I thought all PHP programming was cut and paste. ;-)

    3. Re:Now that magic quotes are off by default... by ShieldW0lf · · Score: 1

      Anyone who passes SQL strings to their database at all needs to have their head examined. Stored procedures and granular database permissions are there for a reason. If you don't use them, you may as well hang a sign on your site that says "Hack Me".

      --
      -1 Uncomfortable Truth
    4. Re:Now that magic quotes are off by default... by Ant+P. · · Score: 1

      You must be referring to variable-interpolated strings. Forbidding all use of SQL strings would be a bit retarded, considering it's the only database interface PHP implements...

    5. Re:Now that magic quotes are off by default... by ShieldW0lf · · Score: 1

      Ok, that's a point.

      Your queries that fetch multiple rows should look like this:

      $q = 'SELECT * FROM getallmessagesforperson($1);';
      $args = array($personid);
      $db = pg_connect($connstr);
      $r = pg_query_params($db, $q, $args);
      $a = pg_fetch_all($r);

      The apache process user should only have permissions on your various stored procedures, like the example getallmessagesforperson proc. It shouldn't have permission to access anything else in your database, not tables, not views, not selects, not inserts. Nothing.

      Gives you better code reuse, keeps the DBA and the coders from stepping on each others toes, and good luck doing SQL attacks on that.

      There are a million other wrong ways, but there is no other right way to do it.

      --
      -1 Uncomfortable Truth
    6. Re:Now that magic quotes are off by default... by Anonymous Coward · · Score: 0

      Slashdot runs on Perl.

  5. By Neruos by Anonymous Coward · · Score: 0

    Tell me you just didn't compare a scripting web language to a operating system.

    1. Re:By Neruos by Refenestrator · · Score: 5, Funny

      You're right. He should have compared it to a car.

    2. Re:By Neruos by Yvan256 · · Score: 4, Funny

      What do you mean, an african or an european car?

    3. Re:By Neruos by Ghubi · · Score: 1

      In soviet russia the car compares you

  6. Obi-Wan by nighty5 · · Score: 3, Funny

    I felt a great disturbance in the CVS, as if millions of lines of code suddenly cried out in terror and were suddenly silenced.

    1. Re:Obi-Wan by DeathElk · · Score: 3, Funny

      Off to Digg for you AC, and hand in your geek card in exchange for sunglasses that don't fit on the way out.

    2. Re:Obi-Wan by that+this+is+not+und · · Score: 1

      The proper term is 'thousands of kloc.'

      Turn in your badge to Steve Ballmer on your way out.

    3. Re:Obi-Wan by Anonymous Coward · · Score: 0

      in exchange for sunglasses that don't fit on the way out.

      Well that's kinda weird. Do the sunglasses later change shape, or maybe my head shrinks?

    4. Re:Obi-Wan by imbaczek · · Score: 2, Funny

      no wonder; it's CVS, after all. ;p

    5. Re:Obi-Wan by sleeponthemic · · Score: 0, Troll

      I felt a similar disturbance..

      However, I perceived that it was as if millions of underachieving non OO toting PHP devs (professional internet browsing technicians) suddenly cried out in terror and were silenced

      --
      I record my sleeptalking
    6. Re:Obi-Wan by Anonymous Coward · · Score: 0

      great!!!! LOL

    7. Re:Obi-Wan by nighty5 · · Score: 1

      hehehe i like it...

  7. Backward Compatability by Mongoose+Disciple · · Score: 1

    I feel like this is only even a story at all because valid PHP 4 code isn't necessarily valid PHP 5 code.

    Curious choices by the PHP folks to me, but I'm not really deeply invested enough in PHP to fairly call them good or bad.

    1. Re:Backward Compatability by Stan+Vassilev · · Score: 4, Informative

      I feel like this is only even a story at all because valid PHP 4 code isn't necessarily valid PHP 5 code.

      Curious choices by the PHP folks to me, but I'm not really deeply invested enough in PHP to fairly call them good or bad.

      The reason for those curious choices was the even more curious choices in the languages design in earlier versions. I would say however, that even the best design gets outdated in time, and it's better to sacrafice compatibility at some point.

      Key web-related technologies have reinvented themselves and it's hard to say where they would be if they didn't do so. ASP.NET (vs. old ASP) comes to mind, which was a radical rearchitecture. Flash is another example (on the client side), which almost completely rewrote their rendering stack in version 8, and completely rewrote their script runtime stack in Flash 9.

    2. Re:Backward Compatability by SimGuy · · Score: 1

      This is common when you use the three-segment versioning method.

      If you raise the first number, you are generally doing so to indicate your backwards compatibility is being broken and that you are changing or removing features in addition to adding new ones.

      Changing the middle number means you're keeping compatibility with the previous version, but adding new major fuctionality.

      Changing the last number means you're just adding patches that do not affect compatibility or features.

      And you eventually have to stop supporting your old major version numbers, or you'll be forced to forever maintain multiple trees with substantially different codebases and no one will ever stop using them.

      --
      I don't care, but don't let that stop you from trying to tell me anyway.
    3. Re:Backward Compatability by Anonymous Coward · · Score: 0

      For those that want all the details on how versioning is usually done, Software Versioning. Posting AC because I'm not actually trying to Karma whore...

    4. Re:Backward Compatability by encoderer · · Score: 1

      In practice, however, most PHP4 code will run perfectly fine on PHP5, with the interpreter throwing only E_NOTICE warnings about access control modifiers and such.

      It can be hit-and-miss. 99% of fatal errors I've encountered during migration processes are apps that have a class that, in PHP5, creates a namespace collision with the PHP5 Standard Library.

      In some cases the change from objects being passed byval to byref causes issues when the developer was counting on the object being passed byval.

      But that's very rare. It's hard to even dream-up an example where things break when you pass an object byref.

      The PHP folks have taken care to TRY to prevent apps from breaking during the migration process.

      Things like supporting both the new keyword-based-constructors AND the old "magic coincidental naming" based constructors.

      And funny enough... if you wait to upgrade your PHP4 apps until 5.3 is realsed (it's in Alpha right now), you might not have very many problems at all. Namespaces are finally introduced in 5.3 and one would think that platform libraries will be in their own namespace, preventing the collisions I mentioned earlier.

  8. Good News/Bad News by SirLurksAlot · · Score: 3, Interesting

    The bad news: Lots of unsupported legacy code in the wild.

    The good news: Any conversion that needs to happen means more work for developers all around! Yay for a paycheck!

    Seriously though, PHP4 was fine for what it was, but it definitely had its drawbacks. Poor object support, poor error handling (No try..catch blocks? Seriously?), no type-hinting, no foreach statement, etc. PHP5 is so much easier to work with, and honestly most sites should've made the switch a few years back if they haven't already.

    --
    God, schmod. I want my monkey man!
    1. Re:Good News/Bad News by sabernet · · Score: 5, Interesting

      Where did you get your php info? foreach was introduced in PHP4, eval as well for error catching.

      The object support was nasty, but still better then the pseudo-object crap that perl has. Neither has private objects and vars outside of normal scoping but at least php didn't require passing extra arguments and shifting them out via a pseudo-constructor.

      Also, you could type cast in php4 as well.

    2. Re:Good News/Bad News by SimGuy · · Score: 5, Funny

      Where did you get your php info?

      I get mine from phpinfo();

      --
      I don't care, but don't let that stop you from trying to tell me anyway.
    3. Re:Good News/Bad News by SirLurksAlot · · Score: 1

      Ah, ok, you got me on foreach, I could've sworn that was a PHP5 thing. As for eval, you gotta admit that is a pretty poor substitute for try..catch blocks.

      Also, you could type cast in php4 as well.

      I'm not talking about type-casting, I'm talking about type-hinting. Instead of defining function foo($myVar) you can define function bar(MyClass $foo), so you (supposedly) know what you're getting as a parameter. Of course it only works on objects and arrays, but hey, better than nothing right?

      I know what you mean about Perl though. If you're coming from a strong OO background, using objects in Perl can be shock.

      --
      God, schmod. I want my monkey man!
    4. Re:Good News/Bad News by billcopc · · Score: 2, Funny

      Agreed. Maybe I'm an asshole (no wait, that's a guaranteed fact), but I have no pity for anyone still running PHP4... if they wanted to switch, they had all the time in the world to do so. PHP5 has been out for what, 4 or 5 years now ? Anyone still running on the old stuff is either happy with it and shouldn't bother upgrading, or hopelessly incompetent.

      That said, I'm very eager to see PHP6... I don't really want to switch over to Ruby / Python, largely for performance reasons, so I'm curious to see what new ghetto tools PHP6 will provide me. Even though it's a shit language, I always thought it had a certain charm in its crudeness and the fact that there's a (redundant) function for everything imaginable. I write all manner of scripts in PHP, even non-web stuff, as it lets me do stuff in a fraction of the time.

      --
      -Billco, Fnarg.com
    5. Re:Good News/Bad News by daemonburrito · · Score: 3, Interesting

      Even though it's a shit language, I always thought it had a certain charm in its crudeness and the fact that there's a (redundant) function for everything imaginable.

      Does not compute. If you are using PHP5 to its potential, then most of your coding should be abstracted away from the old built-in (and inconsistently named) functions. You should never have to touch them.

      PHP5 is not a shit language, in any way, and it even manages to be a superset to the older versions (which were, admittedly, crude).

    6. Re:Good News/Bad News by Anonymous Coward · · Score: 0

      Actually, Perl has private members, accessor generation and a lot of other features, if using the right module (or one of the many others, TIMTOWTDI ;-).

    7. Re:Good News/Bad News by Fweeky · · Score: 1

      I don't really want to switch over to Ruby / Python, largely for performance reasons

      Why, do you need your language to be slower than Python but not slower than PHP?

    8. Re:Good News/Bad News by Anonymous Coward · · Score: 0

      Given that I have to maintain several apps running on PHP 4, I can confirm there are no exceptions in PHP 4. Try/Catch blocks just result in parse errors.

    9. Re:Good News/Bad News by Bill,+Shooter+of+Bul · · Score: 1

      Strange. Are you really suggesting wrapper functions around PHP's native functions for no other reason than to fix naming conventions? That seems like a bad idea. New developers to the project will have to learn your conventions and remember not to just use the native functions. Having said that there are also cases where you can reimplement a built in PHP function in PHP code that is faster than the built in function, but less flexible.

      It does remind me about a embeded C project I once worked on where someone had written wrapper functions for some built in c functions, that did nothing except switch the order of the parameters( because he once worked with a c compiler that accepted those as functions). Of course he left the company after a mental breakdown, and the subsequent developers sometimes used his wrapper functions and sometimes the the built in C functions. It was a bit of a mess that I'd rather avoid if possible.

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    10. Re:Good News/Bad News by daemonburrito · · Score: 1

      Are you really suggesting wrapper functions around PHP's native functions for no other reason than to fix naming conventions?

      No, silly. I'm saying that a developer new to php, coming in on php5, would never even encounter the cruft that people complain about. The crudeness mentioned in GGP is optional. PHP earned its reputation as an ugly language two major versions ago.

      PHP5 is pretty. Really. That you can still write it like it's php3 shouldn't be held against it.

    11. Re:Good News/Bad News by encoderer · · Score: 1

      You can type CAST in php4 but you can't type HINT.

      And I would also disagree that eval() is any sort of substitute for try..catch blocks. The real leap forward wrt error handling wasn't so much try..catch, it was the fact that exceptions were added to the language, which is the whole point of try..catch (to catch a thrown exception).

      But I agree with everything else you said.

    12. Re:Good News/Bad News by Bill,+Shooter+of+Bul · · Score: 1

      Oh, okay. I understand. The only thing you have to worry about is people picking up a book to learn PHP. I had a friend that picked up one of the first php5 books, that had them using the old crufty deprecated functions and horrible security practices (ie magic quotes and register globals are your friends!).

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    13. Re:Good News/Bad News by daemonburrito · · Score: 1

      I've seen those, too! Terrifying and hilarious.

    14. Re:Good News/Bad News by billcopc · · Score: 1

      You must be a Java developer.

      --
      -Billco, Fnarg.com
  9. PHP is a minor evil perpetrated and created by... by exabrial · · Score: 5, Funny

    PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals. -- Jon Ribbens Amen.

  10. As a big fan of PHP who cut his teeth on PHP4 .. by kestasjk · · Score: 4, Informative

    .. let me say hooray! PHP5 is worlds ahead.

    Let me also say they're wrong about legacy systems being slow to migrate: PHP5 runs PHP4 code just fine (notwithstanding a few copy-on-write and unassigned reference issues, which are very easy to fix).

    PHP5, in this context, would be better called "Zend Engine 2", since that's what the real update is. PHP4 the language is essentially just a subset of PHP5.

    Incidentally (perhaps) the phpMyAdmin 3.0.0 beta just came out yesterday which sacrifices Zend Engine 1 (PHP4) support. It also drops MySQL 4 support, and I think lots of projects will follow suit; PHP4 is going to drag MySQL 4 with it, which is also great.

    --
    // MD_Update(&m,buf,j);
  11. Fact check please? by Jack9 · · Score: 4, Interesting

    With eight years of legacy code out there, it is likely that there are going to be a fairly large number of systems that will not migrate to PHP 5 in the near future, and a reasonable proportion of those that will not make the migration at all.

    I question the validity of these assumptions. My first salaried job was programming PHP/FI 2 (1998). I cannot find a single product I have been involved with or even used in the past (which contains PHP code), that hasn't upgraded. Systems written in PHP could only benefit from the improvements in 5 and there's almost nothing written in PHP that's so critical* that it wouldn't be upgraded by the current developers or new developers trained in 5.

    *This is both a side effect of the language design and the people who write it.

    Can someone give some examples of products stuck in 4.0?

    --

    Often wrong but never in doubt.
    I am Jack9.
    Everyone knows me.
    1. Re:Fact check please? by adriccom · · Score: 1

      While stretching the definition of product to include "some code that some guy wrote for us" I'd say .. half of our customers code? Plus a bunch of actual products, commercial software even, that our customers have licensed and depend on for their businesses. Obviously I can't share much detail.

      Not that PHP4 isn't lossy, just that you are being hopelessly naive. Or hopeful. Either way, cut that out :)

      Oh, and I don't think the backdoors and shells are updated fully to take advantage of 5. Backwards compat is very important to their markets :D

      --
      <script>alert("I never liked JavaScript, really; it just seemed a bad idea.");</script>
    2. Re:Fact check please? by Anonymous Coward · · Score: 3, Informative

      Ubersmith.

      They provide billing automation and equipment management for lots of hosting companies and datacenters. They said that they're supposedly "working" on a PHP5 version, but that statement was said months ago.

      Notice "Ubersmith does not support PHP 5.x at this time" on the order pages of both:
      http://www.ubersmith.com/products/pro/order.php and
      http://www.ubersmith.com/products/lite/order.php

      From the looks of their blog, their appliance version supports PHP5, but not so sure about the self-hosted version.

    3. Re:Fact check please? by Anonymous Coward · · Score: 2, Interesting

      I sell PHP scripts, and I'd estimate 30-50% of my customers are still using PHP 4. Many of them have told me they tried PHP 5, but it broke some other ancient script they were using. Or some are still using four year old versions of my scripts and refuse to update.

      The users aren't programmers. You can't tell them it's easy to fix the little problems in their legacy scripts, because they struggle to upload files, let alone write code. They're going to stick with PHP 4 until they're dragged forward kicking and screaming... and even then they'll probably just switch to a web host that offers PHP 4.

      As a result, even if I optimize for PHP 5 I have to keep compatibility with PHP 4 indefinitely in order to avoid losing customers.

    4. Re:Fact check please? by Anonymous Coward · · Score: 0

      Can someone give some examples of products stuck in 4.0?

      If it still hasn't migrated or somehow feels it's hard, the product is either very crappy code or developers don't reserve their paychecks. Seriously.

    5. Re:Fact check please? by kamikaez · · Score: 1

      eZ Publish was for a couple of years, but they got their php 5 version out late last year thanks to heavy community pressure. The instant effect was a 2x performance boost thanks to php 5(.1|2) alone.

      The php 5 version (4.0) does not work in php 4, the reason is the difference in the reference system. Because they have one of the biggest oop php code bases around they had to do major rewrites twice (4.3 -> 4.4 and 4.4 -> 5.x). Looking back, it would probably been a good idea to skip 4.4 all together..

      --
      This is a signature..
    6. Re:Fact check please? by Anonymous Coward · · Score: 0

      almost every php project we develop at our company. Sure lots of our projects would work fine with php5, but, first you need time to check this, and time is what we haven't. Also, php projects using the domxml extension would suffer, as domxml isn't supported in php5 (but you can get some code work like the old domxml so you don't need to rewrite an entire project, just a domxml extension that calls php5's dom extension).

      As I said, if we had some time, sure we'll upgrade all projects to php5. But hey, we still have one big project running in php3 and lots of incoming projects every month. If it works, don't fix it, and do some work on new projects.

  12. Re:PHP is a minor evil perpetrated and created by. by Anonymous Coward · · Score: 0

    Looking for a (-1, Troll), aren't we? True or not.

  13. Obligatory post by 93+Escort+Wagon · · Score: 2, Informative

    For a technology that has been in stable release since May 22, 2000, PHP 4 has finally reached the end of its official life.

    I'd like to propose that Slashdot "editors" be stripped of that title, and from now on be referred to simply as "approvers" - there's obviously no editing involved in the job at all.

    --
    #DeleteChrome
    1. Re:Obligatory post by Quartz25 · · Score: 1

      You must be new here.

      --
      Most people don't get why the integral of "e to the x" is so funny. Most math majors don't have a sense of humor.
    2. Re:Obligatory post by TheRealMindChild · · Score: 1

      In Soviet Russia, New Here Musts YOU!

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    3. Re:Obligatory post by Whiney+Mac+Fanboy · · Score: 1

      I'd like to propose that those who complain about Slashdot editing standards are now simply referred to as "whiners".

      This is a blog - you're a guest here. Get over it.

      --
      There are shills on slashdot. Apparently, I'm one of them.
    4. Re:Obligatory post by Trogre · · Score: 0, Offtopic

      I guess I won't be applying for that title. What, pray tell, is wrong with that sentence?

      They even used "its" correctly, not "it's".

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    5. Re:Obligatory post by WhyMeWorry · · Score: 2, Interesting

      Copiers would be a better term. The original article has the same problem. What was their excuse?

    6. Re:Obligatory post by Arimus · · Score: 1

      Since when is /. a blog???

      Suspect /. being a blog is news (hey, maybe that would be more news worthy than some of the news ;) ) to alot of people on here...

      --
      --- Users are like bacteria -> Each one causing a thousand tiny crises until the host finally gives up and dies.
    7. Re:Obligatory post by NormalVisual · · Score: 1

      /. seems to be more of a loose tech news aggregation site to me, but even then it seems most readers are here for the comments.

      --
      Please stand clear of the doors, por favor mantenganse alejado de las puertas
    8. Re:Obligatory post by drinkypoo · · Score: 1

      Once Slashdot started selling subscriptions they stopped being a "blog". Besides, you're the whiner :P

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    9. Re:Obligatory post by Trogre · · Score: 1

      I somehow managed to get modded down for asking why you hold that opinion.

      Could you, 93 Escort Wagon, please tell me why posting the sentence, "For a technology that has been in stable release since May 22, 2000, PHP 4 has finally reached the end of its official life." is such an editing faux pas?

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    10. Re:Obligatory post by Whiney+Mac+Fanboy · · Score: 1

      Oh, you can be a blog & have subscriptions. And I only whine about how great Macs and OS X are.... ;-p

      --
      There are shills on slashdot. Apparently, I'm one of them.
  14. Re:Good time to migrate to PHP 7... by ya+really · · Score: 0, Troll

    Python 3 is still in beta. And python on the web? No thanks.

  15. First step to get rid of PHP. Now... by Anonymous Coward · · Score: 1, Funny

    ...when will that happen to PHP5? :P

  16. Re:Good time to migrate to PHP 7... by brianez21 · · Score: 1, Interesting

    And python on the web? No thanks.

    FYI - Google uses Python extensively on the web.

    --
    kernel: lp0 on fire
  17. Official "Migrating from PHP 4 to PHP 5" document by Parham · · Score: 4, Informative
  18. You know what? by Ambush+Commander · · Score: 4, Interesting

    You know what? I'm sick and tired of the fact that every PHP related post to Slashdot ends up sludgefest of old jokes, one-line jabs at PHP, and misinformation.

    Official ending of PHP4 support is a big thing in the PHP community. If you're a reader of Planet-PHP, you'll know this; for almost all of 08/08/08 there was nothing but end-of-life celebrations from the bloggers. The community has done an exceptional job at getting developers, open-source projects and hosters alike to migrate to PHP5 for such a heavily used language. And we will have to surmount even bigger difficulties for PHP6 and Unicode, which unlike PHP5, breaks backwards compatibility with any project that treats strings as binary data. Migrating PHP4 to PHP5 is not difficult; often it's as simple as an edit to the server migration. PHP6 will definitely demand code changes.

    For those of us who use and "have to deal with" (yes, we have our annoyances too) with PHP on a daily basis, this is good news. For the rest of you, please contribute something meaningful, or forever hold your peace.

    1. Re:You know what? by mseidl · · Score: 0, Redundant

      Imagine how Bill Gates must feel...

      So lonely...Oh so lonely...

    2. Re:You know what? by chromatic · · Score: 1

      I'm sick and tired of the fact that every $language related post to Slashdot ends up sludgefest of old jokes, one-line jabs at $language, and misinformation.

      Fixed it for you.

    3. Re:You know what? by Tim+C · · Score: 2

      You know what? I'm sick and tired of the fact that every PHP related post to Slashdot ends up sludgefest of old jokes, one-line jabs at PHP, and misinformation.

      That's just slashdot, it's nothing against PHP specifically. Java, .NET, perl, Windows, OS X, etc all get the same treatment to greater and lesser degree.

      The sad fact of the matter is that many of the most vocal people here have the maturity of a teenager.

    4. Re:You know what? by Anonymous Coward · · Score: 0

      ? You must be new here.

    5. Re:You know what? by Bob+The+Cowboy · · Score: 1

      You must be new here!

      In other words, /. has a large percentage of people that bask in irreverence. No need to be thin skinned about it ;o)

      And congrats to the PHP team and users.

      Bill

  19. Re:As a big fan of PHP who cut his teeth on PHP4 . by Anonymous Coward · · Score: 0

    Let me second that. I started PHP with version 4, and I rejoiced when I moved to PHP 5 and the new object model. Version 4 dies just in time for version 5.3 and version 6 to come along. Those two bring a lot of nice things, but nothing as revolutionary as that new object model of Zend 2.

    It's high time to say goodbye to version 4!

  20. Re:Good time to migrate to PHP 7... by XorNand · · Score: 5, Interesting

    So you're not personally familiar with python-based web development. There are a great many people out there that are though: Django, Pythons, Turbogears, Zope are all great places to start.

    --
    Entrepreneur : (noun), French for "unemployed"
  21. Re:Good time to migrate to PHP 7... by ya+really · · Score: 1

    I'll take a look at the sites and mess around with it some. Python always look interesting to me, but I never thought of it as being useful on the web.

  22. Upgrading is not that hard... by JoeCommodore · · Score: 4, Interesting

    I went to PHP5 quite a while back. I started with 4 and had already been programing nice (long tags in html, program with globals off, etc.) so there was no issue for me, everything just worked on 5. I do have one script I found on sourceforge (dead project) that doesn't work on 5, probably used something deprecated from 3 slated for removal after 4. I don't expect conversion of that to be too serious either.

    I think a lot of the FUD is being placed on ISPs who run PHP4 servers and may have outdated cpanels or other pre-set PHP apps. I would think maybe a weeks worth of work for most mom and pops to get the upgrade complete (a lot it setting up automating on any data upgrade conversions) but it's surely not the end of the world.

    --
    "Enjoy what you're doing! If it becomes drudgery, you're doing it wrong!" - Jim Butterfield
  23. Go PHP 5! by GrouchoMarx · · Score: 5, Interesting

    For those wondering how many projects will be left out in the cold, here's your answer:

    http://gophp5.org/

    Over 100 PHP projects and products and over 200 web hosts that have been committed to PHP 5.2 and no earlier for over a year. GoPHP5 launched before the PHP development team announced an EOL for PHP 4. While I don't believe for a second that it was the only reason they made that decision, I also don't believe for a second that it didn't have a big influence on it.

    The push to drop PHP 4 support came from people using PHP in production in the first place. Those of us who get paid to write PHP code are cheering at the top of our lungs, because now we can actually get real work done.

    Go PHP 5!

    --

    --GrouchoMarx
    Card-carrying member of the EFF, FSF, and ACLU. Are you?

    1. Re:Go PHP 5! by omfgnosis · · Score: 1

      With all due respect, why was PHP 4 being around preventing you from getting real work done (in 4 or 5)?

    2. Re:Go PHP 5! by Aladrin · · Score: 1

      I'm not 100% sure what his point was, since he doesn't make much sense, but I can state the objection to 4 still existing:

      The developers of PHP can now spend time working on 5 & 6 instead of maintaining 4. Progress can be made on things that matter that could not be before.

      I'm not sure it really makes all that much of a difference, my self. Progress will happen whether someone is maintaining the old version or not... And there's no guarantee the progress will be faster now.

      --
      "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
    3. Re:Go PHP 5! by Jeff+DeMaagd · · Score: 1

      For those wondering how many projects will be left out in the cold, here's your answer:

      http://gophp5.org/

      Over 100 PHP projects and products and over 200 web hosts that have been committed to PHP 5.2 and no earlier for over a year.

      That's not an answer to the question of how many projects would be left behind, that's a lower bound on the number of projects moving to the new version.

      Where did you learn your argument forms, from a politician?

    4. Re:Go PHP 5! by GrouchoMarx · · Score: 1

      With all due respect, why was PHP 4 being around preventing you from getting real work done (in 4 or 5)?

      Shared web hosts. The problem with PHP 4 was that hosts weren't upgrading because projects weren't requiring PHP 5, and projects therefore couldn't require PHP 5 because none of the web hosts offered it. And so it was still in widespread use, so the PHP dev team had to keep supporting it. No one wanted to be the first to "jump", because whoever jumped first would get burned (either by a cost to upgrade servers that wasn't needed or by limiting your product to a small number of possible install servers).

      So instead, we all jumped at once together. Now, developers can write PHP 5-dependent code with a reasonable level of confidence that users will be able to run it, either on their existing host or on any of 200+ web hosts that do offer PHP 5 out of the box.

      And by "real work", I mean "not working around design flaws in PHP 4's object model and avoiding using utility routines that were added in PHP 5 because I can't rely on them being there".

      Imagine not being able to use Linux 2.6 when developing system utilities, because no one is upgrading from 2.4, even though 2.6 has been out for 4 years.

      --

      --GrouchoMarx
      Card-carrying member of the EFF, FSF, and ACLU. Are you?

    5. Re:Go PHP 5! by omfgnosis · · Score: 1

      Can you name... five popular hosts that don't offer PHP 5 support?

  24. Obligatory Crap by fm6 · · Score: 1

    I could quibble with your definitions of "blog" and "guest", but it doesn't really matter. Misinformation is misinformation, whether it's from a blog or a newspaper. People have a right, even a duty, to complain about somebody who sloppily shares "facts" that are really nonsense. It's not "whining", any more than it's "whining" to complain about a rock thrown through your window.

  25. Re:Oh well by alexborges · · Score: 1

    Huh?

    --
    NO SIG
  26. Re:Good time to migrate to PHP 7... by Yvan256 · · Score: 1

    ...aka Pythons on a Plane.

  27. Re:Oh well by Prep_Styles · · Score: 1

    I second the "HUH?", care to elaborate?

  28. Re:Good time to migrate to PHP 7... by Micah · · Score: 2, Informative

    Yeah. Even without the frameworks, I like mod_python a whole lot more than PHP. PHP seems like a bunch of nasty hacks to me.

  29. Awesome. by Kingrames · · Score: 1

    Now I feel slightly better about having forced my colleagues to upgrade PHP to version 5.

    In my defense, I was using array_walk_recursive, but I'm sure they were quite frustrated by the problems I created.

    --
    If you can read this, I forgot to post anonymously.
  30. OOP is Overyped by Tablizer · · Score: 2, Insightful

    The object support [in 4] was nasty, but still better then the pseudo-object crap that perl has.

    Be careful. Some of us feel that OOP is overhyped. While I can see use for it in operating systems and systems software, eCommerce and biz apps have had a difficult time making use of OOP well. I've yet to see a decent example of OOP helping these. (Of course, "decent" is often in the eyes of the beholder.) But, I might change my mind if shown a decent example.
         

    1. Re:OOP is Overyped by daemonburrito · · Score: 4, Interesting

      OOP is not overhyped. Just misunderstood. PHP4's object model really was a bit nasty, as evidenced by the projects that jumped into using it before they understood how it was meant to work (e.g., oscommerce).

      Decent example of php5 (zf, in fact) e-commerce (bleh): Magento, 2008 sourceforge best new project.

      The reason that there is a lot of procedural php4 code out there is that the older api's don't make sense in php5's paradigm. With the millions of people used to writing to api's like Drupal's or Wordpress's, the change was glacial.

      But it is totally clear: PHP5 better than PHP4. OOP good.

      Note: I am a former Dijkstra devotee. I've heard every argument you can imagine against OOP.

    2. Re:OOP is Overyped by jimicus · · Score: 1

      Be careful. Some of us feel that OOP is overhyped.

      I wouldn't say overhyped. I think it provides a good design framework for large systems.

      However, I don't think it's always particularly well taught. To all intents and purposes, it's a superset of top-down programming - it's just that you don't apply top-down ideas until you get to the stage of writing individual methods. Thing is, as far as I could gather when I was in university only a handful of lecturers (generally the more experienced senior ones) actually understood this.

      Perhaps I should have gone to a different university ;)

    3. Re:OOP is Overyped by Anonymous Coward · · Score: 0

      Any eCommerce or business applications that are coded in any sort of decent fashion will make use of some framework or other, which will inevitably be object oriented, and will provide great benefits.

    4. Re:OOP is Overyped by Tablizer · · Score: 1

      Any eCommerce or business applications that are coded in any sort of decent fashion will make use of some framework or other, which will inevitably be object oriented, and will provide great benefits.

      That is a rather strong claim. I'd like to see a coded demonstration if you don't mind.

    5. Re:OOP is Overyped by encoderer · · Score: 1

      How about this... you want examples of "good" OO web apps?

      Tell me this..

      What is there about "operating systems and systems software" that can benefit from OOD that isn't there in web apps?

      I've never seen a procedural CRUD app that couldn't be done better with a data Model.

      With a Model I can contain ALL logic for creating, updating, retrieving and deleting records, with a single point of user authentication and data validation. That's worth it's weight in gold.

      You specifically mention e-commerce.

      So think of a Products table. Chances are, you'll be using Product data on nearly every single page in your app.

      In one corner is procedural code, where you have to worry about the implementation of the Products table on pages like the "review your order" or "similar items." That is, I have to think about (and hard-code into SQL strings) the names of columns in the product table. I have to pollute every single page with implementation details of the product table. You change the schema, you have to find every page that touches that table and update it.

      An example:

      $sql = 'Select productName, productDescription, proudctPrice from products where product = ' . $id;

      In the opposing corner is OOD. I would create a products Model. Once. I would write one set of SQL strings. Once. And use my "api" from then on.

      An example:

      $product = new Products($id);

      Now, that's implementation. How about the language itself?

      Procedural code:
      You have an array? What's the size? you have to use the count() method (or sizeof()). You have a string? You have to use strlen(). You want to add 2 dates together? You have to convert to timestamps and then add and then convert back to a string-date for readability.

      OO Code:
      The size of an array?

      $myArray->size();

      The size of a string?

      $myString->size();

      Add two dates?

      $dateOne->add($dateTwo);

      How about reading a file?

      Procedural:

      $handle = fopen('/path/to/file', 'r');
          $contents = fread($handle, filesize('/path/to/file'));
          fclose($handle);

      OO:

      $file = new file('/path/to/file');
          $contents = $file->read();

      It's about encapsulation.

      Imagine I was writing the software for you.

      If this is OO software, and I want to know your eye color, I ask you:

      $tablizer = new Person(95088);
      echo $tablizer->appearance->getEyeColor();

      In procedural code, I have to ask somebody else to ask you:

      $tablizer = getPersonHandle(95088, 'r');
      echo appearanceTrait($tablizer, 'eyeColor');

      It's about logical organization. Layers of increased specificity. Abstractions that eliminate the need to worry about the unnecessary at any given level.

      I started my career as a procedural developer. Learning, really learning OOD was way more difficult than just learning a new language is. But it's worth it. I would never go back. Not for web apps. Not for rich client apps. No way.

    6. Re:OOP is Overyped by Tablizer · · Score: 1

      I've never seen a procedural CRUD app that couldn't be done better with a data Model.

      I agree, but the data model doesn't have to be OO.

      That is, I have to think about (and hard-code into SQL strings) the names of columns in the product table...You change the schema, you have to find every page that touches that table and update it.

      No you don't. You can either use asterisks, or table-driven data dictionaries. Data dictionaries as tables are easier to enter, search, sort, report, and filter than those hard-wired as code classes. Attributes as tables are simply easier to read, print, search, or reformat than set/get code. Code is a poor substitute for an attribute grid. Maybe you can read such as code, but as tables its about 5 times easier to read/reformat to my eyes. If you can speed-read such code, I applaud you. But I'm not you.

      You want to add 2 dates together? You have to convert to timestamps and then add and then convert back to a string-date for readability.

      That's a typing issue, not an OO issue. And if the API internally represents dates in the format "YYYY-MM-DD HH:MM:SS" (military time), then no conversion is needed for most operations, except for display, which often varies anyhow between reports, such as displaying 2-digit year to make them compact enough to fit on a page, or lopping off the time portion. Its a matter of accepting a standard internal and string-able representation. (Again, its a typing issue anyhow, not an OO one.)

      As far as your file open example, its possible to create a single procedural function to read the entire contents in one shot:

          $contents = readFileContents(filePath, flags);

      If a given language doesn't have that built in, then its not the fault of procedural in general, but that specific language. But its usually easy to make your own.

      And I'm not sure what your array examples are meant to show.

      I started my career as a procedural developer. Learning, really learning OOD was way more difficult than just learning a new language is. But it's worth it. I would never go back. Not for web apps. Not for rich client apps. No way.

      To each their own. Anyhow, it sounds like you never bothered to stretch your procedural skills, for the "problems" you described are perfectly fixable without going to OOP. The fact that you failed to remember/know about them tends to support this premature-bailout suggestion. You've shown you have not mastered procedural/relational techniques (or at least forgot a hell of a lot of disclaimers).

      It's about logical organization. Layers of increased specificity. Abstractions that eliminate the need to worry about the unnecessary at any given level.

      Decent abstraction is often about relative viewpoints in non-trivial apps, not hierarchies of "levels". Trees are limiting in this regard. Abstraction is relative to task. Trees are also over-hyped: they have a seductive simplicity that simply does not scale well. OO-ers tend to over-force things into trees. (I'm not saying they must force, but it is a common habit.)

    7. Re:OOP is Overyped by Tablizer · · Score: 1

      Rather than have large systems, perhaps its better to break the project into multiple smaller systems. It's easier to manage bunches of little systems than one gigantic pile of code. The failure rate seems to go up non-linear with project size. True, not all projects are dividable this way, but enough of them are. Maybe code the hardest sub-project(s) first, and then use that one as the template for the others. (Going easy-to-hard has not worked out in my observation.)

      And good procedural does not use "top down" anymore (in my opinion). Rather, it uses the database as the central "message" manager, but otherwise divides up into semi-independent tasks. I compare it to villages (tasks) along the Nile river (database). The database is the communications and transport backbone between tasks.

      For a simplistic illustration of this, imagine a menu of options. The menu is stored in the table, and associated with each menu item description is a task name or URL.

      There's always going to be smaller-scale top-down, but large-scale 70's style top-down is out.
               

    8. Re:OOP is Overyped by encoderer · · Score: 1

      What I'm taken aback by is that you don't seem to disagree with the OOD Theory. You seem to just not 'get it.'

      First, the post I wrote was far longer than anybody else who had replied at the time of my writing this. There's only so much you can ask for in a comment on a message board. There are dozens of BOOKS on this topic, as somebody else mentioned,

      That being said, here's the part it seems you just dont "get."

      The difference between procedural "encapsulation" and object encapsulation is about behaviors.

      In procedural code, the behavior and the data structure are separate. You can have, say, an array to hold data. And then a series of related-but-not-connected procedures ("behaviors") that act upon it.

      In OO code, the object contains the data (perhaps using array(s) as well) AND the behaviors.

      Take the language examples I gave. When an array is a first-class object, as it is in any complete OO language, it exposes not just the ability to store data, it also exposes common behavior: push, pop, sort, ksort. And it also exposes metadata such as size.

      In a procedural language, these behaviors are all isolated from the data structure itself. The only thing connecting them is documentation.

      So, in PHPs function library, if you want to see what behaviors are available for an array, the only way to see a truly complete list is to hope that the documentation is up to date.

      In a complete OO language (Java, any .Net language, etc), there is an Array class. You can look at it. ALL of the behaviors are right there, in the class.

      The same principle holds true in the data types you create in an application.

      And to tie in to how I began this post... it sounds like you're not disagreeing with tying behavior to data. It sounds like you just don't get it.

    9. Re:OOP is Overyped by Tablizer · · Score: 1

      The tight associations between data and behavior perhaps makes sense for textbook animal, shape, and device-driver examples, but does not scale well to domain entities/objects, or at least does not improve it in any noticeable way.

      And to tie in to how I began this post... it sounds like you're not disagreeing with tying behavior to data. It sounds like you just don't get it.

      You are right, I don't "get it". Nobody has shown exactly where and what it makes better in REAL code, not just cutesy shape and animal examples or other things artificially shoehorned into hierarchical classifications. (Again, set theory is a better model for realistic variations-on-a-theme management, not subclassing.)

      Some claim its about "compile-time checking" to make sure the right operation goes with the right data, but again many OO languages to not do this step in any formal way. It seems an anti-interpreter argument and is against dynamic OO also.
             

    10. Re:OOP is Overyped by Tablizer · · Score: 1

      (addendum)

      Perhaps you are talking about auto-complete in code editors? OO was being promoted under almost the same claims before auto-complete was even widely available. Thus, IDE auto-complete cannot be the main reason for it.

      (Function-based auto-complete is possible, BTW.)
         

    11. Re:OOP is Overyped by encoderer · · Score: 1

      I'm curious: Have you ever used a fully OO language?

      If not, and if you really have intellectual curiosity, you should go download Visual C# Express (for free) and get a C# book (for $40).

      In a fully OO language, which PHP is not, everything is an object. So, when you initialize a string, it's actually an object. You can dig down and find the String class definition. You can extend the class. Etc.

      The fact that you used the word "Subclass" makes me think you come from, perhaps, a Visual Basic background. (Ditto your use of "Setters" and "Getters" that you mentioned in an earlier post). I did a lot of VB6 work some years back, too, so this isn't a dig. I'm just curious.

      Because when you're using an OO language, and you begin to think in terms of "Everything is an Object" you'd be surprised how natural it can feel.

      And you knock the textbook examples, but the thing is, they are accurate. Software is often about modeling real-world problems and phenomena.

      It's not just abotu levels of abstraction, it's about increasing levels of specification.

      Here's a textbook example that has the benefit of being a real-world problem:

      HTML Forms are an easy target, because they're just consistent enough to be able to abstract away, and because they're just a big enough PITA to want to.

      It just so happens, that this is a really great example of inheritance and polymorphism.

      First, there's going to be a class that represents the form itself. It has data -- the action, method, form name, dom ID, etc. And it has behaviors -- render(), loadFromPost(), etc.

      It also holds a collection of Input objects.

      So we create a class called Input. It holds all the logic that is common to every HTML form control, [input], [select], etc.

      And it also exposes some abstract functions, which means that there is no CODE in these functions in this class, it just lists the function definition, and it's the job of the extending classes to supply the implementation. Abstract functions in this class would be, say, render(), setDefaultValue() and getValue().

      Then we'd have a TextInput class Extends Input. PasswordInput and TextareaInput would extend TextInput. SelectInput would extend Input, and perhaps MultiSelectInput would extend that.

      And at a lower level, you can get really cool:

      EmailInput extends TextInput, DateInput extends TextInput, etc.

      Each of these fields is rendered in slightly different ways. They share many traits, but are also unique in many ways.

      With an object heirarchy of this type, all shared logic lives in a shared point of generalization. Each extending class (aka subclass) adds a further level of specification.

      And the beauty of this is that when the form is submitted, and the object hierarchy is reconstructed in memory (most likely it was just put to sleep, so to speak), you can load all the field objects into an array.

      And you can do something like this:

      foreach ($fields as $field)
      {
      if ($field->validate())
      {
      $dataModel->importValue($field->value());
      }
      else
      { // Throw Exception
      }
      }

      And in this loop, we don't have to worry about what kind of field it is. We don't have to worry about what validate() is doing. We don't even have to worry if there IS no validate() method on the specified class, because if there isn't, it'll inherit the validate() method from a more general level.

      Same with getValue(). Or, on the form-render side, the setDefaultValue(). It doesn't matter to us that checkboxes, selects, inputs, etc, will all set values in a different way.

      And the truth is that you may make some blanket claim like "OO Heirarchies don't work with domain problems" but that's just not true.

      Because when you think not in terms of levels of abs

    12. Re:OOP is Overyped by TheSunborn · · Score: 1

      When I have problems with the relational model, it is always because while I really like to query the relational model, I don't want to get the data back in a grid. I want the result back as a hierarchy.

      Example:
      Imagine I have a database with the tables:

      user,story,comment
      Where each user can have multiple stories and each story can have multiple comments.

      Now i want to get a list of all users that have a story, with a comment that contain the word xkcd. The query is easy: Just
      select from comment, join story and then join user.

      But the presentation is difficult if I want to list the stories together with the user they belong to.
      Just imagine I already have a function that can show an user. What input could such a function take? It can't take a user object, because I have no easy way to get the the result from the sql database to a user. It can't take the sql result directly, because it contain the same user far to many times.

      Or an even worse problem:
      Imagine a page, that can display either "all users, all their stories" or "all users all their stories and all comments for all stories"

      Writing such a function is difficult, because you need to show each user and story only once. The only solutin I can come up with, is to sort the result, by user,story and then skip the show user/show story code, if the user for this story is the same as the user for the previous story.
      And a presentation function, that require that data are sorted a specific way is not good.

      This is the reason that most web developers, really want an oop database. That is: A database that you can query as a relational database, but which can give you back data in a hierarchy. And a hierarchy that can be walked by the application, so that if the query you issued just gave you a list of users, but you for a single user need all his stories, you can just get call getStories() and then a new query will be issued. (But if the original query also fetched the stories, then that list would be returned. But it sholud be transparent for the application developer if a new query
      was sendt to the database).

      The problem with this oop database, is mainly that nobody have written it. (And you get some issues with locking and transactions).

      The best solution I have seen so far(In java) is to use an oop mapper such as Torque, where I can define the database in sql, and then torque will based on the database and the foreign keys create java classes and methods for me. So in the example above, there would be a foreign key linking a story to a user, so torque will on my user object create a getStories() method that will get all stories for that user.

      I know this problem might be special for web applications, because most web application very much presentation data and simple input/output work, and relative little advanced query operations.

      Just look at slashdot very much input/output and simple query/overview page. But no pages that require special or complicated sql.

      Martin

    13. Re:OOP is Overyped by Tablizer · · Score: 1

      And you knock the textbook examples, but the thing is, they are accurate. Software is often about modeling real-world problems and phenomena.

      I've already commented on this "real world" issue re Bertrand Meyer. You have not provided a decent real-world-fit measurement technique. It comes across as sloganeering.

      And in this loop, we don't have to worry about what kind of field it is.

      Same with a data dictionary. And with a data dictionary its easier to key data into and display in different ways as already described. When all those field attributes are hard-wired into code, they are hard to study and see and re-sort as a group. Code is a poor substitute for a grid.

      S60 Extends Volvo extends Sedan extends Automobile extends TransportationDevice.

      False. If you study ACTUAL business things and see how they vary from each other, you will realize that a hierarchical classification (subclass) is not powerful enough. Categorization philosophers have known this for centuries. The variations often don't fit nicely into a tree, especially as they grow. They simply don't. I'm telling you the truth, dude. A mix-and-match buffet-style feature selection approach is a better fit. This is what sparked my interest in sets. Sure, you can force everything into a hierarchy if you try hard enough, but it gets messy and duplicative. I've worked with product classification catalogs where the naive developers tried to force things into a tree.

      And I type this: $startDate-> It will show me a list of every Date behavior: add(), diff(), toTimestamp(),

      And I can type "date functions" into Help and get the same thing. Besides, some operations can go into multiple groups, such as conversion operations. Function-based auto-complete is technically possible (although not common).

      Same with getValue(). Or, on the form-render side, the setDefaultValue(). It doesn't matter to us that checkboxes, selects, inputs, etc, will all set values in a different way.

      Same with data-dictionary based UI's.

      And while function-based intellisense is possible, it's not nearly as helpful.

      You have not demonstrated that it must be limited by the natural laws of the universe. But you are comparing apples to oranges for the most part anyhow. The approach one takes in a procedural/relational framework is different. And a GUI system should ideally be mostly declarative anyhow in order to be sharable by multiple languages without reinventing the wheel. OOP API's have made it hard to share GUI engines across languages because each language handles polymorphism, inheritance, etc. all different enough, meaning that Java and C# have a completely different GUI engine. If we have 30 different common languages, does that mean we need to reinvent 30 different GUI engines and interfaces? That is not logical. OOP is xenophobic in this regard.
           

    14. Re:OOP is Overyped by Tablizer · · Score: 1

      Writing such a function is difficult, because you need to show each user and story only once.

      So you want something like?:

        Bob Jones
        . . . Story A
        . . . Story B
        Michelle Wong
        . . . Story C
        . . . Story D
        Etc...

      If you've used "banded" report writers, like Crystal Reports or MS-Access's report writer, then you'd see there are design idioms/tools to handle this kind of thing. The problem is that they've been slow to make it into HTML-oriented tools (although ColdFusion has a "group" option for an "output" loop that handles a lot of this).

      This is the reason that most web developers, really want an oop database...The problem with this oop database, is mainly that nobody have written it. (And you get some issues with locking and transactions).

      If you have a schema does isn't merely a nested aggregation, then you'd see that an OOP database becomes sticky. For example, in real books any given story or book can have *multiple* authors. You would then no longer have a simple de-composition hierarchy. Non-trivial systems are usually like this. OODBMS are especially messy or inconsistent when it comes to many-to-many relationships. IBM's IMS database users learned this the hard way several decades ago.

      RDBMS tend to focus on info outside of any single app. OO developers often forget this, and try to create the schema for one specific usage or application or report, which boxes you in. RDBMS take a more forest-level view.

      Just look at slashdot very much input/output and simple query/overview page. But no pages that require special or complicated sql.

      You don't know that. Perhaps their internal reporting is quite complicated. There's a lot of complexity behind the scenes that one may not consider by merely looking at a single reply tree.

    15. Re:OOP is Overyped by encoderer · · Score: 1

      OOD is a paradigm that evolved 30 years ago and, today, is more popular than ever.

      You seem convinced in your own ability to appraise its worthiness, and you have done so.

      You at once seem eager to sample everything offered to you, and eager to eliminate huge swaths of what's presented based only on your own bias.

      Not once have I expressed my opinion about what paradigm is best for anything. You seem concerned about nothing else than what you feel is "best."

      At first it seemed like you were interested in a back and forth about the merits of a technique that is arguably the most popular in software development today.

      I didn't expect to "convince you" of anything. What I did expect was a discussion of merits, and not a fixation upon your own personal bias.

      I suppose I Should've known better based solely on how you first presented yourself, belicose with the "hold on, some of us..." comment.

      As a software developer, there's nothing I hate more when I see or hear it than assumptions. You've built quite a little comfort zone for yourself inside your assumptions.

      What you are missing, though, is that you're only handicapping yourself. By refusing to use a common tool in todays web-development tool box, you're doing nothing but boxing yourself in and limiting your own earnings potential.

      What I'm getting at is that you're argument is far too faith-based with far too much belief in your own dogma.

      There is nothing you've written that hasn't been argued by people smarter than either of us, at length, as far back as the 1970s.

      None of your points matter to me, because I'm not looking for purity or dogma. I'm looking for the best tool to do any given job. And I'm not letting personal bias get in the way of that.

      You've elevated "Procedural Design" to religion in your own mind, replete with "I'm telling you the truth, dude" logic that I can hear on any NYC street corner.

      It's too bad. For a moment, a couple posts upthread, I thought you were genuinely open to new ideas and egalitarian discourse.

      Good luck. But I'm done with this thread.

    16. Re:OOP is Overyped by Tablizer · · Score: 1

      OOD is a paradigm that evolved 30 years ago and, today, is more popular than ever.

      It is popular with regard to vendor-defined classes, but not so much with domain classes. In practice, those are either ignored, or end up mirroring the database one-for-one, creating unnecessary duplication. OOP on the non-tool app developer side gets more lip-service than finger service.

      I don't really have a big beef with vendor-defined OOP API's either way. It's the domain-specific modeling that is the problem.

      I didn't expect to "convince you" of anything. What I did expect was a discussion of merits, and not a fixation upon your own personal bias.

      Well, then show me merits. You say things like, "OO can do A". Then I reply, "But X can also do A". Then you say, "Well OO can also do B", and then I reply, "But X can also do B", and it goes on that way.

      What you are missing, though, is that you're only handicapping yourself. By refusing to use a common tool in todays web-development tool box, you're doing nothing but boxing yourself in and limiting your own earnings potential.

      I could say the same about you for using say OOP instead of data dictionaries to manage mounds of fields. They take practice to use effectively, but do have visual advantages over OOP code (unless you are a speed reader). I didn't see you try to refute that, you just ignored it.

      You've elevated "Procedural Design" to religion in your own mind, replete with "I'm telling you the truth, dude" logic that I can hear on any NYC street corner.

      You are right, I should have given you more specific examples. My bad. But they take a long time to describe well on slashdot. If you really want examples, let me know and I will provide links.

      It's too bad. For a moment, a couple posts upthread, I thought you were genuinely open to new ideas and egalitarian discourse.

      I am. I just ask that you be specific and clear about what the benefits are. I don't see that, but rather change of subject. You are not being explicit enough.
                 

    17. Re:OOP is Overyped by TheSunborn · · Score: 1

      If you have a schema does isn't merely a nested aggregation, then you'd see that an OOP database becomes sticky. For example, in real books any given story or book can have *multiple* authors. You would then no longer have a simple de-composition hierarchy.

      Why should that be a problem? An author has a method getBooks() that return all books he have writen, and a book has an getAuthors() that return all authors. It is true that our graph is now no longer a tree, but I don't se why that should be a problem.

      You don't know that. Perhaps their internal reporting is quite complicated. There's a lot of complexity behind the scenes that one may not consider by merely looking at a single reply tree.

      Slashcode is opensource so I could have look to find out :}
      But it does not matter, for there is no reason that the reporting facilities of an oop database should be less usefull then for a relational database. OQL does show how it can be done, even thou I don't really like OQL, because the designers made it by taking sql, and then redefining
      the semantic to be on objects.

      And an other problem with OQL is that I don't think that anybody have even made an implementation of it.

    18. Re:OOP is Overyped by Tablizer · · Score: 1

      An author has a method getBooks() that return all books he have writen

      A stored procedure (or a subroutine) can do something similar. Feed it the ID of the author and it returns a list of their books.

        while (row=authorBooks(authorID)) { // row is a map
            printRow(row);
        }
               

  31. Re:As a big fan of PHP who cut his teeth on PHP4 . by kjots · · Score: 2, Insightful

    Please don't let anyone get away with calling the internet the cloud!

    Traditionally, when network engineers and administrators draw diagrams of networks, they represent the connection to the Internet as a big bumpy object not unlike a child's drawing of a cloud. I have heard old hackers who used to work in the telecommunications industry during the 80's and 70's describe this object as 'the cloud', meaning the Internet.

    This term predates the current usage by several decades, and is in fact the source of the current usage

    This is a gentle but pedantic reminder that, if you're going to make an absolute assertion, make sure it is the correct assertion.

  32. Migration woes by Anonymous Coward · · Score: 5, Interesting

    I see a lot of people saying that they're surprised anyone's still using PHP 4, when PHP 5 has been out for so long. Well, I can guarantee you there's a lot of legacy PHP 4 codebases out there; converting to 5 is not always as easy as going over what's in the migration page on php.net. Just to give you an idea of the magnitude, we have tends of thousands of code files spread across numerous systems; our live web pool is around 100 machines, and we cannot take the website down in order to update it. (I can't tell you why.) So updates have to be made live. We don't have a proper staging environment, either, but we have come up with a number of (horrible) mechanisms for dealing with this situation.

    In our particular (unfortunate) case, we had about half a dozen custom PHP extensions that were all written by our former CTO, who left the company about a year and a half ago. He wasn't really big into documentation, and our technical management was very poor; we had a guy go through our 65,000-file codebase and make all the little tweaks necessary for a vanilla 4-to-5 migration, but it took us six months of wrangling with all these extensions to get them to work well under 5.1 (we're still having trouble with 5.2).

    Plus, it's not just a matter of dealing with the technology; like a lot of companies, management here doesn't like to put resources into things that don't have visible benefits -- and cleaning up the codebase/rebuilding the dev environment just isn't something they see a lot of value in. (We've finally convinced them it's important and needs to be done; we're operating without source control for about 99% of our code. YES, I KNOW.) We didn't even seriously start pushing to get things up to PHP 5 until January, and it took until July to actually make it happen.

    The point is, mismanagement and bad development environment/codebase design early on (several years ago) have meant that we're upgrading to PHP 5 years later than we should have. It's not that we didn't know how to do it once we decided to.

    1. Re:Migration woes by Bill,+Shooter+of+Bul · · Score: 1

      You have my deepest sympathies. That sounds like a thankless task. Hopefully, the measures you are taking are being well documented and explained to management to prevent any similar mistakes in the future.

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    2. Re:Migration woes by FictionPimp · · Score: 1

      So you don't have the tools to do your job, yet are expected to do your job?

      Sucks to be you.

    3. Re:Migration woes by Shados · · Score: 1

      Holy cow...and I thought my last few employers were disasters... I hope you're paid 6 figures to endure that stuff...

    4. Re:Migration woes by Dexx · · Score: 1

      We were like that when I started, since moved to php5, svn, full staging & qa environment. Good luck, hope it gets better soon.

      --
      Feel the fear and do it anyway.
  33. (correction, should be "overhyped") by Tablizer · · Score: 1

    Does anybody know how to permanently enable the single-line textbox firefox spellchecker? -Thanks

    1. Re:(correction, should be "overhyped") by tubapro12 · · Score: 2, Informative

      Go to about:config and change the value of layout.spellcheckDefault to 2.

  34. Re:As a big fan of PHP who cut his teeth on PHP4 . by kestasjk · · Score: 1, Interesting

    Please don't let anyone get away with calling the internet the cloud!

    Traditionally, when network engineers and administrators draw diagrams of networks, they represent the connection to the Internet as a big bumpy object not unlike a child's drawing of a cloud. I have heard old hackers who used to work in the telecommunications industry during the 80's and 70's describe this object as 'the cloud', meaning the Internet.

    This term predates the current usage by several decades, and is in fact the source of the current usage

    This is a gentle but pedantic reminder that, if you're going to make an absolute assertion, make sure it is the correct assertion.

    I know where the term came from, that's one of the reasons I find it so annoying. :-(

    We don't call resistors "jagged lines" and inductors "curly loops", so why call the internet "the cloud"?
    It isn't actually a cloud, and saying "cloud" isn't any shorter or clearer than "internet" (in fact less clear).

    It's just a new IT business fad which lets IT staff make something familiar sound new, I think.

    --
    // MD_Update(&m,buf,j);
  35. Re:OOP is Overhyped by Tablizer · · Score: 3, Interesting

    Decent example of php5 (zf, in fact) e-commerce (bleh): Magento, 2008 sourceforge best new project.

    What specifically does OO make better about it? What's an example?

    Note: I am a former Dijkstra devotee. I've heard every argument you can imagine against OOP.

    That would make you well suited to describe and illustrate what changed your mind. Dijkstra was mostly pre-relational, so he may hold a RAM-centric view of data structures. OO is missing a foundation in set theory, and this is what relational adds. OO is anti-set IMO, and this is largely why it bothers me. It's also anti declarative for the most part. Declarative and set theory is a good thing, at least it better fits the way I think (model the app world). OOP is also too pointer-centric, creating a big messy RAM graph.
           

  36. Flash 9 by Almahtar · · Score: 0, Offtopic

    Going a little OT, I'd like to point out that Flash 9 made leaps and bounds in Actionscript performance. The latest version of Actionscript (Actionscript 3) is very similar to Java (no, not Javascript), and even uses the Java compiler and runs on the JVM.

    Compared to previous versions of Actionscript it finally feels like a real programming language, not a ripoff of Javascript intended for hobbyists and graphic designers.

    1. Re:Flash 9 by Anonymous Coward · · Score: 1, Informative

      The latest version of Actionscript (Actionscript 3) is very similar to Java (no, not Javascript), and even uses the Java compiler and runs on the JVM.

      It uses custom runtime, not JVM. The Flex AS3 compiler is written in Java (as Flex is an Eclipse plugin), but the Flex compiler and the Java compiler don't share anything.

    2. Re:Flash 9 by Almahtar · · Score: 1

      Is that so? Check out "C:\Program Files\Adobe\Adobe Flash CS3\JVM" some time then.

      Full fledged JRE baby.

  37. On the other hand by Almahtar · · Score: 3, Insightful

    Whether or not you see OOP as overhyped, if a language features OOP it should do it well or not at all.

    Nobody is asking you to like OOP in this case, but if you are going to support it, support it well - not half-assed.

    1. Re:On the other hand by Tablizer · · Score: 1

      Whether or not you see OOP as overhyped, if a language features OOP it should do it well or not at all. Nobody is asking you to like OOP in this case, but if you are going to support it, support it well - not half-assed.

      In my opinion they *still* fouled it up. They tried to make it more like Java when they should have focused on a more dynamic/type-light approach to OOP, borrowing ideas more from say SmallTalk than Java.
         

    2. Re:On the other hand by rycamor · · Score: 1

      Well, with PHP 5.3 (alpha), they are starting to do some things that interest me again. They finally added closures and lambda functions, which are two major ways to get some of the advantages of OO without all the boilerplate. (In fact, some would go so far as to say OO was a poor workaround to lack of Functional capabilities in some languages)

      Namespaces are back, also, so you don't have to spend so much time worrying about name collision in functions.

    3. Re:On the other hand by chrysalis · · Score: 1

      Still I don't like PHP OO. After working with Ruby, I really miss mixin in PHP. Having to create new classes to add things is lousy.

      --
      {{.sig}}
    4. Re:On the other hand by rycamor · · Score: 1

      Agreed. If I have to do OO, Ruby is about the nicest way of doing it. And Javascript (1.7, 1.8), perhaps. Unfortunately, Ruby still has some serious performance problems to address, and while there have been a few attempts at mod_js for serverside Javascript, at present there is nothing definitive.

  38. Re:As a big fan of PHP who cut his teeth on PHP4 . by kjots · · Score: 1

    It isn't actually a cloud, and saying "cloud" isn't any shorter or clearer than "internet" (in fact less clear).

    Dude, there's like a hundred million things in the technical world that are called things that they're not based on nothing more then decades of habit. I mean, is a "bug" really just an insect? Does "bootstrap" really mean a piece of leather attached to a boot? To single out this one example is just splitting hairs.

    Okay, so you don't like the term "The Cloud". That's cool, nothing wrong with that, but you have no grounds on which to object it. It is as valid a term as "bug" or "bootstrap" or countless others of which I'm sure the Slashdot community will happy to remind you.

    You're assertion that no-one has any business calling the Internet "the cloud" is fundamentally flawed. End of story.

  39. Re:OOP is Overhyped by daemonburrito · · Score: 4, Interesting

    What specifically does OO make better about it? What's an example?

    There are many 1000+ page books on the subject. I think this question is beyond the scope of a slashdot comment. But, as a taste: More literate and intuitive api's. Type safety. MVC.

    Specifically about Magento: It uses a framework that has been systematically tested (another advantage of oop) and is based on the MVC + Front Controller paradigm for web apps. It went from whiteboard to working in 3 months. It's simple to extend.

    Regarding what changed my mind about OOP: I learned to use OOP techniques. I never had any negative feelings towards OOP, I was just in love with single-in/single-out purity of the old ways.

    OOP is great for my shop. Of course you can accomplish the same result, theoretically, with any two complete languages/paradigms. The question is whether you want anyone else to read your code (or whether you want to be able to read it in 6 months), how long you want to take writing/researching it, what your requirements are for code quality, and what kind of environment you want to work in if you're on a team. Obviously, if it's just you and you have eternity to write and debug your application, then oop doesn't offer any advantages.

    My advice is just to try it out. You can use your Dijkstra-fu inside of methods and in novel data structures, while at the same time experiencing the convenience and consistency of magic axiomatic things like "programming to an interface." It took me a few months of mind-destroying pain to change the way I built a program, but it is very much worth it. Apologies if you've heard this advice before.

    Btw, you sound like you probably know a lot more about Djikstra than I do. :) There are so many ways... OOP is now just a another tool for me. The paradigm that has taken its place as my ocd target is functional languages like Haskell.

  40. Re:As a big fan of PHP who cut his teeth on PHP4 . by Urkki · · Score: 2, Insightful

    Depends on where you are. If you're in the Internet could, then it's a fog, not a cloud ;-).

    Anyway, to me "cloud" is not same as the Internet, it's roughly the same as "rest of the Internet". This is an important distinction! Local site is not in the cloud. Remote site (for example another office of the same company) usually is not be in the cloud either, or it could be considered a separate cloud, even though connection to it goes through the big Internet cloud.

    The totality of Internet is not dependant on the observer. But the cloud is different for every observer, since at least the computer of the observer is not part of the cloud in their own frame of reference.

  41. no foreach statement??? by mcalwell · · Score: 1

    What?

  42. Re:OOP is Overhyped by Tablizer · · Score: 0, Troll

    There are many 1000+ page books on the subject.

    I've read a few and they left a bad taste in my mouth. They are usually anti-RDBMS in my opinion. There is a strong anti-relational streak in pro-OO literature.

    More literate and intuitive api's

    Those are often a matter of opinion. Different people think differently. What you find intuitive may not apply to others. Without specific metrics or clear-cut examples, I cannot do much with such statements, to be frank. I'd have to know what you are thinking and what you are mentally comparing to what.

    Type safety.

    OOP is not necessarily about type safety. An OO language like SmallTalk is very weak-typed. (Much OO lingo comes from the inventor of Smalltalk.) And heavy-typing versus light-typing is a long and bitter argument that is never settled, even excluding the OO issue. (If I was forced to use OO, I'd rather use Smalltalk than say Java or Eiffel.)

    As far as MVC, I find it outdated and unnecessarily complex. OOP and MVC clingage is main reason we don't have a decent cross-language GUI kit yet. Non-trivial OO API's are very difficult to make cross-language. Nobody has solved this problem. But you are right in that such a debate is not something we can settle via mere slashdot messages.

    But thanks for your feedback anyhow.
         

  43. Re:As a big fan of PHP who cut his teeth on PHP4 . by kestasjk · · Score: 1

    "Bug" is more concise than "a software flaw which causes behavior the developers didn't intend", "bootstrap" is more concise than "software which loads the boot-loader". "Cloud" is just "internet".

    There are better examples though which make your point (like "firewall", which I think would be better as just "packet filter"), but these phrases are old and cast in stone, so there's no point trying to fight them anyway. It'd now, unfortunately, be more confusing to try and change them than to just stick with the status quo.

    However "cloud" seems to be the latest thing, and so I'm still prepared to put up whatever little token resistance I can.
    (I know it has older origins, but its use is only gaining momentum very recently. I checked Google Trends to make sure I'm not going crazy.)


    I dislike "Cloud" for much the same reason you probably dislike "the information super-highway". Words are words, I can call the internet whatever I want, but others don't have to accept my definition. If you're fine with "the information super-highway" and "web/pod/screencast" etc then you're not the kind of person my sig will resonate with.

    --
    // MD_Update(&m,buf,j);
  44. Re:OOP is Overhyped by daemonburrito · · Score: 1

    FWIW, I love RDBMs, and all my software uses a certain well-known package. In fact, glancing at my whiteboard, I see an ERD.

    For the most part, my 3NF schemas work fine with the abstraction layer of the framework I'm using at moment. It can be tricky to model correlation tables properly, but there are many applications where an ActiveRecord-type model works fine out-of-the-box.

    Just saying that OOP and RDBMs don't have to be mutually exclusive (and that I love set theory and relational databases).

    On the rest we'll just have to disagree :).

  45. Re:Good time to migrate to PHP 7... by Fweeky · · Score: 1

    Pfft, I can't stand the whole mod_$language thing. It ties you to Apache, it ties you to a substandard Apache MPM, it adds another interdependency between your webserver and your actual application and makes seperating them harder.

    I far prefer application servers, with the webserver left to serve/proxy HTTP and related protocols rather than running your entire application. I'd like to see better support for this with PHP; i.e. a HTTP SAPI that runs a simple webserver, rather like its daemonized FastCGI support. Then all you need to interface with a webserver is mod_proxy, which most provide by default.

    This, incidently, tends to be the preferred means of interfacing with webservers for most other languages; Ruby has FastCGI, Mongrel, Thin, Ebb, etc, Python has Paster, CherryPy, Aspen, WSGI, etc, Java has Glassfish and friends, Erlang has Yaws. This lets your applications run effeciently under other credentials, even seperate (virtual or physical) machines, and in a process environment which suits them.

  46. future features in PHP by popra · · Score: 1

    as a LAMP developer (where in my case P stands for PHP mostly) reading slashdot, I'm used to see a lot of PHP bashing whenever a story remotely related to PHP pops up. On this one there's hardly any PHP bashing at all. On a more on topic matter, dropping PHP4 support is great news, hopefully this will give the PHP team enough time to concentrate on what's missing in newest versions of PHP. This is my list:

    - speed (there's a Google SoC project on this, but more could be done for example calling a function has a lot of overhead)
    - >32bit machine independent integer support
    - large file support >2Gb
    - exceptions thrown by all internal functions


    what's your list?

    1. Re:future features in PHP by Anonymous Coward · · Score: 0
      - Not sucking dick like CmdrTaco in a truckstop men's room.
      - Rename all the functions to be consistent
      - First class functions
      - First class regexp

      Basically, admit it's a dead end and replace it with JavaScript.

    2. Re:future features in PHP by Ant+P. · · Score: 1

      Right now I'm just waiting for them to add bool support to PDO-PgSQL that actually works. There's several pages of (unfixed or wrongly closed) bugs about it on their bug tracker.

  47. Re:PHP is a minor evil perpetrated and created by. by Bogtha · · Score: 4, Funny

    I prefer this quote:

    PHP: There's more than one way to do it, all of which are wrong.

    --
    Bogtha Bogtha Bogtha
  48. Re:Good time to migrate to PHP 7... by Anonymous Coward · · Score: 0

    For Zope and web development you should really look at Grok instead. Otherwise things are going to be painful with Zope.

  49. PHP 6? by thue · · Score: 2, Interesting

    I wonder when we will see PHP 6 (which will have unicode support).

    PHP 6 has been in development forever, but there doesn't seem to be any roadmap online that I can find.

    1. Re:PHP 6? by dave420 · · Score: 1

      You can download the current development versions. It's quite stable.

    2. Re:PHP 6? by Dragonslicer · · Score: 1

      I vaguely remember seeing a message on the development mailing list that they're aiming for mid-2009 or so. Doing the normal translation from project planning to reality, I'd expect an official 6.0.0 release near the end of next year.

  50. Re:PHP is a minor evil perpetrated and created by. by repvik · · Score: 1

    Whoosh

  51. Re:As a big fan of PHP who cut his teeth on PHP4 . by repvik · · Score: 1

    "Bug" is more concise than "a software flaw which causes behavior the developers didn't intend", "bootstrap" is more concise than "software which loads the boot-loader". "Cloud" is just "internet".

    "Bug" is just "flaw", "Cloud" is more concise than "an enormous, globally interconnected network".

  52. Re:PHP3 by budgenator · · Score: 1

    Netcraft says SQL is dying, movie at eleven

    --
    Apocalypse Cancelled, Sorry, No Ticket Refunds
  53. Re:As a big fan of PHP who cut his teeth on PHP4 . by Tim+C · · Score: 2, Informative

    "Bug" is more concise than "a software flaw which causes behavior the developers didn't intend"

    It's also due to the fact that early in the history of computing, a fault was found to be due to a moth being trapped between the contacts of a relay.

    For what it's worth, I don't like people calling the Internet "the Cloud" either.

  54. Re:As a big fan of PHP who cut his teeth on PHP4 . by Tim+C · · Score: 3, Funny

    Traditionally, when network engineers and administrators draw diagrams of networks, they represent the connection to the Internet as a big bumpy object not unlike a child's drawing of a cloud.

    That's true, and I've done it often enough myself. I also draw databases in the traditional manner, and yet I never feel the need to refer to them as cylinders.

  55. Re:Good time to migrate to PHP 7... by Bastard+of+Subhumani · · Score: 1

    Why not? Snakes are ideally suited to travelling along tubes.

    --
    Only three things are certain; death, taxes, and apocryphal quotations - Ben Franklin.
  56. Will anyone notice? by argent · · Score: 1

    I mean, if they were interested in security patches they wouldn't be using pHP in the first place.

  57. Re:Good time to migrate to PHP 7... by Micah · · Score: 1

    I don't care about being tied to Apache -- I believe it is the only web server I'll ever need.

    Not sure what you mean about tying it to a "substandard MPM" -- AFAIK mod_python can run under prefork and worker (the only two that really matter at this point) and maybe others.

    Agree with some of your other points though.

  58. Yeah, and by omuls+are+tasty · · Score: 1

    let's debunk the other myth while we're at it!

  59. Re:As a big fan of PHP who cut his teeth on PHP4 . by kestasjk · · Score: 1

    "Bug" is more concise than "a software flaw which causes behavior the developers didn't intend", "bootstrap" is more concise than "software which loads the boot-loader". "Cloud" is just "internet".

    "Bug" is just "flaw", "Cloud" is more concise than "an enormous, globally interconnected network".

    "Bug" implies more than "flaw". It's specifically not a design flaw, and it's not a problem where the user thinks something should be done a differently. "Cloud" doesn't imply anything more than "internet" though

    --
    // MD_Update(&m,buf,j);
  60. Re:As a big fan of PHP who cut his teeth on PHP4 . by huge · · Score: 1

    To me "cloud" in network diagrams has nothing to do with Internet. I use clouds to remove irrelevant clutter from the diagrams. It can be any network (or part of one) which internal layout isn't relevant for that diagram. It could be corporate backbone, Internet, PSTN, whatever.

    Then again, that's just how to visualize something on a diagram and I'd not part of the network or internet "cloud".

    --
    -- Reality checks don't bounce.
  61. Re:Good time to migrate to PHP 7... by Anonymous Coward · · Score: 0

    Better than Pythons on a Plone

  62. Re:OOP is Overhyped by TheSunborn · · Score: 1

    We have QT4.3 that is a "decent cross-language GUI kit"

    (Ok, I really think it's a really good OO toolkit, showing how to do MVC right :}. (But they also had qt3 as a training ground :}

  63. Re:OOP is Overhyped by ThePhilips · · Score: 1

    Decent example of php5 (zf, in fact) e-commerce (bleh): Magento, 2008 sourceforge best new project.

    What specifically does OO make better about it? What's an example?

    OK. You already got a bunch of silly responses sending you to read think books.

    But as developer who got first experience with OO about 15 years ago, I'd opine that OO is all about improved code organization.

    There is literally ZERO of OO code which can't be written in plain functional language.

    To me, biggest advantage of OO, is that it allows (at least partially) implement interfaces between code parts. Also some OO languages allow you make sure the interfaces are followed to some degree. OO is also easier to document, because it introduces extra layer of code organization - classes - something what in functional languages have no distinct identity and require extra (documentation and communication) effort when defining.

    OO is mere utility. If you wrote many large programs in C, chances are good that you would see many good uses for C++. Not always. Not for every project. Yet, on many occasions, C++ can save some time. Equally, there are projects where C can save some time and choosing C++ is would only make things more complicated.

    --
    All hope abandon ye who enter here.
  64. Put in the hours. Do the move. by kcdoodle · · Score: 1

    OK, maybe the stuff we had wasn't too involved.

    But when PHP5 came out, I downloaded it and spent about a week going through all of our PHP4 specific code and changed it to PHP5.
    Just like I did years before that when PHP3 became PHP4.
    Granted it was only a couple thousand line of code, but you gotta bite the bullet once in a while and it hurts a lot less to do it early instead of late.

    --

    - I live the greatest adventure anyone could possibly desire. - Tosk the Hunted
    1. Re:Put in the hours. Do the move. by Shados · · Score: 1

      Corporate mentality makes this trickier than it sounds. I'm no PHP programmer, but just to give you an example: We're a .NET shop here. All our stuff is .NET 2.0. We have the licenses for VS2008 to use with .NET 3.5, and we control all of the servers, all hooked to a domain, so we can push .NET 3.5 to all our servers with the click of a single button.

      Upgrading from 2.0 to 3.5 is like this: double click the solution, open it in VS2008, recompile, deploy. In some cases to use new features you have to add 4 lines in the configuration files (always the same lines, copy and paste) Thats -it-. 99.99999% of the code will work.

      Yet we're not doing it... why? No time, or so I'm told. (I've done that migration many times for other companies).

      Point is, if the above is too much for some companies... imagine migrating from PHP4 to PHP5... the same people would -faint-.

  65. Re:Good time to migrate to PHP 7... by Anonymous Coward · · Score: 0

    Hi, I am not into that Web thing in fashion lately. Is there any toolkit for Enterprise Gopher application development in Python?

    Thanks.

  66. Re:As a big fan of PHP who cut his teeth on PHP4 . by drinkypoo · · Score: 1

    In working for Cisco I noted that the Internet was always represented as a cloud. Ever since I have referred to it as the "CFNC" or "Cisco Fluffy Network Cloud" and have labeled it thus on my networking diagrams ever since. (Cisco deserves a little credit for making the internet work as the company that invented and marketed the router...)

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  67. Most PHP4 code runs fine as PHP5 by hutchike · · Score: 1

    Despite the changes in copy semantics from PHP4 to PHP5, most code written for PHP4 runs fine as PHP5. If changes are necessary, they are very minor since PHP5 mostly adds new capabilities (apart from the pass-by-reference stuff). If the coder was using "&" before in his PHP4 code, then it will work fine without changes in PHP5. The bigger question for me is whether the excellent www.cakePHP.org framework will continue to support PHP4 now it's deprecated.

    --
    Zen tips: Pay attention. Don't take it personally. Believe nothing.
  68. Re:As a big fan of PHP who cut his teeth on PHP4 . by End+Program · · Score: 1

    (Cisco deserves a little credit for making the internet work as the company that invented and marketed the router...)

    That is not technically accurate:

    http://en.wikipedia.org/wiki/Cisco

    While Cisco was not the first company to develop and sell a router (a device that forwards computer traffic between two or more networks),[1] it was one of the first to sell commercially successful routers supporting multiple network protocols.

    http://en.wikipedia.org/wiki/Router#History

    The earliest Xerox routers came into operation sometime after early 1974. The first true IP router was developed by Virginia Strazisar at BBN, as part of that DARPA-initiated effort, during 1975-1976. By the end of 1976, three PDP-11-based routers were in service in the experimental prototype Internet. The first multiprotocol routers were independently created by staff researchers at MIT and Stanford in 1981; the Stanford router was done by William Yeager, and the MIT one by Noel Chiappa; both were also based on PDP-11s.

    Cisco did not come into existence until 1984.

  69. Re:Good time to migrate to PHP 7... by Anonymous Coward · · Score: 0

    Ugh, Zope.

    Sorry, but I worked in a data center with several Zope clients, and it was non-stop problems. I've been turned off to Python ever since.

  70. Re:As a big fan of PHP who cut his teeth on PHP4 . by Anonymous Coward · · Score: 0

    For what it's worth, I don't like people calling the Internet "the Cloud" either.

    I say the new terminology could also be more detrimental, because a layperson might subconsciously associate more safety with fluffy clouds than 'the Internet' {cue menacing music}...

    In that respect the GGP's two examples were poorly chosen, as their usage is (in my opinion) colorful, concise, and doesn't add any extraneous positive/negative connotation. For instance, 'bootstrap' allows for easy visualization since the program is (figuratively) hauling itself up by its own bootstraps. As 'bugs' have been adequately explained by the parent post I'll leave them alone.

    This of course doesn't imply that there isn't poorly-chosen jargon in IT, just that the above examples aren't the droids you are looking for.

  71. so is PHP4 worth learning at this point? by dartmongrel · · Score: 1

    I'm currently teaching myself PHP5, is it worth my while to make any kind of in-depth analysis of the differences or learning PHP4, Just in case at some point I have to change someone's old code? I would think that the differences aren't that major, but like I said, I'm still just learning it.

  72. Re:As a big fan of PHP who cut his teeth on PHP4 . by Anonymous Coward · · Score: 0

    That's true, and I've done it often enough myself. I also draw databases in the traditional manner, and yet I never feel the need to refer to them as cylinders.

    By which, of course, you mean drums.

  73. Re:OOP is Overhyped by Tablizer · · Score: 1

    but there are many applications where an ActiveRecord-type model works fine out-of-the-box....Just saying that OOP and RDBMs don't have to be mutually exclusive (and that I love set theory and relational databases).

    I've seen Active-Record-like API's that use just associative arrays and functions. Some strong-typing advocates probably wouldn't like them, considering them "too naked" (poor encapsulation), but the strong-typing-versus-scriptish/dynamic debate is generally a different issue. The lack of encapsulation makes them easier to modify for a given project when their out-of-the box condition is insufficient. Trying to make a generic one-size-fits-all AR kit for every project is asking for API bloat.

    But the bigger issue is with "domain modeling", that is modeling the domain "things" such as customers and invoices. There does seem to be a conflict between OOP and RDBMS for those. Mirroring the domain model between them is unnecessary redundancy and conversion busy-work.
         

  74. Re:OOP is Overhyped by Tablizer · · Score: 1

    Isn't QT for C++? That would generally disqualify it as "cross-language". Sure, language-specific libraries could be added by tacking on the QT libraries to each language, but the API's could be vastly different for each language, taking us back to square one for the most part. Or, at least square 1.2.

  75. Re:OOP is Overhyped by Tablizer · · Score: 1

    I'd opine that OO is all about improved code organization.

    But without a clear-cut way to measure/describe/illustrate "improved code organization", such claims are merely claims.

    Also some OO languages allow you make sure the interfaces are followed to some degree.

    "Some OO languages" is the key. It is not about OO per se, but using OOP to assist the "strong typing" model. I generally agree OO seems to be pretty good at that, but I also enjoy type-free (or at least dynamic) style. It is not objectively worse. Paul Graham has suggested that OO keeps large-team drooling zoombies "in line" by outright forcing them through a pre-set interface. Perhaps that is needed for larger projects that are so large that it becomes a dragging whip-and-row slog. That may be the case, but the claims of OO proponents are generally not limited to just large teams.

    something what in functional languages have no distinct identity and require extra (documentation and communication) effort when defining.

    Example?

    If you wrote many large programs in C, chances are good that you would see many good uses for C++.

    For once we agree on something. But this is because C is crippled. It is designed for machine speed, not developer productivity. It is modern-day assembler and by far not the pinnacle of procedural languages.
         

  76. Lazy HP by operagost · · Score: 1

    Gee... I guess they will have to actually release a PHP5 for OpenVMS some time soon.

    --

    Gamingmuseum.com: Give your 3D accelerator a rest.
  77. In the meantime... by Brandybuck · · Score: 1

    In the meantime 1969 K&R C is still fully supported.

    --
    Don't blame me, I didn't vote for either of them!
  78. Re:OOP is Overhyped by ratboy666 · · Score: 1

    Horrible Simplification Follows

    Hewitt and Smith generalized Alan Kay's work (around 1972), and generalized message passing. Kay suggests procedural embedding could allow the building of functional data structures. Scheme (Sussman and Steele) oiginally implements Hewitt's actors, but observed that actors and functions were the same, dropping actor and keeping lambda.

    Sort of this progression:

    Lisp->Smalltalk->Actor->Scheme(->Lisp)

    In other words, either could be used. The last part is still a work in progress. (Haskell/Caml not included in this picture yet -- this illustrates things late '80s, early '90s - twenty years ago).

    Haskell is nice (very nice), although I prefer loose typing, and generally use Scheme.

    --
    Just another "Cubible(sic) Joe" 2 17 3061
  79. problem upgrading php4 and pear DB to php5 by Anonymous Coward · · Score: 0

    I think it is the DB pear class, anyone ever have this problem when upgrading from php 4 to 5? it just dies.

  80. Re:OOP is Overhyped by daemonburrito · · Score: 1

    But the bigger issue is with "domain modeling", that is modeling the domain "things" such as customers and invoices. There does seem to be a conflict between OOP and RDBMS for those. Mirroring the domain model between them is unnecessary redundancy and conversion busy-work.

    You're right, of course (I mentioned that I had heard it before ;) ). Tables aren't objects. This was the inspiration for all of those poor fools trying to build OOP DBs. Oddly, it was also part of the rationale for questionable design decisions for a popular open source cms ("Tables are kind of like objects, so we don't have to worry about updating our api 'cause we're already oop..." hahaha).

    However, the need for a layer between the database and your application logic doesn't mean that OOP is worthless. I like my relational storage, and I like my OOP application logic. It's not conversion per se, but a gateway. I can have my safe, fast, normalized database connected to an OOP domain model that is actually pretty close to the reality of the problem I'm solving (definitely much closer than the relational schema with a dozen correlation tables).

    I'm wondering... You say you lean towards the smalltalk side of the family tree. Have you played with Objective C? Api's built with it are pretty (I'm working through an O'Reilly Cocoa book at the moment). You mentioned that you blamed oop for the non-existence of a cross-platform desktop environment; I kind of wish more people would check out obj c and/or contribute to gnustep/etoile.

  81. Re:OOP is Overhyped by Tablizer · · Score: 1

    I can have my safe, fast, normalized database connected to an OOP domain model that is actually pretty close to the reality of the problem I'm solving (definitely much closer than the relational schema with a dozen correlation tables).

    Please clarify.
         

  82. Re:OOP is Overhyped by daemonburrito · · Score: 1

    My domain model in OOP is closer to reality than the relational schema. That was OOP's reason for existing, originally.

    And another thing about that... There are necessary kludges in both. Have you ever felt saddened by the way a beautiful diagram actually gets implemented in an RDBMS?

  83. Re:OOP is Overhyped by Tablizer · · Score: 1

    My domain model in OOP is closer to reality than the relational schema. That was OOP's reason for existing, originally.

    Without some agreed-upon way to measure "fitting reality", its kind of hard to evaluate this. Further, fitting reality is not always in our best interest. Modeling an old-fashioned library card catalog may "model reality" well, but we can now transcend such a limited physical layout and use multi-indexing without duplicate physical cards for each book.

    Further, even the popular OO author Bertrand Meyer rejects the claim that OO's main goal is to closely mirror reality.

    And another thing about that... There are necessary kludges in both. Have you ever felt saddened by the way a beautiful diagram actually gets implemented in an RDBMS?

    The front-end tools to display or edit something may not reflect what is inside the machine. We create code and UI abstractions that better fit how we or the customer want to view it. Diagrams typically represent ID key links as lines between "things" on paper, while our software tools use either ID key values or RAM addresses. But to me the "problem" is solved by providing more graph (lines and node) oriented viewers/editors when needed. And its easier to standardize such tools for RDBMS than different OO languages because RDBMS are more standardized at this point in time.
         

  84. Re:OOP is Overhyped by daemonburrito · · Score: 1

    Sorry, man... I likes my OOP. And I cannot imagine a worse fate than having to code anything in sql, which seems to be what you're suggesting with your talk of "declarative" paradigms.

    The zealot-to-evidence ratio is sky high on the web.

    Indeed.

  85. Let's try these new features then... by shish · · Score: 1

    PHP5 supports type hinting

    Ooh, that looks pretty useful... *writes out a function to only accept strings*

    Argument 1 passed to test() must be an instance of string, string given

    Umm.. wtf? *googles*

    Oh, type hinting only supports certain types of types.

    Conclusion: PHP still sucks, and the new features are as half-assed as ever :-(

    --
    I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
  86. Re:OOP is Overhyped by Tablizer · · Score: 1

    Sorry, man... I likes my OOP. And I cannot imagine a worse fate than having to code anything in sql, which seems to be what you're suggesting with your talk of "declarative" paradigms.

    SQL is a high-level language which can be very powerful, reducing the need to hand-code collection-oriented idioms over and over. Perhaps relational-heads think differently than OOP-heads. (I do agree it can use some upgrading though. It's grown long in the tooth, but that's true of any language.)

    [The zealot-to-evidence ratio is sky high on the web.] Indeed.

    The difference between me and most alleged zealots is that I don't claim my favorite techniques are objectively better. I believe software development is largely a psychological process once speed/performance issues are not the overriding concern. And everybody's psychology is different. I'm just requesting healthy skepticism regarding OOP. Too many have accepted it without a critical eye. You have a right to "like" it, but not a right to extrapolate personal preferences to everybody else.
           

  87. Strings as binary data by KalvinB · · Score: 1

    One of my favorite current abuses of PHP is running a game server written in PHP. The game is written in C# and communicates with the PHP server using sockets. The reason is pure laziness on my part. Maps are created through a PHP/AJAX web-app and stored in MySQL. The PHP server handles all the DB stuff and passes it down to the game client via binary strings. I didn't care to have to rewrite PHP code as C# code just for a simple server.

    It would probably be more efficient to have a binary data type (a simple byte array) and a string data type.

  88. Re:(correction, should be "overhyped") [OT] by Tablizer · · Score: 1

    Thanks! Did the job.

  89. Re:wow FOODSTER by Anonymous Coward · · Score: 0

    Speaking as a _parent at a Public_function, couldn't we, instead of using "Ripened_ovary", refer to a less controversial class such as "Liberace"?

  90. Re:OOP is Overhyped by rycamor · · Score: 1

    SQL is a high-level language which can be very powerful, reducing the need to hand-code collection-oriented idioms over and over. Perhaps relational-heads think differently than OOP-heads.

    I think the separation goes more like "most programmers" vs. "Relational-heads". Most programmers seem to regard such a thing as "not really programming", just like the Big Telcom engineers blustered about TCP/IP as being "not really networking" back in the 60s and 70s. I am convinced that most programmers dislike relational logic because it involves a changed mindset, and because it actually removes the need for some of the things they like to have their hands on.

    I can't tell you the number of times I have come across some elaborate construct in an application that could be reduced to a simple combination of a couple tables and a some constraints or rules to govern what goes in them. But that's not really programming...

  91. products? by reiisi · · Score: 1

    I'm not sure if these count, but Mac OS X has php bundled with it.

    So, I'm wondering if there will be an update soon that will remove php4, install php5, and find all the configuration files in /etc, at least, and search them for the right place to put in the line that tells them to keep running php4 compatible.

    --
    Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  92. Re:OOP is Overhyped by daemonburrito · · Score: 1

    Umm... So because I know how to use object-oriented languages, I don't understand relational logic? I'm rather surprised to hear that.

    Nowhere in my comments did I say that I "dislike relational logic". I do, however, think that building large applications in sql is a terrible idea.

    About your analogy, well, that's just fucked. I don't think that using a declarative language to build applications is "not programming". I think that it is not productive (as does the rest of world). It wasn't even possible until vendors bolted on flow control constructs (some of them OOP!).

    I know I know, the balls I must have to suggest that you use your query language for queries. I've apparently drunk the "not writing everything in an incomplete language" kool-aid.

    You made the assumption that because I defended object-oriented programming (controversial, I admit), I don't understand how to design a db schema. That's insane (and illogical).

  93. Re:OOP is Overhyped by rycamor · · Score: 1

    Umm... So because I know how to use object-oriented languages, I don't understand relational logic? I'm rather surprised to hear that.

    Nowhere in my comments did I say that I "dislike relational logic". I do, however, think that building large applications in sql is a terrible idea.

    A little touchy, are we? Notice I never said anything negative about OOP (although I share some of Tablizer's doubts). Nor did I even imply you were one of "most programmers".

    About your analogy, well, that's just fucked. I don't think that using a declarative language to build applications is "not programming". I think that it is not productive (as does the rest of world).

    The analogy is very apt, when you think about the power of abstraction. What TCP/IP did was to create a declarative abstraction that was layered over the old world of networking (the old idea of networking was that a connection == a phone call), and this abstraction made it possible to no longer worry about the intimate details of just how your connection established a path through the telco machinery. Take a look at Van Jacobsen's excellent talk for more background on this, including the social aspects I mentioned.

    In the same way, relational logic made it possible to make logical assertions over your data without worrying about just how the underlying programming handled the details. Yes, it uses programming, and uses it brilliantly. Separation of concerns. Write a data management framework once, formalize it and generalize it (ergo the DBMS), rather than write it for every application.

    I know I know, the balls I must have to suggest that you use your query language for queries. I've apparently drunk the "not writing everything in an incomplete language" kool-aid.

    You made the assumption that because I defended object-oriented programming (controversial, I admit), I don't understand how to design a db schema. That's insane (and illogical).

    I wasn't assuming anything about you at all. I was responding to Tablizer. But anyway, of course you can't completely develop an application with SQL, nor was that the intent (and SQL is a fairly poor implementation of the relational model anyway). But you CAN manage the data completely within a relational system, and leave the programming to handle all the other aspects. This provides a benefit of separating concerns, so you can manage your data without poking the innards of your application, and vice-versa.

    And yes, it is "most programmers", not all. Most programmers have never been taught what the relational model really is, or what it is good for. Most of them don't even know what a "relation" is. It's one of the most disinformation-heavy subjects on the internet. Unless you have read at least one of C.J. Date's books, as well as perhaps Hugh Darwen, David MgGoveran, maybe Fabian Pascal, etc... you don't really know the relational model. In fact, learning SQL itself is somewhat counterproductive to understanding the relational model. It takes a little work to unlearn the bad concepts.

  94. I've now had my coffee by daemonburrito · · Score: 1

    Fair enough.

    ...Though I still think your analogy is flawed. And your opinions are much more moderate than tablizer's, which you appeared to support with your anecdotes (~"I can't count the number of times"). That is probably what set me off... I was slighly annoyed by someone feigning interest in what I had to say to try to evangelize me.

    FWIW, I don't really disagree with anything in your last comment.

    1. Re:I've now had my coffee by rycamor · · Score: 1

      Fair enough indeed.

      Unwritten Slashdot rule #442: every discussion on PHP ends up on the most tangential matters.

  95. Re:Good riddance by Viol8 · · Score: 1

    YOu got modded down but I found it funny at least :)

  96. Re:Good time to migrate to PHP 7... by Fweeky · · Score: 1

    PHP isn't really usable under worker, unless you're happy to limit to a very small number of extensions; most aren't thread safe, and good luck finding documentation on which ones are. It's not even that simple to test. Similarly, mod_python might work threaded, but libraries you might want to use with it might not be (they would normally be protected by the GIL, but if you've got multiple serperate interpreter instances in a process, that won't save them).

  97. Why not allow BOTH? by Tablizer · · Score: 1

    Just have some kind of folder indicator file or the like that tells the system which interpreter to use. If you want to keep using 4, then put a "_usePhp4_" indicator file in a given folder. Forcing one to make a system-wide choice is so Microsoft.

  98. PHP by HiddenObjectGame · · Score: 1

    I since prefer use PHP4 on my hosting account. Somtimes it works better and less errors on it occurs.

    --
    Hidden Object Games Download