Which one is better to learn?I think is time to learn php but not sure which version is should pick for learn

    There is absolutely no case for using PHP4 for anything new. It should be totally considered legacy, and given up as soon as possible.

    Use PHP5.

    Mark

      Are you sure?I mean take a look at web hosting servers-most of them use php4 only.So if i will make php5 script maybe then all people will not able to use them.

        Most hosting servers are LATE ! Soon PHP6 will arise, and PHP4 will disappear ! PHP5 is closer from PHP6 than PHP4 is !

          Though I still use PHP4, I agree that it's on its way out. PHP5 has already been released for quite some time now and as such as been improved through bug/security fixes. If you are looking for a webhost and find that some of your candidates don't support PHP5... don't even consider them as possible candidates.

          My (shared) webhost uses server clusters - all are mixed PHP4/PHP5 (AFAIK). The cluster they assigned me when I initially signed up had PHP4 as the primary parser - .php files were handled by a PHP4 DLL, .php5 extension was parsed by a PHP5 CGI binary. After simple help ticket request I was immediately moved to a cluster where PHP5 handled .php requests.

            Btw,does anyone knows where i can found tutorial for make mixing php4/php4?I ask that beacuse i want install on my server that feature.I have php4 installed.

              You mean mixing PHP4 and PHP5? It would depend on what webserver you're using, but basically you just follow the instructions in the manual for installing PHP5 using CGI binary or the DLL module, whichever one you did not do when installing PHP4. Then when doing the extension associating, instead of '.php' you'd use '.php5' for example.

                Well that is not so good beacuse then all extension need to be renamed for use.I think it will be better solution to make switch as some WAMP programs have.

                  Very most PHP4 scripts will run without any problems in PHP5... but if only MySQLi is active, then all PHP4 scripts with mysql (notice the absence of the "i") won't run !

                    Learn PHP5. Don't bother learning PHP4. Move forward, not backward.

                    Yes, most shared hosting companies are reluctant to make the move to PHP5. But that just means you need to look for those shared hosting companies that do support PHP5. Did you bother to Google on "php 5 shared hosting"? There's plenty of companies out there.

                      Just thought I'd reference a quote from this thread in regards to PHP4:

                      NogDog wrote:

                      It's pointless unless you're writing an application which (a) is targeted for a client who is on a host running PHP4, (b) targeted for general distribution (open source or for purchase) and you don't want to exclude potential users/buyers who happen to be on the significant percentage of servers which are still running PHP4, or (c) any of the other reasons you can think of that it might be desirable for your application to run under PHP4.

                      Just like a good web designer who wants to reach the widest market for a site will not assume that all users are running IE7 on WinXP-SP2 over a Cable or DSL modem, a PHP developer may not always want to assume that everyone who will want to use his/her program will be able to install it on the latest/greatest versions of PHP, MySQL, and Apache. How backwards-compatible it should be will need to be a case-by-case decision based on an analysis of your expected user base, the current distribution of PHP versions amongst that user base, and the benefits/trade-offs of using functionalities only available in the latest versions versus settling for the use of older functionalities.

                        Write a Reply...