Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Plugins for the php7 code

Comments in 'Plugin Development' started by WillotheBlessed, Sep 15, 2015.

  1. WillotheBlessed
    Offline

    WillotheBlessed Active Member

    Joined:
    Sep 17, 2014
    Posts:
    69
    Minecraft User:
    will
    1. Do I need to compile my plugins into .phar files? The php7 server seems to only recognize .phar, no source code folders.
    2. If I do need to compile into .phar files, how do I do it without an devtools updated to php7?

    Thanks!
  2. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    DevTools is needed to load source plugins. Be patient, updates are coming. You can compile source plugins with online phar converters.
    Last edited: Sep 16, 2015
    HotFireyDeath likes this.
  3. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    (Like pmt.mcpe.me )
    PEMapModder likes this.
  4. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Plugins must be written with PHP 7 syntax
  5. deot
    Offline

    deot Active Member Plugin Developer

    Joined:
    Apr 22, 2015
    Posts:
    219
    Plugins:
    1
    Minecraft User:
    deot
    Is it? I don't think Soo...
    I tried DevTools with bumped API version and its working fine with PHP7 Build :)
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Again, it is not "PHP 7 syntax". PHP 7 doesn't change any existing syntax. It simply adds new ones. It is PocketMine that changes the API to use the new features, and the changes require plugins to follow.
  7. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Really? Can the old PHP syntax be used?
    Lol I was sure that the syntax was changed. Sorry again
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    There is an added feature called "return types", but functions still work without return types. Just that PocketMine wants to use them.
    EvolSoft likes this.
  9. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    PHP 7 syntax? What syntax? It's not like we have to remove all semicolons at the end of each line, isn't it? :p Obviously this didn't happen:
    PHP 5:
    PHP:
    public function sayHello(){
        echo 
    "Hello!";
    }
    PHP 7:
    PHP:
    function public sayHello(){
        echo 
    "Hello!"
    }
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Please update the post like I did in the quote to avoid confusion. This is a common practice for people who want to show wrong examples.
  11. lucasvitegui
    Offline

    lucasvitegui Active Member

    Joined:
    Apr 18, 2015
    Posts:
    191
    Minecraft User:
    lucasviteguiBR
    How did you got PHP7 ?
  12. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    By searching it on google. We have search engines for a reason. :p

Share This Page

Advertisement