ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    PHP Best Practices Guide

    Developer Discussion
    phpstorm
    6
    17
    2.9k
    Loading More Posts
    • 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.
    • scottalanmillerS
      scottalanmiller
      last edited by scottalanmiller

      PHP Best Practices

      1 Reply Last reply Reply Quote 9
      • DustinB3403D
        DustinB3403
        last edited by

        Made me laugh very hard.

        Was not expecting such a good laugh first thing this morning.

        1 Reply Last reply Reply Quote 3
        • A
          Alex Sage
          last edited by

          I am sorry, I don't follow... What's wrong with PHP?

          DustinB3403D scottalanmillerS 2 Replies Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403 @Alex Sage
            last edited by

            @aaronstuder PHP can do it all, but the code will be horrendous and a complete cluster compared to any other programming language.

            travisdh1T dafyreD 2 Replies Last reply Reply Quote 1
            • travisdh1T
              travisdh1 @DustinB3403
              last edited by

              @DustinB3403 said in PHP Best Practices Guide:

              @aaronstuder PHP can do it all, but the code will be horrendous and a complete cluster compared to any other programming language.

              Creating HTML tables in PHP? Shoot me now.

              dafyreD 1 Reply Last reply Reply Quote 0
              • dafyreD
                dafyre @DustinB3403
                last edited by

                @DustinB3403 said in PHP Best Practices Guide:

                @aaronstuder PHP can do it all, but the code will be horrendous and a complete cluster compared to any other programming language.

                Not when done correctly, lol.

                DustinB3403D 1 Reply Last reply Reply Quote 0
                • DustinB3403D
                  DustinB3403 @dafyre
                  last edited by

                  @dafyre said in PHP Best Practices Guide:

                  @DustinB3403 said in PHP Best Practices Guide:

                  @aaronstuder PHP can do it all, but the code will be horrendous and a complete cluster compared to any other programming language.

                  Not when done correctly, lol.

                  Correctly = PHP!

                  1 Reply Last reply Reply Quote 0
                  • dafyreD
                    dafyre @travisdh1
                    last edited by

                    @travisdh1 said in PHP Best Practices Guide:

                    @DustinB3403 said in PHP Best Practices Guide:

                    @aaronstuder PHP can do it all, but the code will be horrendous and a complete cluster compared to any other programming language.

                    Creating HTML tables in PHP? Shoot me now.

                    You should be formatting any HTML output from PHP with CSS.... Or better yet, writing the front end purely in HTML, Javascript, and CSS... and let the Javascript deal with the PHP output.

                    travisdh1T 1 Reply Last reply Reply Quote 1
                    • travisdh1T
                      travisdh1 @dafyre
                      last edited by

                      @dafyre said in PHP Best Practices Guide:

                      @travisdh1 said in PHP Best Practices Guide:

                      @DustinB3403 said in PHP Best Practices Guide:

                      @aaronstuder PHP can do it all, but the code will be horrendous and a complete cluster compared to any other programming language.

                      Creating HTML tables in PHP? Shoot me now.

                      You should be formatting any HTML output from PHP with CSS.... Or better yet, writing the front end purely in HTML, Javascript, and CSS... and let the Javascript deal with the PHP output.

                      I wish I could ignore PHP entirely.

                      If going the Javascript route, I'd wonder why you still need PHP at all!

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @Alex Sage
                        last edited by

                        @aaronstuder said in PHP Best Practices Guide:

                        I am sorry, I don't follow... What's wrong with PHP?

                        Mostly the "problems" are that it is old and written for a different world. It lacks many of the advances of more modern languages. It feels stuck in the late 1980s. They've done some great things with PHP 7 to play catch up, but it is still a very old language.

                        JaredBuschJ 1 Reply Last reply Reply Quote 1
                        • scottalanmillerS
                          scottalanmiller @travisdh1
                          last edited by

                          @travisdh1 said in PHP Best Practices Guide:

                          If going the Javascript route, I'd wonder why you still need PHP at all!

                          You don't need it at all. Not really any language that you need.

                          1 Reply Last reply Reply Quote 2
                          • JaredBuschJ
                            JaredBusch @scottalanmiller
                            last edited by

                            @scottalanmiller said in PHP Best Practices Guide:

                            It feels stuck in the late 1980s.

                            Really? The 1980's? Get a grip on reality.

                            scottalanmillerS dafyreD 2 Replies Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @JaredBusch
                              last edited by

                              @JaredBusch said in PHP Best Practices Guide:

                              @scottalanmiller said in PHP Best Practices Guide:

                              It feels stuck in the late 1980s.

                              Really? The 1980's? Get a grip on reality.

                              What syntactic era do you feel it is from? It feels older than languages we were getting around 1991.

                              1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller
                                last edited by

                                Are you saying it feels like the 1970s? That feels a bit much. Fortran 77 was.... 1977 and feels much older. But Perl and Tcl were the late 80s and that's what PHP reminds me of. Even though PHP itself came later it was never designed to be a modern language and feels like an 80s design.

                                1 Reply Last reply Reply Quote 1
                                • dafyreD
                                  dafyre @JaredBusch
                                  last edited by

                                  @JaredBusch said in PHP Best Practices Guide:

                                  @scottalanmiller said in PHP Best Practices Guide:

                                  It feels stuck in the late 1980s.

                                  Really? The 1980's? Get a grip on reality.

                                  C, C++, Java, and PHP all syntactically feel similar to me... So he may not be far off base, but I don't know when C and C++ were originally made available to the masses.

                                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                                  • scottalanmillerS
                                    scottalanmiller @dafyre
                                    last edited by

                                    @dafyre said in PHP Best Practices Guide:

                                    @JaredBusch said in PHP Best Practices Guide:

                                    @scottalanmiller said in PHP Best Practices Guide:

                                    It feels stuck in the late 1980s.

                                    Really? The 1980's? Get a grip on reality.

                                    C, C++, Java, and PHP all syntactically feel similar to me... So he may not be far off base, but I don't know when C and C++ were originally made available to the masses.

                                    C around 1970, C++ around 1981. Java was 1995, but is much more advanced than PHP. PHP was also 1995, but it wasn't made by advanced researchers and such, it was a guy looking for a super simple way to make home pages. So that it was a throwback to older language styles from 5 - 10 years earlier is exactly what we would expect. He wasn't trying to reinvent language structure or push elegance or expression, it was a task based simple language. So that it feel like a mix of things like Perl, Tcl and such which were its key inspiration should not be even slightly surprising.

                                    1 Reply Last reply Reply Quote 1
                                    • scottalanmillerS
                                      scottalanmiller
                                      last edited by

                                      I just looked at Wikipedia and Perl and Tcl are specifically listed as two of the main influences of PHP! Nailed it.

                                      1 Reply Last reply Reply Quote 1
                                      • 1 / 1
                                      • First post
                                        Last post