Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Learning PHP

Learning PHP

Scheduled Pinned Locked Moved The Lounge
learningcsharpjavascriptphp
31 Posts 21 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L l a u r e n

    funny... i feel the exact same way about .NET

    "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

    B Offline
    B Offline
    Brady Kelly
    wrote on last edited by
    #10

    I love .NET, but recent PHP work is leaving me feeling quite dirty.

    L 1 Reply Last reply
    0
    • A AspDotNetDev

      Now that I have a NOOK, I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind. I downloaded an ebook, "I Hate PHP: A Beginner's Guide to PHP and MySQL", which is the most terrible book I've ever spent money on. Makes sense, since it was like $4. I still haven't installed an IDE (though I downloaded NetBeans), but from what I've read I'd say PHP is like a server side version of JavaScript and whatever "language" you use with the command prompt. It appears that variables are not strongly typed and the use of strings in variables is weird (if the crappy ebook I bought is to be trusted):

      $str1 = "hello";
      $str2 = "world";
      echo "$str1 $str2";
      // This is a comment.

      And this is a comment too? WTF.

      Feels dirty to use variables in a string like that and have them be not be treated as literals. Kinda nifty though. In any event, I'm happy I'm learning PHP. It will give me something to hate much more than VB.NET. :rolleyes:

      [WikiLeaks Cablegate Cables]

      W Offline
      W Offline
      wout de zeeuw
      wrote on last edited by
      #11

      I kinda liked the Zend IDE a couple of years back. Never head big problems with php, it's not really fit to build huge abstraction layers and such, but in a web browser you are already very limited in what you can do, and php nicely reflects that.

      Wout

      1 Reply Last reply
      0
      • B Brady Kelly

        I love .NET, but recent PHP work is leaving me feeling quite dirty.

        L Offline
        L Offline
        l a u r e n
        wrote on last edited by
        #12

        shame

        "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

        1 Reply Last reply
        0
        • L l a u r e n

          ultraedit or ultrastudio will do you well as an IDE for PHP PHP is a loosely typed language ... the strings in variables thing is because PHP has a greedy tokenizer that will see anything after a $ sign as a variable name ... if you put your strings in single quotes you get strings as you know them instead PHP is a far superior web scripting language, in my experience, to c# *depending* on what you are trying to achieve if you go into it with an open mind you might find it quite nice oh yeah.. since you are learning from scratch do yourself a favor and go get TinyButStrong (*very* odd name) ... a wicked good template engine that lets you have code behind files just like .NET and keeps things *much* tidier when you get larger projects hth :)

          "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

          A Offline
          A Offline
          Andy Brummer
          wrote on last edited by
          #13

          l a u r e n wrote:

          code behind files just like .NET

          I hope it's not actually code behind files like .net, because those are pretty awful. Have you looked at MVC and Razor? I've only played around with it a little bit, but it seems nice. I think someone finally realized that java wasn't the target anymore, and needed something easy to use and learn to counter things like PHP and Ruby.

          Curvature of the Mind now with 3D

          L 1 Reply Last reply
          0
          • A Andy Brummer

            l a u r e n wrote:

            code behind files just like .NET

            I hope it's not actually code behind files like .net, because those are pretty awful. Have you looked at MVC and Razor? I've only played around with it a little bit, but it seems nice. I think someone finally realized that java wasn't the target anymore, and needed something easy to use and learn to counter things like PHP and Ruby.

            Curvature of the Mind now with 3D

            L Offline
            L Offline
            l a u r e n
            wrote on last edited by
            #14

            not it isn't code behind in the same sense as .NET but it gives a seperation of presentation and code in the same way ... i used code behind as a familiar term for a .NET dev to get the basic idea :)

            "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

            1 Reply Last reply
            0
            • A AspDotNetDev

              Now that I have a NOOK, I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind. I downloaded an ebook, "I Hate PHP: A Beginner's Guide to PHP and MySQL", which is the most terrible book I've ever spent money on. Makes sense, since it was like $4. I still haven't installed an IDE (though I downloaded NetBeans), but from what I've read I'd say PHP is like a server side version of JavaScript and whatever "language" you use with the command prompt. It appears that variables are not strongly typed and the use of strings in variables is weird (if the crappy ebook I bought is to be trusted):

              $str1 = "hello";
              $str2 = "world";
              echo "$str1 $str2";
              // This is a comment.

              And this is a comment too? WTF.

              Feels dirty to use variables in a string like that and have them be not be treated as literals. Kinda nifty though. In any event, I'm happy I'm learning PHP. It will give me something to hate much more than VB.NET. :rolleyes:

              [WikiLeaks Cablegate Cables]

              N Offline
              N Offline
              Nemanja Trifunovic
              wrote on last edited by
              #15

              AspDotNetDev wrote:

              I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind.

              Seriously, why? It won't improve your career - PHP jobs are less paid and more outsourced than .NET ones. It will not expand your horizons and make you a better programmer either. If you are into new "web languages", better look at Ruby.

              utf8-cpp

              A F 2 Replies Last reply
              0
              • A AspDotNetDev

                Now that I have a NOOK, I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind. I downloaded an ebook, "I Hate PHP: A Beginner's Guide to PHP and MySQL", which is the most terrible book I've ever spent money on. Makes sense, since it was like $4. I still haven't installed an IDE (though I downloaded NetBeans), but from what I've read I'd say PHP is like a server side version of JavaScript and whatever "language" you use with the command prompt. It appears that variables are not strongly typed and the use of strings in variables is weird (if the crappy ebook I bought is to be trusted):

                $str1 = "hello";
                $str2 = "world";
                echo "$str1 $str2";
                // This is a comment.

                And this is a comment too? WTF.

                Feels dirty to use variables in a string like that and have them be not be treated as literals. Kinda nifty though. In any event, I'm happy I'm learning PHP. It will give me something to hate much more than VB.NET. :rolleyes:

                [WikiLeaks Cablegate Cables]

                M Offline
                M Offline
                M dHatter
                wrote on last edited by
                #16

                It is good to broaden your scope into other languages and scripting. The more you know the better work you will get. Also some people may say php is not in use or payed very well, it is completely a lie, hell look at facebook uses it, then compiles it down to c. With your strings above just remember to always use them the following way. $str1 = 'hello'; $str2 = 'world'; echo "$str1 $str2"; Single quotes do not invoke variable replacing and are a lot faster. Also something kool is when you get into replacing ids in arrays.

                "I do not know with what weapons World War 3 will be fought, but World War 4 will be fought with sticks and stones." Einstein "Few things are harder to put up with than the annoyance of a good example." Mark Twain

                1 Reply Last reply
                0
                • N Nemanja Trifunovic

                  AspDotNetDev wrote:

                  I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind.

                  Seriously, why? It won't improve your career - PHP jobs are less paid and more outsourced than .NET ones. It will not expand your horizons and make you a better programmer either. If you are into new "web languages", better look at Ruby.

                  utf8-cpp

                  A Offline
                  A Offline
                  AspDotNetDev
                  wrote on last edited by
                  #17

                  Nemanja Trifunovic wrote:

                  why? It won't improve your career

                  It's a new skill (and I love learning), and it may help me do things that I couldn't do before. For example, MediaWiki plugins are written in PHP, so I can now create plugins for the most popular wiki software in the world. That would have been useful at my last company, as we had an installation of MediaWiki we all used.

                  [WikiLeaks Cablegate Cables]

                  1 Reply Last reply
                  0
                  • OriginalGriffO OriginalGriff

                    I've never really wanted to learn PHP: every time I look at a "code" sample, I am reminded of GWBasic, shudder, and look away again, quickly...

                    Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

                    A Offline
                    A Offline
                    AspDotNetDev
                    wrote on last edited by
                    #18

                    I learned programming with QuickBasic, so any reminder of that time would be both nostalgic and horrific. :)

                    [WikiLeaks Cablegate Cables]

                    1 Reply Last reply
                    0
                    • L l a u r e n

                      ultraedit or ultrastudio will do you well as an IDE for PHP PHP is a loosely typed language ... the strings in variables thing is because PHP has a greedy tokenizer that will see anything after a $ sign as a variable name ... if you put your strings in single quotes you get strings as you know them instead PHP is a far superior web scripting language, in my experience, to c# *depending* on what you are trying to achieve if you go into it with an open mind you might find it quite nice oh yeah.. since you are learning from scratch do yourself a favor and go get TinyButStrong (*very* odd name) ... a wicked good template engine that lets you have code behind files just like .NET and keeps things *much* tidier when you get larger projects hth :)

                      "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

                      G Offline
                      G Offline
                      GStrad
                      wrote on last edited by
                      #19

                      +1 For UE as an editor...

                      1 Reply Last reply
                      0
                      • J Joan M

                        Wait until you discover global variables! :sigh:

                        [www.tamelectromecanica.com] Robots, CNC and PLC machines for grinding and polishing.

                        M Offline
                        M Offline
                        MacRaider4
                        wrote on last edited by
                        #20

                        I just used my first reference variable in a calendar I was working on, and it works... I'm not sure why it works because from everything I learned in C that variable shouldn't exist when I'm using it but for some reason it's still there. It's a bit messed up, but once you get the hang of it, it's not too bad. On a side note, IE seems to hate PHP as I can have a form looking great in Chrome, FireFox and Safari, look at it in IE 6 or 8 and the formatting is all over the place so good luck there as well... Did I mention I hate web programming (but it pays the bills) :laugh:

                        L 1 Reply Last reply
                        0
                        • N Nemanja Trifunovic

                          AspDotNetDev wrote:

                          I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind.

                          Seriously, why? It won't improve your career - PHP jobs are less paid and more outsourced than .NET ones. It will not expand your horizons and make you a better programmer either. If you are into new "web languages", better look at Ruby.

                          utf8-cpp

                          F Offline
                          F Offline
                          Fatih P
                          wrote on last edited by
                          #21

                          I agree, php jobs are less paid!

                          1 Reply Last reply
                          0
                          • M MacRaider4

                            I just used my first reference variable in a calendar I was working on, and it works... I'm not sure why it works because from everything I learned in C that variable shouldn't exist when I'm using it but for some reason it's still there. It's a bit messed up, but once you get the hang of it, it's not too bad. On a side note, IE seems to hate PHP as I can have a form looking great in Chrome, FireFox and Safari, look at it in IE 6 or 8 and the formatting is all over the place so good luck there as well... Did I mention I hate web programming (but it pays the bills) :laugh:

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #22

                            MacRaider4 wrote:

                            Did I mention I hate web programming (but it pays the bills)

                            Heh ... funny, seems like no one will admit how bad web programming is. Fortunately I don't have to pay the bills doing that! I've worked with it only enough to realize that, ugh ... I don't wanna do that! -Max :D

                            A 1 Reply Last reply
                            0
                            • L l a u r e n

                              ultraedit or ultrastudio will do you well as an IDE for PHP PHP is a loosely typed language ... the strings in variables thing is because PHP has a greedy tokenizer that will see anything after a $ sign as a variable name ... if you put your strings in single quotes you get strings as you know them instead PHP is a far superior web scripting language, in my experience, to c# *depending* on what you are trying to achieve if you go into it with an open mind you might find it quite nice oh yeah.. since you are learning from scratch do yourself a favor and go get TinyButStrong (*very* odd name) ... a wicked good template engine that lets you have code behind files just like .NET and keeps things *much* tidier when you get larger projects hth :)

                              "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

                              L Offline
                              L Offline
                              LimeyRedneck
                              wrote on last edited by
                              #23

                              For PHP and Web I like Aptana - its eclipse based, and has a very nice little JS server for testing (Jaxer).

                              l a u r e n wrote:

                              PHP is a far superior web scripting language, in my experience, to c# *depending* on what you are trying to achieve

                              "One lets you create defects real fast and the other lets you execute defects real fast" :laugh: All risible commentary aside, Use PHP for rapid feature development, then use C# to provide the bones the PHP meat sits on. Now go wash your hands and don't talk about it :omg:

                              Nothing is impossible, we just don't know the way of it yet.

                              L 1 Reply Last reply
                              0
                              • L LimeyRedneck

                                For PHP and Web I like Aptana - its eclipse based, and has a very nice little JS server for testing (Jaxer).

                                l a u r e n wrote:

                                PHP is a far superior web scripting language, in my experience, to c# *depending* on what you are trying to achieve

                                "One lets you create defects real fast and the other lets you execute defects real fast" :laugh: All risible commentary aside, Use PHP for rapid feature development, then use C# to provide the bones the PHP meat sits on. Now go wash your hands and don't talk about it :omg:

                                Nothing is impossible, we just don't know the way of it yet.

                                L Offline
                                L Offline
                                l a u r e n
                                wrote on last edited by
                                #24

                                LimeyRedneck wrote:

                                All risible commentary aside, Use PHP for rapid feature development, then use C# to provide the bones the PHP meat sits on.

                                :laugh: :laugh: :laugh: you *are* joking right?

                                "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

                                1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  I've never really wanted to learn PHP: every time I look at a "code" sample, I am reminded of GWBasic, shudder, and look away again, quickly...

                                  Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

                                  T Offline
                                  T Offline
                                  tchris
                                  wrote on last edited by
                                  #25

                                  Funny. Zuckerberg has built a multi-billion dollar business using PHP (Facebook). Just sayin... :laugh:

                                  OriginalGriffO 1 Reply Last reply
                                  0
                                  • T tchris

                                    Funny. Zuckerberg has built a multi-billion dollar business using PHP (Facebook). Just sayin... :laugh:

                                    OriginalGriffO Offline
                                    OriginalGriffO Offline
                                    OriginalGriff
                                    wrote on last edited by
                                    #26

                                    Funny indeed: Bill Gates started Microsoft by writing a BASIC interpreter for the Altair. I think he has made a few bucks on that, as well...still doesn't mean I want to code in it! (Or go anywhere near ArseBook) :laugh:

                                    Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

                                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                    1 Reply Last reply
                                    0
                                    • A AspDotNetDev

                                      Now that I have a NOOK, I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind. I downloaded an ebook, "I Hate PHP: A Beginner's Guide to PHP and MySQL", which is the most terrible book I've ever spent money on. Makes sense, since it was like $4. I still haven't installed an IDE (though I downloaded NetBeans), but from what I've read I'd say PHP is like a server side version of JavaScript and whatever "language" you use with the command prompt. It appears that variables are not strongly typed and the use of strings in variables is weird (if the crappy ebook I bought is to be trusted):

                                      $str1 = "hello";
                                      $str2 = "world";
                                      echo "$str1 $str2";
                                      // This is a comment.

                                      And this is a comment too? WTF.

                                      Feels dirty to use variables in a string like that and have them be not be treated as literals. Kinda nifty though. In any event, I'm happy I'm learning PHP. It will give me something to hate much more than VB.NET. :rolleyes:

                                      [WikiLeaks Cablegate Cables]

                                      S Offline
                                      S Offline
                                      Sterling Camden independent consultant
                                      wrote on last edited by
                                      #27

                                      PHP has all sorts of inconsistent messiness, like how zero is sometimes false: http://www.chipstips.com/?p=168

                                      Contains coding, but not narcotic.

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        MacRaider4 wrote:

                                        Did I mention I hate web programming (but it pays the bills)

                                        Heh ... funny, seems like no one will admit how bad web programming is. Fortunately I don't have to pay the bills doing that! I've worked with it only enough to realize that, ugh ... I don't wanna do that! -Max :D

                                        A Offline
                                        A Offline
                                        Alexander DiMauro
                                        wrote on last edited by
                                        #28

                                        Hey, as a web programmer...I...I...I...ok, I don't protest. It does suck. But mostly on the front-end with all the lack of standards everywhere. On the server side, I'm quite happy... :-D

                                        When writing code, don't forget to account for Ewoks!

                                        L 1 Reply Last reply
                                        0
                                        • A AspDotNetDev

                                          Now that I have a NOOK, I decided to learn a new programming language on a whim. For some reason, PHP was the first thing that came to mind. I downloaded an ebook, "I Hate PHP: A Beginner's Guide to PHP and MySQL", which is the most terrible book I've ever spent money on. Makes sense, since it was like $4. I still haven't installed an IDE (though I downloaded NetBeans), but from what I've read I'd say PHP is like a server side version of JavaScript and whatever "language" you use with the command prompt. It appears that variables are not strongly typed and the use of strings in variables is weird (if the crappy ebook I bought is to be trusted):

                                          $str1 = "hello";
                                          $str2 = "world";
                                          echo "$str1 $str2";
                                          // This is a comment.

                                          And this is a comment too? WTF.

                                          Feels dirty to use variables in a string like that and have them be not be treated as literals. Kinda nifty though. In any event, I'm happy I'm learning PHP. It will give me something to hate much more than VB.NET. :rolleyes:

                                          [WikiLeaks Cablegate Cables]

                                          F Offline
                                          F Offline
                                          fuximus
                                          wrote on last edited by
                                          #29

                                          People saying bad things about PHP, there are numerous weird things in PHP, but you don't have to use them, choose your own style and go with it. I've been around PHP for 6 years now, made my mistakes, it's all about having your own standards that you follow. For example, i'd never echo "$str $str2"; i'd always echo $str." ".$str; and for some reason I never $some_str = 'this is some string'; i'd always $some_str = "this is some string"; it's kinda weird but it works for me, and always take care of all notices. PHP is actually a very strong and a very capable language, it's just that developers don't pay attention to the details of what they're writing, and tend to botch things up ending up with a big pile of mess.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups