Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
PHP Programming

PHP 4.3.0 w/ZEND 2 Alpha 32

Twintop writes: "PHP.net has released the a new version of PHP 4 to include the new Zend 2 Scripting Engine. This alpha update adds more increased support for Java and .NET technologies. More can be found on PHP.net and Beta News.com."
This discussion has been archived. No new comments can be posted.

PHP 4.3.0 w/ZEND 2 Alpha

Comments Filter:
  • I wonder whether this is really quality-checked,
    and I guess, not.
    Oh boy, we need a split "stable"/"testing" for
    PHP on the BSD ports tree...
    • by Anonymous Coward
      No you don't, because *BSD is dying.
  • by metacosm ( 45796 ) on Monday June 10, 2002 @03:30PM (#3674875)

    Long ago, I used php on a very small project, and it worked wonderfully (due to the utter simplicity of the project).

    Since then, I have not touched it, due to immature error handling, terrible objects and inconsistancies between functions and methods.

    It seems that this version (based on the Code Samples [php.net]) has fixed most everything I once hated, and that I might get to use php in a production enviroment sometime soon.

    Most important things to me are try/catch and destructors.

    • So let me get this striaght...what you are saying is that you hated PHP because it didn't have exception handling and destructors? That makes the languages that you don't hate pretty rare I'd say... I personally have never had any need for exceptions or OOP for generating my webpages, and I don't have the feeling they're lacking in any aspect. Neither do the people who hire me.

      I really don't see what your problem with PHP is. If there's anything wrong with it it might be bloat, but with the small footprint and fast execution PHP has that really doesn't seem a legitimate complaint to me. I have loved PHP ever since I started using it.

      Also, contrary to what others have said, PHP 4.2.0 works fine with Apache 2.0.35, at least on my box.
  • So misguided (Score:4, Interesting)

    by andy@petdance.com ( 114827 ) <andy@petdance.com> on Monday June 10, 2002 @03:49PM (#3675038) Homepage
    I'm so frustrated by the culture of performance:
    Private Members.
    The Zend Engine 2.0 introduces private member variables. Note that for performance reasons no error message is emitted in case of an illegal access to a private member variable.
    "For performance reasons", they're ignoring the encapsulation that would help correctness...
    • Well, when you consider that PHP is primarily used as a scripting language on web servers, it makes sense to optimize for performance. You can't have processes hanging around too long, else they start to clog things up and pretty soon you have a really lovely rackmounted paperweight.

      Performance is everything for web servers. Get 'em in, get 'em out, next please.
      • Re:So misguided (Score:5, Informative)

        by andy@petdance.com ( 114827 ) <andy@petdance.com> on Monday June 10, 2002 @05:00PM (#3675522) Homepage
        Well, when you consider that PHP is primarily used as a scripting language on web servers, it makes sense to optimize for performance. You can't have processes hanging around too long, else they start to clog things up and pretty soon you have a really lovely rackmounted paperweight.

        And that's what happens now if you do any amount of use of classes. Unless you buy the Zend Optimizer, anything that uses classes requires tons of recompilation of the PHP code for each page. We found that we were spending 20% of real response time just recompiling the class files for each page.

        This performance tweak is just a drop in the bucket compared to that.

        • Re:So misguided (Score:3, Informative)

          by cymen ( 8178 )
          Have you tried the open source PHP optimizer APC:

          http://apc.communityconnect.com/ [communityconnect.com]

        • Re:So misguided (Score:2, Informative)

          by BusDriver ( 34906 )
          Try using this fantastic PHP tool.
          Just as fast as Zend Accelerator, costs exactly nothing.

          The PHP Accelerator [php-accelerator.co.uk].

        • The ZO is actually free, ZA costs money. But, and as others have said, if you use PHPA then you'll get your performance back + a little more because I put an optimiser into PHPA as well. It's also free. Concerning the 20% cost, you were lucky, that's not too bad. Sites can experience even bigger overheads, and is why using an accelerator can make a huge difference. Some folks using Smarty reported nearly a 10 times speed improvement, so there are definitely things you can do to get back precious CPU cycles whilst enjoying the benefits of PHP.
    • How is it ignoring the encapsulation? The value of the private variable is not returned. All this affects is ease of debugging.
      • All this affects is ease of debugging.

        That's pretty huge in my book. PHP already doesn't support any sort of accessing of the callback stack (although I see it's in the new one), much less interactive debugging.

        The lack of debugging facilities is the #1 reason why I and my department are getting away from PHP.

        • PHP does support interactive debugging - zend has their IDE and there are several free ones as well - you just need to install a small component to the server and you can do remote step-by-step debugging or you can run the thing locally or however you want to.
        • There are plenty of ways to debug PHP. I have never had a problem finding out where the problem is happening.

          Out of all the languages I have used for web based developement (PHP, PERL, VB *shudder* and JSP) PHP has been the quickest to develop and easiest to maintain. Also, given proper coding techniques and server configuration, the fastest performer of the group.

          These were not just small projects either, my current job has huge projects we are doing in PHP.

          So just curious, what language are you doing to?
    • Folks if you want a good, FREE replacement for Zend's Accelerator, go check out PHP-Accelerator [php-accelerator.co.uk]

      Nick has written a brilliant piece of work, and its in use on a number of fairly high traffic PHP-enabled sites, including DealHunting.com [dealhunting.com] and GamingForce.com [gamingforce.com]. Anyway check it out.
    • I'm so frustrated by the culture of performance

      I agree completely. The PHP developers seem very misguided. They refuse to fix many bugs in the name of "performance". Things like infinite recursion crashing the interpreter. At the very least, they could include a debug version, which would run slower, but help developers find errors. Things like the new private member variables silently erroring is NOT acceptable behavior for a scripting language, especially one that claims to be easy to use.

      PHP already has enough bugs that make it hard to use, especially for those not experienced with it. It's really fun when a syntax error causes the parser to indicate that the error is hundreds of lines away from where it really is, or even in a separate file. Adding MORE bugs of this kind in the name of "performance" does not help to make PHP more professional. I really like PHP, and have been using in commercial environments for more than two and a half years, but these types of things are making me seriously consider switching to Python.

  • by Anonymous Coward
    It was often said that the developers could have addon products to GPL software and that's how you could make money. With PHP+ZEND, and other GPL software that has proprietary offshoots, it's really proven to me that this is no good thing. The GPL software is pigeonholed in its current role, and more often than not it will never go on to fill the role of the addon software.

    It's not out of dislike for commercial software - it's because PHP is a scripting engine, and their addon Zend optimiser isn't. It's not that there aren't open source replacements [php-accelerator.co.uk] but they'll never become part of the base PHP.net distro. This affects the quality of the software.

    Is there anything that can be done about this? Especially for other new projects that don't want to let social issues affect the quality of their software.

  • What a coincidence, I was just looking over this stuff this morning. Does anyone know how close we are to being able to run PHP with Apache2.0, preferably (but not necessarily) on Solaris? Looking over PHP4.2.1 notes this morning, it looked like Apache2 support still wasn't there yet, and some people seemed to be having problems building the language on Solaris. Does PHP4.3.0 address those problems? Should I take "Alpha" to be the warning that it sounds like it is, or would it be safe to try it out now? Would it make more sense to stick with PHP4.3.1 and Apache 1.3.x for now? I'm sure those should build okay....
    • Should I take "Alpha" to be the warning that it sounds like it is, or would it be safe to try it out now?

      To quote from www.php.net [php.net]:

      This is an alpha version. It should not be used in production or even semi-production web sites.

      I would take their word for it :)

    • The Zend Engine 2.0 will not be part of PHP 4.3.0. The mentioned Alpha Release of the Zend Engine 2.0 ships with the current development version of PHP, which is what PHP 4.3.0 will released from.
    • I compiled Apache 2.0 and then PHP 4.2.1 as a DSO on Solaris 8 (latest patch cluster) without a single issue. It was as simple as ./configure; make; make install. I was expecting big headaches but it went smooth! I haven't tried anything beyond simple web pages, but it seems to work.
  • Alpha version (Score:3, Informative)

    by Wonko42 ( 29194 ) <(ryan+slashdot) (at) (wonko.com)> on Monday June 10, 2002 @04:40PM (#3675407) Homepage
    It should have been pointed out in the article that this is an ALPHA version based on the 4.3.0 tree. This is not 4.3.0.

If you didn't have to work so hard, you'd have more time to be depressed.

Working...