Slashdot Mirror


PHP5 Coming Soon

Grip3n writes "PHP5 is well under development and a beta is expected out by March 2003 and released summer 2003. One of the more notable improvements which many PHP developers desired is a substantial improvement in PHP's performance. This is due to a new object model PHP5 will be introducing which handles objects by reference rather than by value. Co-creator Zeev Suraski states the new object model is inspired by the book, "Design Patterns"."

135 comments

  1. Moore. by Trusty+Penfold · · Score: 1

    Who says Moore's Law is obsolete

    1. Re:Moore. by Alizarin+Erythrosin · · Score: 3, Informative

      Moore's Law has NOTHING to do with this. Moore's Law has to deal with the density of transistors on an integrated circuit.

      The observation that the logic density of silicon integrated circuits has closely followed the curve (bits per square inch) = 2^(t - 1962) where t is time in years; that is, the amount of information storable on a given amount of silicon has roughly doubled every year since the technology was invented. This relation, first uttered in 1964 by semiconductor engineer Gordon Moore (who co-founded Intel four years later) held until the late 1970s, at which point the doubling period slowed to 18 months

      --
      There are only 10 kinds of people in this world... those who understand binary and those who don't
    2. Re:Moore. by tomhudson · · Score: 2

      Oh, come on. Moore's "law" has been applied to all sorts of situations, as it's become a part of the general culture, not just geek chic.

  2. March 2002? by Fo0eY · · Score: 1

    so, they're planning to release the beta 10 months ago?

    1. Re:March 2002? by superyooser · · Score: 2, Informative

      That's just another Smashdot snafu. The article clearly says, "PHP version 5, expected to appear in beta form by March, 2003, and released in the summer of 2003..."

    2. Re:March 2002? by ChrisMas · · Score: 1

      final version in summer? or later? I hope they release it in summer...or I'm on wrong way?

      --
      the new Linux Generation: linux4all.net
  3. I'm afraid... by pediddle · · Score: 2, Funny

    ...that it'd be hard to "expect" something to be out by March 2002.

  4. Pretty Hard Programming by Anonymous Coward · · Score: 0

    I hope they can get around their class and pseudo-object embedding problems that have plagues this language since 3.x. I stayed away from version 4.0 because of that.

  5. IN SOVIET RUSSIA by Anonymous Coward · · Score: 0, Offtopic

    Betas release you!!!!

  6. Good by Aztek · · Score: 1

    It needs it. The zend engine needs to be redesigned to include class deconstructors and privite members.

    --
    AZTEK
  7. Where is it? by phnx90 · · Score: 2, Insightful

    How come there is no mention of this on the PHP Website?

    1. Re:Where is it? by JoScherl · · Score: 0

      'cause everyone knows the adress ;)

  8. PHP & XUL by Mas3 · · Score: 2, Interesting
    Is there a (larger) web-application which uses XUL generated by php ?
    I Just found small things like single forms.

    Those apps would have the advantage that you can combine a usable & nice looking GUI with a web application (which can be used from everywhere.)
    GUIs designed with HTML are usually quite limited.

    --
    Stefan

    DevCounter - An open, free & independent developer pool
    created to help developers find other developers, help, testers and new project members.

    1. Re:PHP & XUL by XBL · · Score: 2

      See http://books.mozdev.org/chapters/ch12.html for an introduction to using PHP with XUL.

    2. Re:PHP & XUL by Anonymous Coward · · Score: 0

      There seems to be some missing graphics in that link.

    3. Re:PHP & XUL by Tablizer · · Score: 1

      Those apps would have the advantage that you can combine a usable & nice looking GUI with a web application (which can be used from everywhere.) GUIs designed with HTML are usually quite limited.

      You are right. I am tired of trying to force HTML+DOM+JavaScript to *act* like the GUI that the manager/customer has in mind.

      I have been hoping from something like XWT or SCGUI (my pet protocol), but if XUL comes fairly close and catches on, I will be happy (assuming somebody will pay me to do XUL apps).

      Real GUI's again. Feels sooo good, Baby!

    4. Re:PHP & XUL by Anonymous Coward · · Score: 0

      I know this is inviting a quick "RTFM", so if so , tell me which FM...

      Since this is "Real GUI", can you also trap function keys and stuff like that, like in a Real GUI?

    5. Re:PHP & XUL by Tablizer · · Score: 1

      Since this is "Real GUI", can you also trap function keys and stuff like that, like in a Real GUI?

      I suppose "GUI-ness" is a continuous factor. It is just that HTML+JS+DOM is not really geared toward business-form type of GUI's. Forms themselves are kind of an afterthought of HTML. HTML is best for documents and e-brocures, not forms. For example, it is a bear to have an HTTP transaction update an existing form rather than redraw the whole thing from scratch each time. That feature should be the *base* of a real GUI protocol.

  9. Porting by eddy+the+lip · · Score: 4, Interesting

    This sounds like a very good thing, and will address many of the things I find cumbersome about the language (namespaces!). But while it sounds full of objecty-goodness, does anyone know how backward compatible this will be with PHP4? It sounds like major changes are in the works, and rewriting my code in six months sounds about as much fun as putting pencils in my eyes.

    --

    This is the voice of World Control. I bring you Peace.

  10. PHP5, now with time travel! by sideshow · · Score: 2, Funny
    a beta is expected out by March 2002

    maybe I'll ditch ASP for PHP after all.

    --

    Hollow words will burn and hollow men will burn.

    1. Re:PHP5, now with time travel! by theCat · · Score: 2

      Actually you wi/ould havn/willn-dropped ASP already/soonest, and in fact I right now am holding a copy of your rather excellent review on PHP5-RC3 dated last summer and titled "What you could/id expect from the past/soon PHP5 final release, which will/wasn released yestermorrow."

      That minor eccentric wobble you all just felt in the Earth's axis of rotation is Douglas Adams spinning in his grave. :-)

      --
      =^..^= all your rodent are belong to us
    2. Re:PHP5, now with time travel! by Anonymous Coward · · Score: 0

      An array of Dictionaries of Dictionaries of arrays of hard-coded values to be eval()'d (thank's to javascript)?

      PHP surpassed ASP in functionality and ease of use at 3.0

  11. March 2002? by Captain+Large+Face · · Score: 1, Redundant

    Funny, I didn't see it. :-P

  12. *AMP by Cokelee · · Score: 3, Interesting

    From the article: PHP runs seamlessly under Windows, as do MySQL and Apache. WAMP anyone?

    IMO this is what makes *AMP. Consistency between platforms. I use Apache, MySQL, and PHP religiously, and no matter what kind of machine I'm running everything on it is seamless.
    I'm not saying this isn't true with other scripting languages, but being able to code on anything with a few tools no matter where I am is EXCEPTIONALLY nice.
    PHP's use on large web application projects has been uncertain. Yahoo doesn't feel this way. Neither does Earthlink (WebMail)

    But I suppose perception needs to change--you don't have to have a billion dollars [Article, still reading it. . .] in the bank to make a great web language. (*cough* M$ *cough*) Neither do you need a couple thousand to deploy a website with dynamic content.

    1. Re:*AMP by sporty · · Score: 3, Insightful

      I just wish that there was a way to compile PHP into some sorta byte code. 'cause then you'd write your Mysql, XML, expat, imagemagik, and other php modules IN php. THEN it'd be truely portable.

      Problem is, if your php module you wish to compile in isn't written for your system, your are screwed. Besides, using your language to develop your language forces the language to be bulletproof after age.

      I've run into some oddities with php when you push its limits.

      --

      -
      ping -f 255.255.255.255 # if only

    2. Re:*AMP by RevAaron · · Score: 2

      I just wish that there was a way to compile PHP into some sorta byte code. 'cause then you'd write your Mysql, XML, expat, imagemagik, and other php modules IN php. THEN it'd be truely portable.

      What's your logic?

      Having PHP compile to bytecode wouldn't increase the portability of the extension that interface with libraries and apps written in C. If you want an XML parser to work on all platforms you could write it in PHP. A lot of languages that already perform well enough to write libraries in do that rather than doing it in C. Even with PHP compiled to bytecode, it would still have to interface with those C extension dynlib/.so/dll files.

      It might be a bit easier to maintain ports of PHP extensions if PHP had a FFI (foreign function interface) that was workable at runtime rather than requiring a specific C extension to be written for it. Languages with such an FFI (Smalltalk, Lisp and others) often can call into shared libraries on the platform with a lot less trouble and extra code.

      The only real way around this portability problem is to write everything in PHP or a language with similar portability. There's no reason you can't write an XML parser or image manipulator in pure PHP. Bytecode has nothing to do with this though, other than perhaps increasing PHP's speed to something more workable.

      It's easy to push PHP's limits- it was meant to do relatively simple web templating. And sure, it's great at that for some people's use of it.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    3. Re:*AMP by Anonymous Coward · · Score: 0

      It might be a bit easier to maintain ports of PHP extensions if PHP had a FFI (foreign function interface) that was workable at runtime rather than requiring a specific C extension to be written for it. Languages with such an FFI (Smalltalk, Lisp and others) often can call into shared libraries on the platform with a lot less trouble and extra code.

      Might be the same thing, but another solution is a binary runtime function table spec. Such as COM, etc.

    4. Re:*AMP by RevAaron · · Score: 2

      Yes, that'd be another way of doing it, and IMO much better in the long run. However, it'd probably be silly to hope that the OSS community could put such a thing together, for use by PHP or for any language, especially a cross platform one...

      Oh wait! We're talking about Ximian's Mono or Portable dotNEt/dotGNU... ;) Now the PHP just have to port PHP5 to C# (or another .NET language) and we'll be sitting pretty...

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    5. Re:*AMP by Anonymous Coward · · Score: 1, Funny

      So if swap out IIS for Apache, I'd have a WIMP system :)

      But then if I use Postgres instead of Mysql, I'd have a WIPP system. So is that Pussy WIPP'd or is it that it can WIPP everyone elses ass?

    6. Re:*AMP by Anonymous Coward · · Score: 0

      Well, OSS people have already put 3 or 4 such things together. The silly thing expecting anyone else of seeing the benefit of using them.

      The nice thing about *COM is that the runtime is pretty thin and somewhat C friendly, and avoids the whole third rail of bytecode environments.

    7. Re:*AMP by RevAaron · · Score: 2

      Well, OSS people have already put 3 or 4 such things together. The silly thing expecting anyone else of seeing the benefit of using them.

      You could use CORBA as is on GNOME, but in the truest tradition which you mention, people don't use it for aynthing but GNOME, where it would make a good way of hookup libraries for entirely non-GNOME uses as well. COM is a lot thinner than CORBA, but hell, better than writing C extensions for the rest of OSS's days.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    8. Re:*AMP by Anonymous Coward · · Score: 0

      Compiling PHP into some sort of bytecode would make it so people can't view the source, correct?

      Wouldn't this have advantages for companies who wish to sell products made in PHP?

      Are there are any non-cost solutions for doing this kind of thing?

  13. They need it *now*.... by hublan · · Score: 2, Funny

    ... because their website just collapsed under the collective weight of /.

    --
    My spoon is too big.
  14. IN SOVIET RUSSIA by Anonymous Coward · · Score: 0

    In soviet russia, Perl owns U!

  15. I blame PHP... by Dr.Dubious+DDQ · · Score: 3, Interesting

    I've been blaming PHP for the fact that I haven't gotten around to learning much of Perl or Java - I've been able to do everything I've needed to so far (Nothing TOO complex, obviously) with PHP. I've been "going to start playing with Java to learn it Real Soon Now" for well over a year at this point...

    On the other hand - from the article:
    "PHP5's object model has syntax very similar to the Java programming language, so it will be easy for J2EE programmers to learn it"

    Using PHP as a metaphorical stepping stone to learn Java then?...works for me...

    1. Re:I blame PHP... by RAMMS+EIN · · Score: 0, Troll

      Niches man, niches. Use PHP for generating webpages. Use Java for applets. If you're not writing applets, don't learn Java.

      --
      Please correct me if I got my facts wrong.
    2. Re:I blame PHP... by hyperstation · · Score: 1

      I've been blaming PHP for the fact that I haven't gotten around to learning much of Perl...

      save yourself the trouble and just learn Python :)

  16. Re:PHP vs Perl by dt23507 · · Score: 3, Insightful

    Well, I have a couple of opinions.

    1. PHP is a little easier to learn than Perl (at least it was for me).

    2. PHP was designed specifically to generate dynamic HTML, whereas Perl seems to be more of a general purpose language.

    Then again, sometimes it depends upon the application. There are some things that may be easier to implement in one language than the other, you may need the features of one that the other lacks, etc...

    Others may, and probably will, disagree :)

  17. Re:PHP vs Perl by RevAaron · · Score: 3, Insightful

    It's mostly a matter of entrenchment. Perl, being a more general purpose language, would likely perform better than PHP in a lot of areas, including web apps. PHP, however, is known as a "web language" simply because that's where it was marketed too and where it's used. People could (a few do) write full GUI apps in PHP, but there's no real advantage to using it in such an area when there are better options available.

    At some point in history, PHP provided a few features which were relatively novel at the time, at least in the Free software arena, which has a tendancy to be a bit behind the rest of the world. [1] At this point though, you can get templating ala ASP in plenty of free and open languages, including perl.

    I could be full of it though- other than having the benefit of entrenchment, does PHP have any features that truly set it apart from perl, python or any of the more mature languages?

    [1] Not in all areas of OSS, of course, but this statement is relatively true for the mainstream of OSS. There are interesting projects and acedemic research things going on that are doing new and interesting things. Like the regular mainstream, most people in the OSS mainstream aren't interested in doing things better so much as doing them as they already know how.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  18. Re:PHP vs Perl by josephgrossberg · · Score: 3, Insightful

    Why are PHP and Perl paired together so often? (I like both languages; don't get me wrong.)

    After spending some time toying around with both, their syntactic similarities seem superficial, like the fact PHP has that "$" prefix on its variables and that they use the ugly "->" operator for OOP.

    They seem like distant (free, open-source) cousins at best.

    Joe
    http://josephgrossberg.blogspot.com/

  19. Just too exciting by __aafkqj3628 · · Score: 1

    Jeez, I just can't wait for March 2002 to come around.

    However, if time isn't circular, then we won't be getting any beta :(

  20. Port? by The+Bungi · · Score: 1

    Does anyone know if there's a push to port PHP to Windows? ChiliSoft ported ASP to *nix and you can do the mod_perl thang (well, almost) with ActivePerl under IIS, so it must be possible. Eh?

    1. Re:Port? by hotgazpacho · · Score: 1

      Uh, have you looked at the PHP downloads website? Listed right under the source code tarballs are Windows binaries in both Zip files and Windows Installer Packages (MSI's) that configure Apache, IIS, and a couple other Windows webservers.

      If you scroll down a bit further, you'll also notice Windows binaries back to 3.0.17

      So, yes. They have ported PHP to Windows.

    2. Re:Port? by The+Bungi · · Score: 1

      Doh. Must RTFM before posting.

    3. Re:Port? by RAMMS+EIN · · Score: 1

      Gimme some of that stuff you've been smoking man. It must be really damn good. PHP has been available for Windows for as long as I've used it...

      --
      Please correct me if I got my facts wrong.
    4. Re:Port? by Anonymous Coward · · Score: 0

      can you get Chilisoft to work on Linux? It still runs on Windows, but the last few Redhat 7.2 builds have been broken, or maybe that's just with Apache. I don't have Sun ONE 6.x to try it with

  21. custom php programming and web development scripts by chrisranjana.com · · Score: 1

    php is the best whether it is version 4 or version 5 ... also taken from here
    "PHP is not a blindingly fast language, especially when handling large code bases," notes George Schlossnagle, a PHP performance expert and principal consultant at Omniti, an Internet consulting company. "The lack of built-in script caching and language optimization make its out-of-the-box performance disappointing. Fortunately, when configured and tuned correctly, PHP can provide performance on par with Perl and ASP. "

    --
    Chris ,
    Php Programmers.
  22. DEAD HORSE BEATS YOU by Anonymous Coward · · Score: 0
    1. Soviet Russia jokes were funny the first dozen times; now they're old.
    2. The whole point of Soviet Russia jokes is that the inversion symbolizes the government's control of the individual. "Betas release you" doesn't work because "release" has a connotation "to set free".
  23. Issues with PHP by pyman · · Score: 3, Insightful
    I have been using PHP for about 4 years, and I quite like the language. I would much rather use PHP than Perl, VBscript or Jscript.

    However there are some things which I think need to be cleaned up.

    The language is a great big mud puddle of libraries and helper functions. It would be nice if libraries could be imported at script run time (They could be sitting in memory waiting to be imported to negate speed issues) instead being available all the time. Ie If you want to use a function you must explicitly import the module containing the function. Why do I need MSSQL, Postges and MySQL connectivity all at the same time?

    And I really hate prefixing all variables with '$'. Maybe they can do something about that...?

    --
    a ^= b; b ^= a; a ^= b;
    1. Re:Issues with PHP by tunah · · Score: 2
      And I really hate prefixing all variables with '$'. Maybe they can do something about that...?

      And maybe C should get rid of the *'s for pointers, they look ugly.

      Seriously, one of PHP's great strengths is the very nice and simple "do what i mean" syntax, which would be much harder without an easy way to distinguish variables.

      Perl is even more flexible with how you write things, but it has @'s and %'s everywhere. I think PHP has a good compromise.

      --
      Free Java games for your phone: Tontie, Sokoban
    2. Re:Issues with PHP by ProfKyne · · Score: 3, Informative

      Um, if you did that then you wouldn't be able to embed your variables in a string, Perl-style.

      • PHP: "My name is $name\n";
      • Java: "My name is " + name + "\n"

      If you think about it, the PHP way is easier.

      --
      "First you gotta do the truffle shuffle."
    3. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1
      Um, if you did that then you wouldn't be able to embed your variables in a string, Perl-style.
      • PHP: "My name is $name\n";
      • Java: "My name is " + name + "\n"
      If you think about it, the PHP way is easier.
      Why not this way:
      name = "Lemming";
      ...
      "My name is $name\n";

      Combines variables that are easier to write with embeddable variables. Or is this too inconsistent?

      However, I do see another reason against it. At the moment you can do this:

      $func = "foo";
      $func("bar");
      function foo($arg)
      ...
      With "$func" being written as "func" the parser would no longer be able to recognize func as a variable rather than the name of the function "func()".

      Of course you can always use eval(), but I like the $func() or even $$var [sic] thing very much...

    4. Re:Issues with PHP by Anonymous Coward · · Score: 0

      To me, PHP locks like a massive hack...

    5. Re:Issues with PHP by ProfKyne · · Score: 1

      That's an interesting alternative (your solution at the top). I hadn't thought of it. Though I suspect that you're right, it's kind of confusing. To be honest, I never found much problem with prepending a $ to variable names, having started programming in PHP and then moving to Perl. In fact when I started to learn Python and later Java, I had a hard time distinguishing the variable names from the operators and method names because I was so used to looking for dollar signs.

      --
      "First you gotta do the truffle shuffle."
    6. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1

      Well, I learned JavaScript, then Perl, then PHP (and Pascal in between, but that's a different story). I don't really have a problem with the $ as well. There are other characters that I dislike more, mainly because they are just not easy to type on German keyboards (like {}[]\|~@ - you have to use Alt Gr for them).
      The $ makes it more obvious that it is a variable you are dealing with (like you said), and it even makes sense as a sign for "value" (yes, just a thought).
      Really bad is -> for objects. I hate that. I love using object.element instead of object->element and I'm very glad that Perl 6 will do so, too. Though _ is not the best string concatenation character, because, well, it's Shift+- on German keyboards, while . is just .

      If you want to design a language that has as few special characters as possible (like Python), you should have a look at $, too, but since we're talking about PHP here, it does not really make sense. $variable is cool. variable is not.

      Now scan through the text and try to find all variable names :)

    7. Re:Issues with PHP by ProfKyne · · Score: 1

      Yes, dot notation is ten times better than -> for separating instance names and method calls.

      If you want to design a language that has as few special characters as possible (like Python), you should have a look at $, too, but since we're talking about PHP here, it does not really make sense. $variable is cool. variable is not.

      I don't know all of the Perl "special variables", but I'm pretty sure that "$," is one of them. :) If the German keyboard is not conducive to special characters, then you must really hate coding in Perl!

      --
      "First you gotta do the truffle shuffle."
    8. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1
      I don't know all of the Perl "special variables", but I'm pretty sure that "$," is one of them. :) If the German keyboard is not conducive to special characters, then you must really hate coding in Perl!

      The most bad characters, [], {}, \ are very often used in other languages, too. Array indices, block delimiters, escape sequences, you have that in PHP as often as in Perl. $ is Shift+4, that's okay. It's not like I use the special variables in Perl more often than those characters, far from it. And most of them are even okay (especially "$,", since I do not even need shift for the ,). Okay, the @ for arrays is not that good, but what really sucks are constructs like @{$var} - in these areas Perl is especially uncomfortable.
      Perhaps I'll find a nice way to use the American layout for coding and the German layout for the rest of my tasks... though this is not ideal, too, since the printed characters on the keyboard are German layout forever.
    9. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1

      To get a better idea of the German keyboard layout, here are some pictures in normal, shift and in alt gr mode.

    10. Re:Issues with PHP by StandardDeviant · · Score: 1

      i've seen these things in Fry's (large US computer parts and every-damned-thing else chain, imagine a store larger than a Wal-Mart packed to the rafters with geek stuff) that are USB-attached programmable keypads (most of them have had something like a 5x5 or 6x6 array of keys, with some relabeling mechanism so you can label each key with what you programmed onto it). Maybe you could grab something like that and program it to generate all the troublesome characters? (googling for a minute lead me to P.I. Engineering, makers of a device that might suit your needs (albeit at ~100 USD))

    11. Re:Issues with PHP by Koschei · · Score: 1

      There's alwqys the Ruby Way.

      "My name is #{name}\n"

      where 'name' can be any expression, not just a variable name.

      --
      -- koschei
    12. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1

      I don't really think that these things would help me. You know, I *am* able to type those characters, it's just not very convenient. I guess having to use a different device is even worse. It definitely has it's uses, but not as a keyboard extension for typing.

      I will probably play around with XP's keyboard layout switcher. You can assign hotkeys to switch between layouts. It is even enabled by default AFAIK, but sometimes the layout is switched though you did not intend to do so... I'm not sure why, I just disabled the feature. I'll see...

    13. Re:Issues with PHP by ProfKyne · · Score: 1

      It must be more convenient for typing in German.

      --
      "First you gotta do the truffle shuffle."
    14. Re:Issues with PHP by ProfKyne · · Score: 1

      I haven't learned Ruby. I wonder what other features it has that distinguishes it from Python or Perl.

      --
      "First you gotta do the truffle shuffle."
    15. Re:Issues with PHP by Koschei · · Score: 1

      Many. Read the book.

      --
      -- koschei
    16. Re:Issues with PHP by ProfKyne · · Score: 1

      Maybe at some point. I have a lot on my plate. But I'll bookmark the URL. Thanks.

      --
      "First you gotta do the truffle shuffle."
    17. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1

      > It must be more convenient for typing in German.
      I'm sorry - what do you want to say with that?

    18. Re:Issues with PHP by ProfKyne · · Score: 1

      [The German keyboard layout] must be more convenient for typing in German [otherwise I would think it easier to simply use a US keyboard layout].

      --
      "First you gotta do the truffle shuffle."
    19. Re:Issues with PHP by jmcfarlane · · Score: 1

      agree... I would love to have time to migrate all my asp stuff over. asp2php is mabye an option.. but that could turn into a pain in the tail

      --


      John McFarlane
      thinkflat.com
    20. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1

      Thank you :)
      I did not do a strict comparison of both, but the main reasons for using the German layout are, of course, german characters: äöüÄÖÜß. The only difference regarding normal characters are z and y being switched (QWERTZ instead of QWERTY), which makes sense, because z is used more often than y in German. But I bet that the layout is still far from optimized...
      The numpad has , instead of ., which is normally good, but sucks for entering IP addresses... I should really try the keyboard layout switcher. And once I'm grown up, I will build better keyboards :)

    21. Re:Issues with PHP by ProfKyne · · Score: 1

      But I bet that the layout is still far from optimized...

      I think this is true wherever non-Dvorak keyboard layouts are being used, isn't it? I told myself that at some point I'd have to learn the Dvorak keyboard too, but ... well I type pretty fast already, and I don't know if Dvorak is optimized for coding.

      --
      "First you gotta do the truffle shuffle."
    22. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1

      AFAIK Dvorak ist optimized for the english language. I also wanted to learn Dvorak, but it's kind of useless for me without the german special characters. German is still my "main" language. :)

    23. Re:Issues with PHP by ProfKyne · · Score: 1

      Possibly there is a Dvorak-style keyboard layout for German? (With the most frequently-used letters in German in all the right places.)

      --
      "First you gotta do the truffle shuffle."
    24. Re:Issues with PHP by TheLink · · Score: 2

      That's not really a feature that distinguishes Ruby from Perl.

      With Perl you can do something similar:
      print "Result is: ${\( myfunc($somevar)*2 ) } bars";

      It's a tad uglier, but still practical. That's perl for you ;).

      It also works with the <<"HERE"; stuff.

      Stupid that selecting "plain old text" in slash still requires me to use &lt; to represent '<'s

      --
    25. Re:Issues with PHP by ProfKyne · · Score: 1

      You make a reference to a value and then dereference it. Neat, I didn't think of that. But not something I'd ever use in a release script (too ugly!) ;). Thanks for sharing.

      --
      "First you gotta do the truffle shuffle."
    26. Re:Issues with PHP by TheLink · · Score: 2

      You're welcome - I copied the idea from some site when I was learning Perl + DBI + CGI. Can't find the source at the moment.

      I've actually used it in production stuff.

      Though it is indeed ugly, it's convenient enough when you want to use the output of a few functions right in a multiline string. And you don't feel like creating a few throwaway variables a few lines up, just to stick them in the string.

      Explaining it to some people is a bit less convenient ;). So I'll be happy to learn of other alternatives.

      TMTOWTDI :).

      --
    27. Re:Issues with PHP by 'The+'.$L3mm1ng · · Score: 1
      Possibly there is a Dvorak-style keyboard layout for German? (With the most frequently-used letters in German in all the right places.)
      According to the list of keyboard layouts that XP provides, there is no such thing. English Dvorak, Dvorak for left-hands, Dvorak for right-hands - that's all.
      Yet I startet to use the layout switcher. It will take some time until I am really fast with the US layout, but it might pay out. After all, I just need to press Alt+Shift to switch. And the layout is switched per-application, not globally. This is good, because I can answer my eMails in German and continue coding in English simply by Alt+Tabbing to my editor. Cool.
    28. Re:Issues with PHP by JoScherl · · Score: 0

      The you might get a problem when doing

      $foo = 'bar'; ...
      $sth = 'foo'; ...
      $last = $$sth;

      If this runs you finish up with $last == 'bar' or this example:

      $function = 'phpinfo' ...
      $function(); // executes phpinfo();

      This are real-world examples, I used in my applications, and I think it's much clearer if the $-sign appears everytime than only somtetimes...

  24. Using design patterns by Wizard+of+OS · · Score: 4, Interesting
    The quote above states:

    Co-creator Zeev Suraski states the new object model is inspired by the book, "Design Patterns".


    While this isn't false, it did get me on the wrong foot. It appeared to me as if the PHP developers were just realizing that stuff like design patterns exist, and started writing their code accordingly. THe article however states:


    "The way PHP4 was built -- it was not easy to implement design patterns," says Suraski. "PHP5 is much more suitable, so you will be able to take that book and implement the design patterns in your code."


    It would've been helpful if that quote had been in the post, but it makes clear that PHP5 will have much better OO features than PHP4 currently has.
    --

    --
    If code was hard to write, it should be hard to read
    1. Re:Using design patterns by Tablizer · · Score: 0, Troll

      Obligatory design pattern counter-opinion:

      http://www.geocities.com/tablizer/prpats.htm#for mu las

      Quote of a quote:

      "In software engineering, duplication of something is often considered a sign that more abstraction or factoring is needed. Duplication should generally be refactored into one or fewer spots to simplify the code and localize changes to one or fewer spots. In other words, why do patterns have to be duplicated instead of just referenced for each usage? Do GOF patterns represent unnecessary duplication? Is all duplication bad?"

      This question:

      "In other words, why do patterns have to be duplicated instead of just referenced for each usage?"

      is almost as powerful as, "Why does God need a spaceship? [Trek]"

      Paul Graham has said that GOF patterns are a sign that "your abstractions are not powerful enough" (paraphrased).

    2. Re:Using design patterns by thebatlab · · Score: 1
      So if you look at your design and it has something similar to a Singleton pattern you should abstract that a little better? How do you better abstract that you need one and only one instance of an object created and used by any other object? I think that's about as deep down you can go. What this does is encourage overthinking during design. You can't have the designers sitting around mulling over whether they aren't abstract enough. Too much abstraction can kill things too. Pablo Picasso anyone? ;)

      Patters are a great tool but they can be misused. I think this Paul Graham guy took too hard of a look at the misuse of them. Sure, you don't go looking for where you can insert a pattern but if you're designing an interface and you want a nice structure to your design you'll want to have a proxy between the interface and the backend to filter things through nicely so that the interface worries about itself and knows that if it wants to update some data, it just makes a call to retrieve updated data and doesn't need to remember to pass in a database object or some other sort of state object that the interface shouldn't have to worry about.

      Anyways, longer post than I wanted it to be so I'm done now.

    3. Re:Using design patterns by Tablizer · · Score: 0, Troll

      So if you look at your design and it has something similar to a Singleton pattern...

      I don't think Singleton is a good example to look at. For one, it is very paradigm-specific. But other GOF patterns dictate how to set up the data/state. In procedural/relational thinking, you just issue a query against (mostly) pre-existing tables rather than build up a code-structure from scratch to perform such. I find formulas (queries) more compact and less disruptive to the larger app code structure. It is like moving the wires (rewire) instead of moving the circuits themselves.

      Not exactly 100% factorization (one thing to reference), but much closer than GOF comes.

    4. Re:Using design patterns by jorleif · · Score: 1
      You are primarily speaking about design where Paul Graham was speaking of actual code. It should be noticed that even they are called _design_ patterns, they are actually patterns in program code. The point he was trying to make in this article was that regularities in code are a sign of the human compiler at work, and that means that the programmer is doing the job that the compiler should be doing. As an example of how it would work, consider the Singleton pattern you mentioned. Instead of doing something like this:
      public class Foo{
      private static Foo instance = null;

      private Foo(){
      }

      public static getInstance(){
      if(instance == null){
      instance = new Foo()
      }
      return instance;
      }
      }


      You should be able to write an abstraction Singleton declaring something similar to the above code (this would be the macro Paul Graham was recommending). After this you could write:
      public class Singleton Foo


      (or something similar). Now this way the Singleton code would not be duplicated. Note that I personally do find design patterns a very powerful technique, and am not trying to dis them like Paul Graham was. However I would find it very neat if one could define Singletons as I described above.
    5. Re:Using design patterns by Anonymous Coward · · Score: 0

      Please comment instead of marking everything "troll". That is not usable info, guys.

  25. One person's experience with PHP ... by tdelaney · · Score: 4, Interesting

    ... and why I won't go back.

    PHP 4.2.3. Windows 2000.

    90% of the way into a decent-sized project, I started experiencing somewhat random crashes. Somewhat random in that there seemed to be no consistent way to provoke them, but once they started happening they happened in precisely the same way, consistently.

    Simple changes, such as adding a single character to a script, would "fix" it on a particular machine ... and sometimes expose it on another machine. I'm talking about adding a blank line to a script. It seemed likely that there was a memory error of some kind in PHP.

    Downgrading to earlier versions of PHP 4.x didn't fix the problem. Downgrading to 3.x was not feasible ... transferring to a 3rd-party session system that was incompatible with the 4.x sessions and completely untested by us was not possible by that time.

    Of course, I attempted getting the source code and finding the problem myself. Unfortunately, none of the 4.x versions would compile. The 3.x versions would - but 4.x wouldn't. Obviously, some black magic was required. Sacrifices failed.

    Time was running short. Faced with a very short deadline, I made the only decision I could ... I dumped PHP. I was in a situation where I could not trust the underlying technology.

    As an indication of what dire straits I was in, the technology I eventually recommended to replace PHP and Apache was ... IIS 5.0 and Active Server Pages. Believe me ... if there had been any other viable option, I would have taken it. mod_python looked viable at first, but I didn't have time to go through the cycle of building a single-threaded python, and verifying the underlying technology. With ASP there was a fairly direct translation from PHP.

    I hate that this application has been written in VBScript. The shenanigans I had to go through to get a particular COM control to load and be controlled by IIS - it's system of impersonation doesn't work very well if the COM object isn't specifically designed to be used with it. Under Apache it was able to run as LocalSystem ... which was acceptable since the users are trusted. Under IIS I eventually needed to create an administrator user which a single page uses - all other pages use a Guest user.

    Obviously I was doing something outside the norm, since there are thousands of web sites which use PHP as the underlying technology. I suspect most of them are running 3.x. But the sheer number of issues that I found with PHP during the relatively short development cycle convinced me that it was in no way mature enough for us to trust our work to it.

    1. Re:One person's experience with PHP ... by Twister002 · · Score: 2

      You were probably running it as an ISAPI module instead of in CGI mode. I've had problems on Windows boxes running it as an ISAPI module, it even says the ISAPI version isn't stable in the read me, but I haven't had any problems running it as a CGI.

      Your ASP/COM problems sound weird to me. if you haven't already, look into using MTS/COM+ with that object.

      --
      "For a successful technology, honesty must take precedence over public relations for nature cannot be fooled." -Feynman
    2. Re:One person's experience with PHP ... by StandardDeviant · · Score: 1

      Just as an FYI from somebody who has written a lot of code for oil companies (read: welcome to NT-land, hope you enjoy IIS!), you can use much nicer languages than VBScript as your ASP language. JScript is much less of a syntactic jump than vb from php, and if you can get approval to install ActiveState's perl, you can use PerlScript seemlessly (and perl for the simple uses you'd have in a webapp would take any decent php coder less than a week to pick up fluently). So you gain the "home-field" advantage of IIS/ASP/COM, with a decent language to code in...

    3. Re:One person's experience with PHP ... by Lord+Omlette · · Score: 2

      Sorry, but that's not fair. For some reason, it's as if they completely and totally forgot to do regression testing w/ the goddamned release.

      utime doesn't work. That means
      touch doesn't work.
      gzip doesn't work.
      error messages don't get reported.

      I begged my boss to roll php 4.2.3 off the servers and he did as soon as he saw what I was talking about...

      Other versions of php are just fine, check 'em out!

      --
      [o]_O
    4. Re:One person's experience with PHP ... by Randolpho · · Score: 1

      Next time try looking into Zope. It's an outstanding platform for web-applications and dynamic web content.

      It sucks for static through-put of files, however, so if you plan to serve large files stick with Apache. But if you want dynamic content -- go Zope.

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
    5. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      I was indeed using the CGI module (the ISAPI module looked *way* too flakey for me to consider).

      The COM stuff isn't surprising, as we're doing fairly unusual stuff with something that wasn't really designed for it.

    6. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Whilst you *can* use JScript, it really isn't as well supported as VBScript. VBScript is the "native" ASP language, and everything else is a second-class citizen.

      One of the reasons for moving to ASP/VBScript was familiarity - much to my dismay, I have written extensive amounts of it :(

      I've also used PerlScript before ... for a single project. I gave up on Perl once I started looking at the so-called "object-oriented" aspects. Python is so much nicer.

    7. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Unfortunately not. Going back to a completely clean install of 4.2.2 and 4.1.2 for example failed to fix the problem.

      It appears to be a long-standing bug.

    8. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      The site was originally specced to use Zope (which I would have been very happy to use ... been wanting to have a look at the ZPT for some time).

      However, the decision was made by someone (I'm not sure who - it was before I came onto the project) that Zope was too heavy-weight for what we wanted.

      By the time PHP failed, it was too late to go to Zope ... the approaches to web development are just so different between the technologies.

      Basically, ASP was the one technology where I could (almost) guarantee having the site in an equivalent state to the PHP version in the time frame. A purely risk-management decision (including the risk of bugs in IIS, etc).

    9. Re:One person's experience with PHP ... by RAMMS+EIN · · Score: 1

      Don't tell me it never occured to you that those random crashes could be due to the fact that you were running it on Windows! I'm not saying that they were, but it doesn't sound unreasonable to me. AFAIK, random crashes are Windows's trademark...

      --
      Please correct me if I got my facts wrong.
    10. Re:One person's experience with PHP ... by Anonymous Coward · · Score: 0

      So just because you're too incompetent to install a running version of php on IIS, you wasted all of that precious time rebuilding it?

      PHP is exceptionally reliable, millions of people have it running under IIS 4 and 5. And maybe 40% have install issues and perhaps 5% have issues that pop up out of nowhere without changing a config in the life of the box.

      Now I like Linux more than Windows, but this is liking claiming active directory sucks because you were to GD stupid to set it up right in the first place and you've got tons of integrity problems.

      But, don't get me wrong, I'm not complaining.
      I make $125 off of stupid SAs and developers like you!

    11. Re:One person's experience with PHP ... by mgkimsal2 · · Score: 3, Insightful

      Bzzttt - wrong.

      There are not MILLIONS of people running PHP under IIS4 and 5, and it's your responsibility to prove that there are that many. It just doesn't work reliably under IIS in ISAPI mode period, which is what most people would want. Running as CGI is godawful slow, and millions of people are not going to pay $ for Windows specifically to use an extremely slow option for dynamic web stuff.

    12. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Hmm ... strange that I said I was running PHP under *Apache* ... and using CGI no less (in another post).

      So where did you get the impression that I was running PHP under IIS?

      Ignoring the "millions of people" bit, don't you consider 5% (a figure that is probably way higher than reality) having issues that pop up out of nowhere being way too high?

      The simple fact is, the site was developed in PHP over the course of about 2 months, during which time a number of issues came up, but nothing that couldn't be worked around.

      Until finally a major failure in PHP occurred, at a time when we could not dedicate the time to hunting down and fixing it.

      The rewrite in ASP took 5 days. It would have taken considerably longer if it was being done from scratch, but of course we had worked out the problems with the other technologies involved whilst working with PHP - similarly all the design and structural work was done. The rewrite was essentially a translation (taking into account VBScript's flaws).

      I'm sure PHP is fine for many things - but it proved to be unsuitable for what we were doing, and I am unable to recommend it for another project when there are so many better things out there (and no, I don't in general consider IIS and ASP better).

    13. Re:One person's experience with PHP ... by oliverthered · · Score: 1

      Ummm... I've always used javascript too,
      Javascript and VBScript are just parsed into M$'s interperter, neither are 'native'.

      Javascript also has better error handeling and object support.

      --
      thank God the internet isn't a human right.
    14. Re:One person's experience with PHP ... by Anonymous Coward · · Score: 0

      Well, sorry to hear about your bad experiences, I've never experienced any problems with stable releases. Sure the odd bug or broken function but never anything like you describe. Are you sure the issue was actually was actually PHP related?

      `I don't in general consider IIS and ASP better'

      If you only knew how much work I got this year rewriting IIS/ASP sites for Apache/PHP.

    15. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      It's not something I can prove (since I couldn't get any of the 4.x versions to build ... bits appeared to be missing from the MSVC projects, and I've never used MSVC).

      However, the symptoms I was getting were extremely indicative ... in particular that a single space or newline (which should be insignificant) could either show or hide the problem. It was most likely a buffer overrun ... but not for sure, since I could provoke it on very short files (buffer overruns tend to be on larger chunks of data), and *adding* stuff to files could hide the problem. Plus it was consistent across reboots (which implies it was in the PHP memory space).

      As I said, not mature enough for use to rely on. We might have had it work on all our dev and test machines, but then fail on the production machine. We couldn't know.

      Whilst we have the same problems with IIS (can't know for sure that it works) we at least haven't had it *fail* anywhere. Cracked yes (Nimda) but not a basic technology failure.

    16. Re:One person's experience with PHP ... by Anonymous Coward · · Score: 0

      you should read the Microsfot docs -- they claim that Javascipt try/catch blocks are an inferior substitute for vbscript's "on error resume next".

    17. Re:One person's experience with PHP ... by Anonymous Coward · · Score: 0

      If 95% of people never experience the problem, it is undoubtably a problem with your hardware manufacturer's drivers or bad memory. You probably bought unregistered ECC ram, didn't you?

    18. Re:One person's experience with PHP ... by oliverthered · · Score: 1

      they also talk out of there ass.

      --
      thank God the internet isn't a human right.
    19. Re:One person's experience with PHP ... by TheLink · · Score: 2
      I've also used PerlScript before ... for a single project. I gave up on Perl once I started looking at the so-called "object-oriented" aspects. Python is so much nicer.


      Aren't Python's object oriented aspects much nicer than PHP's too?

      I can understand using Python over Perl when you want OO, but why PHP over Perl?

      Really curious.
      --
    20. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Not in the slightest. Please stop trying to suggest that I'm a moron. Chances are I know more about such things than you, but I'm not going to get into a pissing contest with an anonymous coward (or anyone for that matter).

      5 machines - 3 development machines, 2 servers (rack mounts, very high quality control). All exhibited the problem in different ways, but the problem was consistent when it happened.

      If it had been a hardware problem, the results would have been inconsistent (happening not just in PHP, and not in exactly the same way each time on the same machine, across reboots). Whilst I would normally expect more inconsistency with a memory problem, due to differences in the order of things happening, it is actually not surprising that this is consistent. PHP performs exactly the same steps each time it loads up and runs the offending page. As CGI, it has its own memory space, so it *should* hit the problem in the same way each time.

      No problems (other than general windows and specific application ones ;) have been noted with any of those machines since the changeover. One is the machine I've been using every workday for the past two years.

      The most likely explanation is a bug in the PHP 4.x codebase, which has been exposed because I'm doing something unusual. Most people simply do the usual things with PHP ... display pages with data extracted from a database. Since these are the most common things to do, bugs in those code paths have already been found and fixed.

    21. Re:One person's experience with PHP ... by djupedal · · Score: 2

      I'm not buying it...well, I was until the IIS & ASP promo came along.

      t'iz a poor man that blames his tools...

    22. Re:One person's experience with PHP ... by eric2hill · · Score: 2

      I started with a new company in August and the first thing I was tasked to do was build a bunch of dynamic-content web pages for a new web site.

      What was the first thing I did? Scrap IIS and VBScript in favor of Apache2 and PHP. PHP runs WONDERFULLY as an Apache2 module, and I have had literally ZERO problems with this install on Windows 2000.

      Running Apache has been a dream compared to managing IIS. We use Oracle for our back-end database, and PHP's OCI8 module has performed flawlessly. So far this solution has been installed on 3 different web servers, and I have yet to see an "unexplained crash". I get errors in the logs because of bad code in some of the pages or a missing file here or there, but Apache2 just keeps on working and PHP just keeps on serving pages.

      I would guess that you're running into a scalability problem with IIS and spawned processes. Last time I used IIS, it seemed like it wouldn't release process or object handles until the service was restarted. After a while, the system would literally run out of new process handles to give out, and new processes wouldn't start up. Restarting IIS always seemed to cure the problem, but what a PITA. That's when I switched to Apache2+PHP and haven't looked back. I can't suggest the ISAPI plugin since it's listed as "buggy", but it makes me wonder if the plugin is really buggy, or if IIS has issues with external scripting engines...

      --
      LOAD "SIG",8,1
      LOADING...
      READY.
      RUN
    23. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      How many times do I need to state this? The problems were manifested with Apache 2.0.40 and PHP 4.23 (and 4.22 and 4.12) running as a CGI module on Windows 2000 (Pro for development, Server for testing - never got to production).

      If it had been loaded as a long-running process (Apache module or IIS ISAPI module), I doubt I would have seen the consistent error - instead I would have seen much more random errors as different things would happen in different ways. By running as a CGI module, I was ensuring that the exact same sequence of events was occurring each time ... executable was loaded (and memory space assigned), script was read, and somewhere along the line something bad happened.

      What you are doing sounds exactly as I described - you are doing the *normal* things with PHP - primarily serving pages generated using data from a database.

      I *expect* that my case is unusual - otherwise all these PHP sites would be failing left, right and centre.

      However, the fact that I did indeed encounter these problems, plus the general immaturity of much of PHP (for example, the session-handling) means that I cannot recommend the technology.

      Not to mention that it was almost as much of a horror to program in as VBScript :(

    24. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      I hate IIS and ASP. It sucks. I avoided recommending it for as long as I could as I evaluated other alternatives. The fact that I was willing to recommend it told everyone exactly what a shitty situation we were in, as they knew I would only do such a thing if it were the only viable alternative given the time frame and available skillset.

      Does that sound like a promo to you?

      I've posted a lot on this topic - more than I've ever posted on a topic before. Why? Two reasons.

      1. To clarify some misunderstandings about the situation (what technology was used, and when).

      2. Many people seem unwilling to accept that *sometimes* an open-source tool is less suitable for a particular purpose than a proprietory tool.

      I'm not saying that IIS and ASP were *good* tools. But they were more usable for our needs.

      If it had not been for that one single showstopping bug the web site would be using PHP right now, despite the other flaws we found.

    25. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      No real OO involved in the PHP stuff ... except interacting with COM objects.

      In any case, I would have much preferred a Python solution, but most of the decisions were made before I came onto the project. In particular, Zope had been thrown out for being too "heavyweight".

      Unfortunately, the timeframe of fixing it did not give me enough time to set up a mod_python solution.

    26. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Actually, it was the very first thing that occurred to me. I spent a lot of time investigating the possibility.

      The point is though, that *random* crashes are a Windows trademark - not crashes which appear to be random in how you provoke them, but consistent once they start happening.

    27. Re:One person's experience with PHP ... by Anonymous Coward · · Score: 0

      Could you please mention what exactly it was you were trying to do that was unusual? Also, I realize you were stuck using W2K, but did you try running the app on a *nix box? I have coded several sites that run flawlessly using PHP 4.0.6/4.2.2, MySQL 3.23.*, and Apache 1.3.*. (Maybe it was an Apache 2.0 issue?)

      Chris (who's too lazy to create an account right now)

    28. Re:One person's experience with PHP ... by rgigger · · Score: 1

      Were you by chance connecting to MS SQL for this application. The only time I have ever had problems with PHP was when I was trying to connect ot MS SQL in which case I had problems exactly like the ones you are describing. I switched to postgres and never had another problem.

    29. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Nah - there's absolutely no database access involved in this application. As I've stated, we're doing some fairly unusual stuff ;)

    30. Re:One person's experience with PHP ... by pavera · · Score: 2

      ROFLMAO
      being cracked by NIMDA isn't considered a basic technology failure??? WTF
      Thats the funniest thing I've heard ever.

    31. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Nah - it's more of a design failure :( It can be really hard to close everything down on a Windows machine - by design everything is open (urgh). Nimda used about 6 different attacks on different technologies to propagate ...

      Security is the #1 argument I have against IIS.

      In any case, if *I* had set up those machines, they would have been less vulnerable, since I don't let indexing server be installed ... (one less point of attack).

    32. Re:One person's experience with PHP ... by pavera · · Score: 2

      Right I understand that windows is difficult to secure, and I know its a design failure, but its the design of the technology... hence the technology is poorly designed, and therefore, bad, broken, fallable... Anyway, personally I think nimda is a really nice virus, I watched it once eat up a whole 200 seat win2k network... took about 3 minutes... I'm glad I wasn't the admin cleaning that up... but anyway, I see your point, and I've developed alot of PHP/Apache/MySQL websites, and I've never seen anything like what you described... so YMMV and off we go.

    33. Re:One person's experience with PHP ... by rgigger · · Score: 1

      I'm just curious. What kind of unusual stuff are you doing?

    34. Re:One person's experience with PHP ... by tdelaney · · Score: 2

      Long-living ActiveX controls (on a single page) - as in 10+ minutes for a single page to be generated.

      Initially the control was meant to live across page requests, but there proved to be no way to hold onto the the control reference. In the end, doing everything on a single page proved to be a better design anyway.

      As for the control in question ... it's a Microsoft application that was never meant to be used in this way ...

    35. Re:One person's experience with PHP ... by Anonymous Coward · · Score: 0

      wait, wait

      apache 2.x ?

      fucktard, read the php docs, and you will see how php and apache 2.x aren't stable with each other.

      jesus, stop trying to make a square block go through a round hole. do your research next time. you fucked it up yourself.

  26. I think I'll... by Randolpho · · Score: 1

    ...just stick with Zope.

    It's by far the best dynamic content management system out there. And the underlying language, Python, is easily the best too.

    --
    "Times have not become more violent. They have just become more televised."
    -Marilyn Manson
  27. Re:PHP vs Perl by RevAaron · · Score: 2

    Oh, come off of it. Just because I'm disagreeing with the /. mainstream doesn't mean I'm trolling- my post was (relatively) well-formed and sensical discussing specific points that pertained to the matter at hand. A dissenting opinion, yes, a troll, no. If you don't agree with it, try replying to it with a similar level of intelligence (it's not hard), or is just easier to try to mark it a troll in a poor effort to get the pointage down so no one reads the truth?

    (cranky early work day)

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  28. Re:PHP vs Perl by StandardDeviant · · Score: 1

    I think the main thing PHP buys you is speed and sessions. In exchange you give up a decent, coherent database access mechanism and elegant syntax ($foo for all datatypes is just stupid).

    Note that I'm talking about the as-is distributions here. You can get speed and sessions out of perl (mod_perl, Apache::Registry, Apache::DBI, and the various session modules off CPAN), and you can get a coherent (I've heard) DB access layer using the PEAR DB.php class. (I don't think you can do much about php being ugly code-wise. [by ugly i mean things like variable denotation and the gawd-awful looking preg_* function calls to get decent regexp behavior. what kind of web language puts regexps in the function-call ghetto anyway?]) But many people just don't take the time to get the full oomph out of their development environment, for better or worse. That's why people who do get paid well... ;-)

  29. PHP 0wn5 j00 by Anonymous Coward · · Score: 0

    PHP rules. If it craps out on your machine, your computer sucks. It works fine on mine and it's incredibly easy to learn with only a little previous programming experience. It's like C, only easy. Perl sucks in terms of server-side scripting compared to PHP. Perl should just stick with processing text. PHP is t3h g00d.

    1. Re:PHP 0wn5 j00 by Anonymous Coward · · Score: 0
      Don't tell me:
      6 mnfz ago I couldtn 3v3n 5p311 Pr0gr4mm3r 4nd n0w 1 i5 0n3

      Do we need any more proof that PHP would already have gained complete acceptance if it were just a little more difficult to learn?
  30. Rewrite? by Snap+E+Tom · · Score: 1

    Does anyone know how much rewriting there will have to be to migrate to PHP5? We're using OO in some applications now. Will the way we instantiate objects and reference properties remain the same?

  31. Good comparitive examples... by supton · · Score: 2, Informative

    ...or why python is better on the backend and the front-end.

    Take namespaces for special-purpose library stuff. Or inline eval (include) of logic code (bad, bad, bad). Good analysis (mine) here, including comparitive code to demonstrate my point.

    Like Java, Python already does assignment by reference, copy is optional. PHP is just figuring this out. PHP's language leaves much to be desired in team programming and code readability. Using 'Design Patterns' is only half the equation. You can do component oriented programming, but some languages are going to be better than others at facilitaing it in a manner that works in reality. PHP5, unfortunately, won't hold a candle to Zope 3, which is really going to compete at the level of J2EE and .NET as well-thought-out enterprise component frameworks.

    PHP lacks object persistence, multiple inheritance, full-featured transaction machinery, a built-in security model, an interactive command-line interpreter, and it is too tied to web-scripting only. And becuase it doesn't have a security model that binds operations to roles/permissions, it can't easily put gateway methods with bound roles (like Zope's proxy roles) between web code and SQL code, leading to increased chance of SQL injection vulnerabilities.

    On the other hand, Zope has object perisistence, transactional RDBMS integration and connection abstraction, templated, componentized SQL methods, a security framework, and Python, which is a much better language (explicit is better than implicit). And if you need to do any sort of content-management, Zope has a mature component-oriented framwork in the CMF, with a killer-app implementation in Plone. It also has XML-RPC, WebDAV, Caching managers, and all sorts of other goodies you won't find out of the box in PHP.

    PHP is fast, and it is easy, but it is by no means scalable. PHP offers a gentle slope learning-curve, and quick easy hacks, but is somewhat like a crack addiction. What PHP as a framework needs to do is not reinvent the wheel in the language department, and use a pre-existing, scalable, enterprise-class OO scripting language, and utilize a templating technology that doesn't promote mixing logic and presentation - but what's the point, since it would look remarkably like Zope?

    1. Re:Good comparitive examples... by Randolpho · · Score: 1

      Heh... I was gonna write something similar to that, but ended up with my quick-and-dirty few sentences. Color me lazy. Oh, and BTW... mod parent informative, please!

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
    2. Re:Good comparitive examples... by mgkimsal2 · · Score: 2

      And for your next trick, you'll compare a language to yet another framework, right? Hrmmm... .NET server has 14,000 class libraries, but PHP doesn't have those. Websphere offers (foo) but PHP doesn't. PHP must suck.

      Pretty much all of what you offered there is available in free or commercial frameworks, and the rest is opinion, not fact (python is 'better' - good argument).

    3. Re:Good comparitive examples... by Anonymous Coward · · Score: 0

      you're confusing applications (an interactive command interpreter), libraries (object persistence), and modules (transactions, security model) with languages. Yes I wish PHP had those things, but there's nothing inherent in the language (or Zend) stopping you from adding them. But I know what you mean. After a lot of work trying to build my own persistence layer in php (and then adding c), I eventually had to switch to Java to get the job done.

    4. Re:Good comparitive examples... by rgigger · · Score: 1

      "PHP's language leaves much to be desired in team programming and code readability." - Could you please explain this in enough detail for it to mean something to someone with no experience with zope or python.

      "PHP lacks object persistence" - Yes this sucks.

      "multiple inheritance" - Does zope do multiple inheritance like C++ or like Java (which doesn't really have multiple inheritance of couse but sort of does)

      "full-featured transaction machinery" - Could you please explain what this means in terms of what sort of problems it would solve for me.

      "built-in security model" - I have built one into the framework that I wrote for php. Why would I want the language to force it on me? Or is it a function of the zope frameworks?

      "interactive command-line interface" - Why would I want this.

      "too tied to web-scripting only" - True. But it is something that they are focusing on more now. (yes vaporware vaporware blah blah). But it does fine for me now since I don't really need to do desktop gui stuff and writing command line stuff in php is actually quite easy.

      "And becuase it doesn't have a security model that binds operations to roles/permissions, it can't easily put gateway methods with bound roles (like Zope's proxy roles) between web code and SQL code, leading to increased chance of SQL injection vulnerabilities." - Are these not things that can be handled at the framework level. I add to my framwork as I need to and these problems all have reasonable solutions that can be implemented in php.

      "On the other hand, Zope has object perisistence" - Yes this does suck.

      "transactional RDBMS integration " - Uh and php doesn't have this? What exactly does zope do for you here that php doesn't? Maybe I don't understand what you mean here.

      "connection abstraction" - PEAR provides a very nice database connection abstraction. (pear.php.net)

      "templated" - Are you taking about separating user interface (html) code from your programming logic? Please go to smarty.php.net. I stopped mixing code and html after my first real project.

      "componentized SQL methods" - Could you please explain this.

      "security framework" - Once again is this part of the framework or the language?

      "Python, which is a much better language" - This I know nothing about (on the python end that is)

      "And if you need to do any sort of content-management, Zope has a mature component-oriented framwork in the CMF" - And php has nothing to help you out with content management??? It seems like a new content mangemnet system show up on freshmeat every other day.

      "with a killer-app implementation in Plone" - Because nothing like this exists in PHP??? There are tons of apps writting in php that could be cnsidered killer-app quality if this was the standard of measurement.

      "It also has XML-RPC, WebDAV, Caching managers, and all sorts of other goodies you won't find out of the box in PHP." - You are right on some of these but not other. But this doesn't mean that php doesn't have anything out of the box that zope lacks.

      "PHP is fast, and it is easy, but it is by no means scalable" - Do you have something to back that up?

      "utilize a templating technology that doesn't promote mixing logic and presentation " - Anyone with any brains has already done this. There are tons of templating options for php.

      I am not trying to argue here as my knowledge of zope is nill. Many of your complaints though are simply not true. Others have not been a problem for me. I have been using php for 2 or 3 years now and I regret to say that it has prevented me from looking at other solutions (I have mostly been eyeing J2EE). It has always been fairly easy to add the functionality that I need to my php framework. I wonder though what I am missing. Am I reinventing the wheel by writing things that would already be taken care of with zope or J2EE? what methodalogies could help me code faster that I simply don't know about because they are not part of the php way of doing things.

      I agree PHP started out as a cheap hack and it does seem like sort of a kludge at times but for me it has always been very practical and reliable. It has a large and helpful community. It is easy to admin and manage. There is TONS of free code out there to handle anything you want to do. There are TONS of great apps http://freshmeat.net/browse/160/?topic_id=160 and development is quick and easy even on "large" projects.

      I am interested however in knowing what zope could really do for me to make it worth giving up php.

      Thanks.

  32. backwards compatability by jmcfarlane · · Score: 1

    I guess there isn't always a good way to maintain backwards compatability, but it does stink to go back thru large chuncks of code fixing stuff :)

    --


    John McFarlane
    thinkflat.com
    1. Re:backwards compatability by Anonymous Coward · · Score: 0

      Biggest issues with PHP recently were with the people who still relied on globals being registered automatically (data posted from forms, etc. that you can now access with $_POST et al). They don't have register_globals enabled by default anymore (thank god), but I really wonder why the PHP folks put that feature in to begin with. It's just an exploit waiting to happen.

  33. Yahoo? by TheLink · · Score: 2

    Funny thing is from Yahoo's own slides it would have seemed that Perl would have been the best choice (assuming they had equal access to good PHP and Perl coders).

    Referring to:
    http://public.yahoo.com/~radwin/talks/yahoo-p hpcon 2002.htm

    YSP = mod_perl.

    From the slides, YSP beats PHP on performance. Just as manageable (PHP still requires discipline). Lots of existing Perl code doing other stuff. YSP uses more memory - but what's 900MB(YSP) vs 850MB (PHP)at 500 concurrent requests?

    BTW: the page uses javascript where href would do (top 10 web design mistake). Doesn't give me a good impression of cluefulness.

    References:
    http://public.yahoo.com/~radwin/tal ks/yahoo-phpcon 2002_files/slide0041.htm
    http://public.yahoo.com/ ~radwin/talks/yahoo-phpcon 2002_files/slide0002.htm
    http://public.yahoo.com/ ~radwin/talks/yahoo-phpcon 2002_files/slide0003.htm
    http://public.yahoo.com/ ~radwin/talks/yahoo-phpcon 2002_files/slide0004.htm
    http://public.yahoo.com/ ~radwin/talks/yahoo-phpcon 2002_files/slide0005.htm

    So why did they really choose PHP over Perl?
    The given 3 Perl cons, and the "Why PHP slide" are a bit weak IMO.

    --
  34. php.net by Anonymous Coward · · Score: 0

    their website hints .NET, but I don't see anything about compatibility with .net! They could save alot of time by building it around the .net framework instead of interpretting at runtime. IL is faster than parsing the langage anyhow.