Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How did you learn PHP??

  • 06-02-2014 2:43pm
    #1
    Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭


    Hi there,

    I'm a little curious as how you began learning PHP.

    What worked for you and what didn't work for you?
    What tools did you use?
    What books did you read, if any?

    Now that you are reasonably knowledgeable of PHP and MySql, what would you recommend a learner to do and not to do?

    Thanks in advance.


Comments

  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    py2006 wrote: »

    Now that you are reasonably knowledgeable of PHP and MySql, what would you recommend a learner to do
    Thanks in advance.

    Honestly, not learn PHP


  • Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭py2006


    ChRoMe wrote: »
    Honestly, not learn PHP

    Why not?


  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    I learned it when I was 16 at home and it was the only decent language to get stuff done on the web.


  • Registered Users, Registered Users 2 Posts: 403 ✭✭counterpointaud


    Is there a particular reason you want to learn PHP?

    Is it your first server-side language?

    Maybe you need to learn it for college or work?

    Other languages enjoy much better design, and will be more transferable (i.e. moving from server-side Java to C# is not a big deal).

    I can't help you with any resources, as I have never done much work in PHP, but if you are just picking a language to learn first, it might be worth your while looking at other options first.


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    py2006 wrote: »
    Why not?

    Its been a while, so time for another repost ;)

    http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,040 ✭✭✭Colonel Panic


    Just need an XKCD link and someone recommending Vi and all those Boards Dev forum targets will be met.


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    Just need an XKCD link and someone recommending Vi and all those Boards Dev forum targets will be met.

    Nah I'm adding a new meme/addage.

    I predict that PHP will introduce a quadruple equals comparator in the next major release.

    (The terrifying thing about this prediction is that, those crazy bastards might actually do it).


  • Registered Users, Registered Users 2 Posts: 2,040 ✭✭✭Colonel Panic


    PHPRealEquals


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    PHPRealEquals

    LOL :D

    (I actually googled that to check if it was real or not, if that's not a sign of a broken language I dont know what is). However an actual consistent function naming scheme should have tipped me off that its not real ;)


  • Registered Users, Registered Users 2 Posts: 416 ✭✭gouche


    As an alternative to PHP what would one recommend as a capable server-side language to many of the tasks currently assigned to PHP?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    gouche wrote: »
    As an alternative to PHP what would one recommend as a capable server-side language to many of the tasks currently assigned to PHP?

    Ruby/Python if you want to go the interpreted dynamically typed route.

    Java/C# if not.


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭carlmango11


    This is the route I took:

    1. Set up WAMP
    2. Followed a really basic tutorial to get a basic idea of the syntax/how it actually works
    3. Made some basic sites with small dynamic elements
    4. Wrote a site with basic authentication, database operations, forms etc.
    5. Started using a PHP framework (CakePHP first, then Yii)

    But I agree with the above. PHP is a pretty crap language. It's just awkward and messy. Although Yii with the Boostrap plugin are handy for getting a decent site up quick.


  • Registered Users, Registered Users 2 Posts: 1,657 ✭✭✭komodosp


    I had been working in COBOL for ages, and after getting laid off and realising that COBOL was BOLOC(s) I decided to learn ASP.NET and VB.NET as that seemed to be where the jobs were. Took me a while to do that though and as soon as I had I looked at the jobs again and it seemed they were thin on the ground. But then I saw a PHP job advertised in my local area, so I quickly crammed PHP / MySQL, and started doing the "practice project" I had been doing in PHP instead of ASP.NET, applied for the job and got it. Been doing PHP ever since.

    Spent many an hour working late that first month as I tried to catch up on work that had taken me ages just because of lack of experience.

    Used a ripped-off copy of one of the O'Reilly's books. From then on, the WWW was my friend.

    I already knew C / C++ so it was easy enough to pick up.


  • Registered Users, Registered Users 2 Posts: 63 ✭✭ThrowinShapes


    I don't understand the argument that "PHP is a bad language" in this day and age. Might have stood up 5 years ago, but not today.
    We've got frameworks like Laravel - http://laravel.com/ and PHP powers many of the most popular content management systems around - WordPress, Drupal, Joomla...

    My only gripe with PHP is that it makes it really easy to write awful code. This includes mixing in HTML with your PHP. When done right, however, I don't see there being an issue learning it. Kind of like JavaScript in a sense.

    My experience was much like carlmango11's, set up your local server and figure out something you'd like to do then experiment.


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    I don't understand the argument that "PHP is a bad language" in this day and age. Might have stood up 5 years ago, but not today.
    We've got frameworks like Laravel - http://laravel.com/ and PHP powers many of the most popular content management systems around - WordPress, Drupal, Joomla...

    My only gripe with PHP is that it makes it really easy to write awful code. This includes mixing in HTML with your PHP. When done right, however, I don't see there being an issue learning it. Kind of like JavaScript in a sense.

    My experience was much like carlmango11's, set up your local server and figure out something you'd like to do then experiment.

    My top 3 complaints:

    Horribly inconsistent api and naming conventions, I mean truly ****ing awful
    Sorting is non deterministic
    No local scoped functions or classes, encourages the use of global variables evverywhere which makes things a mess.

    And thats just the 3 worse, the language is filled of oddities.


  • Registered Users, Registered Users 2 Posts: 1,757 ✭✭✭Deliverance XXV


    Global variables in PHP are a major no-no. One thing about PHP is I find it hard to implement OOPHP and find it anyway beneficial. There is a lot of things wrong with PHP but if someone wants to grasp server-side code easy and see results quickly, I would find it hard not to recommend PHP.


  • Registered Users, Registered Users 2 Posts: 319 ✭✭nagilum2


    Do yourself a favour and learn Python instead :)

    http://gettingstartedwithdjango.com/


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    There's a difference between learning a language and learning a language dependant on a framework. If you're doing this to learn how to program, by all means learn Ruby, but avoid Rails, or go for Python, but don't touch Django.

    Frameworks are all about not having to learn how to do stuff, which is all very well once you already know how it's done, but a really bad idea at the start.

    As has been suggested PHP is a dreadful language, particularly because it lends itself to really bad coding. It also hasn't really evolved over the years, it's more like it's accumulated dirty hacks along the way. How OO was implemented has always made me cry.

    Given this, it is a very practical language (commercially, et al) and very versatile. I learned it about 15 years ago and I think I used some WAMP package, such as EasyPHP, and then worked my way through some tutorials (possibly on PHP Builder). Given that, I was already coding in classic ASP (using Perl, VBScript and JScript), so it was more a question of learning a new language rather than how to program.


  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    totally agree here.

    by all means learn a language but don't learn it by learning with a framework. that rules out ruby on rails, python with django.

    OP, what are your motivations behind learning PHP? I ask because I'd only really look at it after having a solid foundation in something else, I learned it when I was 16, when I got to college and was taught C and how to program properly it was a huge shock to the system. I had been doing many things wrong for the past few years.

    I tend to think of frameworks as stuff that will help you do what you want to do faster and in a more controlled and structured way, but only add complexity when you've no foundation. It's similar to starting off learning rudimentary java and installing something like eclipse (where a text editor and javac would suffice).

    PHP is still a very valuable language to have it totally ran the internet for its early years, but if I was given the choice to start on something else and start now it would be python.


  • Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭py2006


    Wow, I really wasn't aware of the negativity surround the PHP language. I always thought it was the opposite.


  • Advertisement
  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    py2006 wrote: »
    Wow, I really wasn't aware of the negativity surround the PHP language. I always thought it was the opposite.
    I suspect most wouldn't be negative about it, just more realistic. I'd still probably pick a LAMP or LAOP architecture for most Web applications, I'd be asked to assess as it remains a pretty powerful, versatile and rapid development language, with a plentiful supply of developers who are cheaper than C# or Java developers.

    But it is a language that has lended itself to bad coding, largely because it is so accessible, and development an army of cut 'n paste monkeys with delusions of programmer status. And over the years, as the language has grown and developed, some of the directions it's taken have been less than exemplary.

    So it's not that we, or at least I, really would have a negative view of it per say, but I would not pick it as a language to get into were I looking to learn how to program.
    PHP is still a very valuable language to have it totally ran the internet for its early years, but if I was given the choice to start on something else and start now it would be python.
    Early days... LOL... kids :rolleyes::P


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe



    Early days... LOL... kids :rolleyes::P

    In fairness its 20 years old, so in the context of the consumer internet its not an unreasonable statement.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    ChRoMe wrote: »
    In fairness its 20 years old, so in the context of the consumer internet its not an unreasonable statement.
    Oh loosen the fsck up Chrome :p


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    Oh loosen the fsck up Chrome :p

    It's me... On a PHP thread ! ;)


  • Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭py2006


    OP, what are your motivations behind learning PHP? I ask because I'd only really look at it after having a solid foundation in something else

    Well I have a reasonable knowledge of of web design and have been putting off the more advanced stuff (e.g. database integration etc) for a long time now. Its all purely a hobby thing as opposed to a professional endeavour.

    PHP was always at the back of my mind but I will certainly look at the others recommened here before making that decision.


  • Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭py2006


    PROGRAMMING-LANGUAGE-3.png


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    py2006 wrote: »
    Huge inforgraphic here

    One minor note about them saying that Facebook was built with PHP. Initially yes, however due to the huge problems they had with it, they have basically completely rewritten the runtime so its a very different beast to "pure PHP".

    http://en.wikipedia.org/wiki/HipHop_for_PHP


Advertisement