SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 39
  1. #1
    SitePoint Enthusiast BDKR's Avatar
    Join Date
    Sep 2002
    Location
    Clearwater, Florida
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    More PHP5 info from Sterling Hughes

    Good stuff.

    http://ny1.php.net/talks/show.php/php5intro/

    Now after some of you have taken a closer look, would you mind telling me if I understood corretly that the SPL extension will provide engine level iterators? This line...

    PHP Code:
    <?php
    class dba_iter implements spl::iterator 
    ?>
    ... is leading me too that conclusion. It's on this page.

    http://ny1.php.net/talks/show.php/php5intro/32

    Well, I'll go check out the extension and get it overwith.

    Cheers,
    BDKR
    If you're not on the gas, you're off the gas!

  2. #2
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fascinating read.

    Think it said "register a set of engine level interfaces" rather than just iterators.

    This looks to me like a step in the Java direction. Whether that means they'll be creating the interfaces for us or whether we can create our own (in PHP as opposed to C) not quite sure. If PHP was distributed with a standard set of interfaces, that would be excellent - big step towards developing some overall standards in how PHP is coded.

    Don't know if you saw Sterling's abstract data types extension ( http://www.php.net/~sterling/adt/ ) he linked to right at the end - looks like another step in the right direction.

    Wonder what they'll be saying about PHP 5 when it hits the streets? "Java without the jar"?

  3. #3
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm still holding out for a true class library implementation of the existing functions. Some of the functions naming is pretty awful, and it would be great to see a truly unified library..... It would take some getting used to no doubt, but hey. Such is life.

  4. #4
    SitePoint Enthusiast BDKR's Avatar
    Join Date
    Sep 2002
    Location
    Clearwater, Florida
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by HarryF
    Fascinating read.

    Think it said "register a set of engine level interfaces" rather than just iterators.
    Yeah, I noted what it said. Mine was a more a question of "what could I infer from this?" It appears that engine level iterators via the spl extension will be supported. I like this idea a lot.

    FYI, the spl extension wouldn't compile without error on the version of PHP 5 that I have. I suspect I'll have to update tomorrow. I'm going home with my cutie in a moment! :-)

    Quote Originally Posted by HarryF
    Don't know if you saw Sterling's abstract data types extension ( http://www.php.net/~sterling/adt/ ) he linked to right at the end - looks like another step in the right direction.
    Yeah, i've toyed about with it on and off for a couple of months now. It really adds a lot more power to the language and extends it's reach as a general purpose language.

    Quote Originally Posted by HarryF
    Wonder what they'll be saying about PHP 5 when it hits the streets? "Java without the jar"?
    Whoever THEY are, I never listened to them anyways. PHP is the bomb!

    Cheers,
    Terrence
    If you're not on the gas, you're off the gas!

  5. #5
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems like this story has made it to the trollpit at Slashdot: http://slashdot.org/article.pl?sid=03/03/28/208225

  6. #6
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Phil.Roberts
    Seems like this story has made it to the trollpit at Slashdot: http://slashdot.org/article.pl?sid=03/03/28/208225
    The usual Perl vs. PHP war (sigh). There were a few remarks in the presentation which are bound to provoke .pl coders.

  7. #7
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I kind of hope PHP5 doesn't end up being a Java clone... I like what I have now, just add some more OO stuff, that's it.

  8. #8
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hartmann
    I kind of hope PHP5 doesn't end up being a Java clone... I like what I have now, just add some more OO stuff, that's it. [img]images/smilies/frown.gif[/img]
    lol I see where you are going there, as long as the new Object Model does not disrupt PHP's existing abilities then I think its for the better , the worry is that with all this functionality we are going to see JAVA like frameworks which by their very nature make for slow complex systems that require half a bucket of processing to create a 'hello world' application and end up as slow as the JAVA it imitates.

    Of course used properly , systems ,that whilst not impossible before in PHP4 ,were perhpas kind'a held together by luck, will be more realistic for some hardcore programming heads and as a PHP advocate that sounds like a good thing.

    I have enjoyed over the last 2 years saying to any that will listen .. 'yes it can' .. looks like I will be saying that at lot more

    Now if we can only we can entice/cajole/blackmail Andrei to get into GTK2 for PHP-GTK then world domination can commence as planned.... - anyone got any dirt?

  9. #9
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by firepages
    Now if we can only we can entice/cajole/blackmail Andrei to get into GTK2 for PHP-GTK then world domination can commence as planned.... - anyone got any dirt?
    Why need GTK when we may be able to eventually write executables in PHP without needing all the extensions and extra files included in the distro.

    http://blogs.phparch.com/index.php?m=200303#91

  10. #10
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP-GTK is for building graphical user interfaces it is not required for shelll scripting unless you want to give the user a button to push.

    + If you wanna do GUI stuff you need a toolkit (or the win32API , if you want it cross platform and free you want GTK+ (or similar)

    You can also use the GTK & other API's in C but I dont do C , I do PHP , and I am not alone

    Interesting that phparch is looking for an alternative to php-gtk .. would like to see thier reasoning behind that (apart form the slow development of php-gtk of course which is bound partially to waiting for PHP5 + mainstreaming of GTK2)

  11. #11
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Cool, I really had no idea and was just posting what I have heard. I was going to try having a play with PHP-GTK the other day but my understanding was that I needed to replace my php4ts.dll and I didn't want to because I'm running PHP 5.0.0-dev and I want to keep playing with the new object model.

    Anyone know how I can run multiple versions of PHP on the one disk drive? (with different versions of Apache)

  12. #12
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ideally you would share the php4ts.dll & libs but as this is not always possible (I have not successfully built php-gtk on php5 as of yet) then php-gtk can work happily away from its own folder.

    http://www.firepages.org/gtkdev.htm <== for adventure seekers - i.e. not entirely stable and NT onl.
    (PS how do you turn off this poxy editor ?? is stuffs up my urls ??)

    You can run multiple versions of Apache/php but they have to share the same php.ini which means that versioning issues will not always allow the extensions to be shared , but if you work with the basics (i.e. no extra modules) then you should be fine.
    Last edited by firepages; Mar 28, 2003 at 23:56.

  13. #13
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Thanks for that, I'll check out your link

  14. #14
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i didn't look at the link from the first post, but skimmed through the comments on Slashdot.

    i don't really care about this OO stuff coming in PHP (well, maybe that's a bit harsh). other than OO, it doesn't seem like much else will be different in PHP 5? is that right? i don't really have any need to use OO stuff in PHP so far. i don't want to make everything OO "just because."

    about the only time i think i'd need to use classes is if i needed multiple copies/objects/whatever of the same class at the same time in a script.

    what i really, really want in PHP 5 is more speed improvements (maybe Zend 2 will help some on its own):

    • first and foremost, built-in accelerator functionality to cache compiled versions of scripts. at least when installed as an Apache module if they'd have problems doing things with shared memory or whatever on other servers.

      probably won't happen though. DAMN you Zend for selling an Accelerator and having bad anti-competitive practices!
    • like someone in the Slashdot comments said PHP doesn't have: persistent data across requests so variables or any kind of data could be cached between requests and not have to be "rebuilt" each time. this would probably need a multi-threaded server like Apache 2 to work well.
    • database connection pooling. again, would really needed a threaded server.


    those 3 things would really make it great and faster and more efficient.

    oh and also, PHP 4 has pretty many bugs in it (with segfaults etc.) like another comment on /. said. they really need to work on improving the stability/reliability.
    Last edited by DR_LaRRY_PEpPeR; Mar 29, 2003 at 03:01.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  15. #15
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://ny1.php.net/talks/show.php/php5intro/

    Not bad, though maybe we need some more working scripts using PHP5 ? Text book examples are fine just now - for people who know what is being discussed - to help the rest of us ?

  16. #16
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    They are. I can't remember where I read it but I saw somewhere that PHP5 is around 40% faster than PHP4.

    Another big plus IMO is better socket abilities. There are a few new functions and some major overhauls to older functions relating to sockets which will be good.

    In regards to you saying that you don't use OO much and don't particularly want to, well that is your loss. The new object model in PHP5 is a major improvement to PHP as a language and will allow for it to be used in a wider scope. PHP-GTK started it off but with the release of GTK2 and the fact that people are already writing PHP-to-C compilers means that in the not to distant future, you will see desktop apps written in PHP.

  17. #17
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For me the big thing about PHP 5 is introducing enough standards for writing PHP OOP us coders can start writing code that's truly re-usable and will fit into any app. Don't think there's anything wrong with PHP absorbing Java's better ideas as long as it still allows for fast development and flexibility (read "hackability"). From the point of view of us getting full time jobs coding PHP, getting a nod from the Java community is important IMO. Interesting in that Slashdot discussion was that the JBoss crew are looking for a way to run PHP...

    first and foremost, built-in accelerator functionality to cache compiled versions of scripts. at least when installed as an Apache module if they'd have problems doing things with shared memory or whatever on other servers.
    Agreed. I think they should concentrate their efforts on solutions for high traffic sites where you have load balanced servers and so on. As to Zend Studio, the smart move would be selling it as an extension to Eclipse IMO.

    As to PHP-GTK, along the same lines I hope someone starts investigating Mozilla's XUL and XPCom. XPCom is the class library available from an XUL for calling with JavaScript. Right now you can extend the library with Python, Ruby and Perl (by extend we're talking "code behind" in MS speak) but not PHP. Whether you like Mozilla / Gecko, if you give XUL the time of day reckon you'll agree this is the way to go with GUI's in future. Check out http://www.xulplanet.com...

    Anyway - just random rants.

    PS:

    Anyone know how I can run multiple versions of PHP on the one disk drive? (with different versions of Apache)
    Should be possible if you run each server off a different port number ( httpd.conf ).
    Last edited by HarryF; Mar 29, 2003 at 05:37.

  18. #18
    SitePoint Enthusiast BDKR's Avatar
    Join Date
    Sep 2002
    Location
    Clearwater, Florida
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DJ P@CkMaN
    They are. I can't remember where I read it but I saw somewhere that PHP5 is around 40% faster than PHP4.
    Well, I've done some benching here and there and P5 was consistently slower than P4.3.1. And at this stage, it will likely stay that way until all new functionality is complete and the boatload of memory leaks are found and fixed. Check out Sterlings blog for 3/28/2003 on this.

    http://www.edwardbear.org/blog/

    But seriously, all I've ever heard that they were interested in with PHP5 was new functionality. If I missed something in the diatribe about speed, my apologies.

    Quote Originally Posted by DJ P@CkMaN
    In regards to you saying that you don't use OO much and don't particularly want to, well that is your loss. The new object model in PHP5 is a major improvement to PHP as a language and will allow for it to be used in a wider scope. PHP-GTK started it off but with the release of GTK2 and the fact that people are already writing PHP-to-C compilers means that in the not to distant future, you will see desktop apps written in PHP.
    I actually don't think it's really a loss for the individual. OO is something that should allways be considered as it's a good approach when trying to deal with programming related issues that have plauged large and/or new projects for eons. But the truth of the matter is that everything that can be done with an object can be done without one.

    Personally, I think OO is fascinating, but there are some areas or instances of usage that are just downright overkill! Only in the interest of "Paradigm Purity" should I use set and get type methods (or member functions if you like). Sure there is a reason for these things (as also private and protected vars and methods), but on one level, it's handholding. And that handholding comes at a price. I did some benching and noted that what Sterling referred to as 'type hinting' (as just one possible example) had a noticeable effect on the performance of the script. Perhaps this will lessen or go away when P5 is finished.

    If I'm going it alone or developing a class lib for my own use, I'm going to tweak to my hearts content regardless of the OO book. If I'm working with a small group of very good proggers, I will most likely suggest that in the interest of speed, we forgo certain things that won't be needed as we are on the same page.

    However, (and THIS is why the new functionality is good) if this is going to be one of those large projects with a multitude of Joes working on it, the handholding comes into it's own as it turns into hand slapping to those that choose to implement objects in a fashion other than designed.

    I don't agree with handholding (implemented either at the language or community level) to the point that I no longer have a choice. That said, as long as P5 still provides choice, it's all good.

    Cheers,
    BDKR
    If you're not on the gas, you're off the gas!

  19. #19
    SitePoint Enthusiast BDKR's Avatar
    Join Date
    Sep 2002
    Location
    Clearwater, Florida
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DR_LaRRY_PEpPeR
    i didn't look at the link from the first post, but skimmed through the comments on Slashdot.

    i don't really care about this OO stuff coming in PHP (well, maybe that's a bit harsh). other than OO, it doesn't seem like much else will be different in PHP 5? is that right? i don't really have any need to use OO stuff in PHP so far. i don't want to make everything OO "just because."

    about the only time i think i'd need to use classes is if i needed multiple copies/objects/whatever of the same class at the same time in a script.

    what i really, really want in PHP 5 is more speed improvements (maybe Zend 2 will help some on its own):

    • first and foremost, built-in accelerator functionality to cache compiled versions of scripts. at least when installed as an Apache module if they'd have problems doing things with shared memory or whatever on other servers.

      probably won't happen though. DAMN you Zend for selling an Accelerator and having bad anti-competitive practices!
    • like someone in the Slashdot comments said PHP doesn't have: persistent data across requests so variables or any kind of data could be cached between requests and not have to be "rebuilt" each time. this would probably need a multi-threaded server like Apache 2 to work well.
    • database connection pooling. again, would really needed a threaded server.


    those 3 things would really make it great and faster and more efficient.

    oh and also, PHP 4 has pretty many bugs in it (with segfaults etc.) like another comment on /. said. they really need to work on improving the stability/reliability.
    As for two and three on your list, I believe that SRM is working on this.

    http://www.vl-srm.net/index.php

    As for the reliability, I've not see any of these issues. Can you explain or point us to a link that talks about some of this?

    Cheers,
    BDKR
    If you're not on the gas, you're off the gas!

  20. #20
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I doubt you'll ever see caching built directly in to PHP, Zend make too much money from it, although phpA is an excellant choice, if you don't need to run the Zend Loader for anything (Talk about an MS type strategy with that).
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  21. #21
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i know Karl. do you use PHPA on your hosting?


    Quote Originally Posted by BDKR
    As for the reliability, I've not see any of these issues. Can you explain or point us to a link that talks about some of this?
    install PHP Accelerator and you'll probably definitely see it from what i've gathered at their forums. PHPA magnifies any memory problems PHP has (leaks, corruption, etc.). if you leave Apache and PHP run for long enough even without something like PHPA, you will eventually see problems too supposedly. i've seen someone say before that PHP was crashing like crazy (segfaults in the error log) without PHPA or anything. it probably does for a lot of other people too.

    so i guess they need to work on the memory management.

  22. #22
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I have Apache running as a service and while I'm not a host, it gets used often enough. I never see any problems with it running for more than 48 hours turned on. Now I know this is nothing compared to what a web hosting company would see but I'm just posting it anyway

  23. #23
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We don't see any particular problems with PHP and memory leaks, we go about 1-4 weeks without restarting Apache, and that's with a fair few domains using PHP extensively. A lot of the problems are when you've got modules that conflict with each other or don't work well with the version of the extension you have installed on your machine.

    Unfortunately we don't use phpA as we have one or two users on each server who need the loader aspect of it Although we have been talking with the developers of the scripts they use and trying to get them to produce IonCube encoded versions so we can run phpA.

    Thanks,
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  24. #24
    SitePoint Guru
    Join Date
    Oct 2001
    Posts
    656
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I read in that presentation that you could declare properties 'final', so they can not be changed or redeclared by subclasses. Now that I've been playing with PHP 5 a bit today, I've found out that you can also declare methods as 'final', so subclasses cannot override parent methods:

    PHP Code:
    class Foo
    {    
        final function 
    foo($bar)
        {
            echo 
    "Bar!";
        }
    }

    class 
    Bar extends Foo
    {
        function 
    foo($bar)
        {
            echo 
    'test';
        }

    will give this error
    Fatal error: Cannot override final method foobar::foo() in C:\Program Files\Apache Group\Apache2\htdocs\test2.php on line 12
    Another thing I found out is that it's possible to extend interfaces, like it's possible to extend classes:

    PHP Code:
    interface SimpleInterface
    {
        function 
    foo($bar);
    }

    interface 
    ExtendedInterface extends SimpleInterface
    {
        function 
    bar($foo);
    }

    class 
    ThisClassImplementsBothInterfaces extends ExtendedInterface
    {
        function 
    foo($bar)
        {
            ...
        }
        
        function 
    bar($foo)
        {
            ...
        }

    Man, who on earth would have expected a year ago that the PHP developers would give us all this candy?

  25. #25
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After reading the posts everyone seams to be happy for PHP5 ? Waiting on a stable release before I use it, I can't wait - ASP ? Whats that ?

    It's history. LoL.....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •