Announcement

Collapse
No announcement yet.

Why so many built-in functions for PHP?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    gregc, I am C++ programmer too, there are lots of similiars in C/C++ and PHP. It is good and nice language for everyone who wants to learn C or C++ but have hard time to learn usually will learn better if they try PHP before C or C++. That is a major positive in that.

    As for Perl, it is ..decent language but I found it odd compare to C or PHP. IMHO anyway. http://www.bbspot.com/News/2001/03/perl_test.html .. I wonder about Perl itself sometimes.

    Comment


    • #17
      I think one reason for a lot of the built-in functions is to keep the speed up, because it is faster for PHP to run the function in C than it is to interpret all of your code to run the function for you.

      Comment


      • #18
        You have quite a goal, i suggest learning a little of everything at first. then broaden your horizen to more advanced aspects of each programing language.

        Comment


        • #19
          Having all of the functions built in generally allows you to "code for PHP" and you're basically guaranteed everything will work on almost all installations of PHP.

          As opposed to something like perl where there's countless modlues, you actually "code for Perl with modlues a, b, c, d, e, f, g, h, i, and j installed" where your end users may have to download and install extra modules for it to function properly.
          Last edited by CeleronXT; Fri 23rd May '03, 2:48pm.
          "63,000 bugs in the code, 63,000 bugs, you get 1 whacked with a service pack, now there's 63,005 bugs in the code."
          "Before you critisize someone, walk a mile in their shoes. That way, when you critisize them, you're a mile away and you have their shoes."
          Utopia Software - Current Software: Utopia News Pro (news management system)

          Comment


          • #20
            Its the perl/php wars! w00t!
            version2 aka mol

            Mystic Wicks Online Pagan Community Forums
            Mystic Wicks After Dark

            Comment


            • #21
              Originally posted by Cyborg from DH
              I think one reason for a lot of the built-in functions is to keep the speed up, because it is faster for PHP to run the function in C than it is to interpret all of your code to run the function for you.
              You are actually spot on here. C++ allows you to use pointers etc which allow you to design abstract data types such as trees. For things such as searching in C++ you can setup a binary search tree and search using logarithmic efficiency.

              I haven't used PHP for a while, but from memory you can't use pointers which are needed to do things such as linked-lists, binary trees, graphs etc. You are much better off using the built in functions then your own ones.
              Michael Bray

              Comment


              • #22
                Originally posted by Michael
                I haven't used PHP for a while, but from memory you can't use pointers which are needed to do things such as linked-lists, binary trees, graphs etc.
                PHP doesnt need this IMO. When you get into this arena then you have to start worrying about garbage collection, and protection of memory. PHP is pretty robust and can do what it is designed to do. And yes, I am a big C/C++ fan.
                version2 aka mol

                Mystic Wicks Online Pagan Community Forums
                Mystic Wicks After Dark

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X