Help on php

Discussion in 'Plugin Help' started by Hectman, Jul 5, 2020.

  1. Hectman

    Hectman Spider

    Messages:
    8
    I want to learn php, I know that it is not something I learn overnight, it is something that takes time but I need you to give me recommendations and pass me a tutorial or manual to learn.

    Thank you.
     
  2. JviguyGamesYT

    JviguyGamesYT Baby Zombie

    Messages:
    108
    GitHub:
    jviguy
    i would recommend using something like codeacademy its good for learning the basics of php
     
  3. Seeker

    Seeker Witch

    Messages:
    65
    GitHub:
    seeker-devs
    Why post this in plugin-help?
     
  4. anirudh246

    anirudh246 Spider Jockey

    Messages:
    31
    GitHub:
    ImDaRealAni
    If you have the ability to read, then the PHP Documentation is the best source. So many suggest this Codecademy thing and some YouTube stuff, although the PHP documentation always had everything I needed. Why use the documentation over some random tutorial? Here is the main reason:

    It’s by the managers of PHP themselves

    They always have the most updated version of PHP ready along with every way it can be used. The docs contain everything you can do in PHP, and some magic tutorial isn’t going to do much better; one of my favorite parts of the PHP docs are the comments, they also contain some very useful advice that you might even use in your plugins someday. Last reason for this statement is because PHP has one of the best official documentation compared to most other languages like C++... so use it.

    PS: If anything, avoid those clickbait YouTube tutorials that say lEaRn PHP iN 20 mInUtEs. They are almost as scam as Udemy.
     
    Seeker likes this.
  5. Taco

    Taco Creeper

    Messages:
    4
    GitHub:
    twrrr
    I reccomend trying to read plugins, like looking at the code and trying to understand what it does. Trust me, It will help
     
  6. Seeker

    Seeker Witch

    Messages:
    65
    GitHub:
    seeker-devs
    PM plugins source code is the thing you don't wanna mess with before learning PHP OOP. Your recommendation is... well... not good I guess. Try to read source code of other PHP related things once you have a basic understanding of PHP (variables, operators and some methods like echo etc are very easy and basic to learn, and if you have past experience with coding languages, then you can just keep scrolling and it'll be very easy!). This is very very very basic https://github.com/Azure-Samples/php-docs-hello-world/blob/master/index.php, but as soon as you spot something, make sure to test it! Testing is better than googling. In this repo, 'echo' is like System.out.print or cout or print, it outputs your args!
    Example:
    PHP:
    echo("method arguments can be anything, from int to float to string");
     
  7. anirudh246

    anirudh246 Spider Jockey

    Messages:
    31
    GitHub:
    ImDaRealAni
    You do realize, that in PHP, echo isn’t a function anymore?

    also because it triggers me using just cout is bad practice. Way safer to use the full std::cout instead but this isn’t a c++ forum so nevermind.
     
  8. Seeker

    Seeker Witch

    Messages:
    65
    GitHub:
    seeker-devs
    i never said anything about using a specific php version. Most people still use PHP5. Also, yes, this isn't a CPP forum, and tell a newbie about std::cout and they'll end up confused between cout and std::cout. It was just an example.
     
  9. anirudh246

    anirudh246 Spider Jockey

    Messages:
    31
    GitHub:
    ImDaRealAni
    PocketMine uses PHP 7.3. As this original post that you replied to was about a method that was flawed and what you would suggest for learning PocketMine, I don’t see any use for showing them the old ways of using echo.
     
  10. Seeker

    Seeker Witch

    Messages:
    65
    GitHub:
    seeker-devs
    READ THE OP. They wanted to learn general PHP, not for PM. PHP is not limited to Web or Plugin Development only. Also, I use PHP7.2 for PM so you might be a bit wrong there ;), no point in arguing. Thank you for your valuable contribution to this thread that wasn't even marked as solved even after it was solved.
     
  11. Primus

    Primus Zombie

    Messages:
    399
    Language contstructs

    Learn the syntax first. And learning from youtube video isn't that bad. Secret ingredient for success is practice.
     
  12. Seeker

    Seeker Witch

    Messages:
    65
    GitHub:
    seeker-devs
    Except those JavaScript in 10 seconds videos. Yes, it took me like 2 years to finally get familiar with the syntax. When I started, I was very young and it took me alot of time to learn. I personally suggest you to learn C because... it just made everything else easier. Java should be your 2nd-3rd language to learn.. Honestly, I don't suggest learning PHP with no past experience with coding. If you're good at Maths and algebric expressions (imo), coding isn't like how some parents exaggerate it. Baking a cake without the required ingredients with a recipe is just wasting time.
    Cake = PHP (for you)
    Ingredients = Basic understanding of the syntax (like Primus said) which I recommend Java for and not knowing basic Mathematics. I don't know why, but I believe that maths is necessary to know before coding.
    Recipe = Tutorials.
    I'm probably exaggerating 'Maths' like a nerd, but I don't want to get into calculus in stuff.. just for the sake of your sanity :)
    • Also, WHY DO YOU WANT TO LEARN PHP OMDDKOSWOOQW9OS9SOSO
     
  13. GodWeedZao

    GodWeedZao Zombie

    Messages:
    205
    GitHub:
    godweedzao
    its not a problem in plugins, so why are you posting here about php?o_O:facepalm:
     
    Seeker likes this.
  14. Primus

    Primus Zombie

    Messages:
    399
    He is not even familiar with concept of programming, so all his associations with php are pocketmine plugins! Don't facepalm newbie, be friendly and kindly inform him.
     
    Seeker likes this.
  15. GodWeedZao

    GodWeedZao Zombie

    Messages:
    205
    GitHub:
    godweedzao
    :confused::facepalm:
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.