72
C0D4
6y

PHP sucks balls,
It takes forever to do anything, it is so messy it feels like walking through a massive pile of shit!

Ok good I have your attention and that ++ πŸ˜‡

But no this is not that kind of rant, quite the opposite.

In 70 lines of php shit as some people would call it, I am currently scrapping GitHub pages with ebook collections and with some minor regex pulling PDFs out and saving them to file.

Comments
  • 9
    You’ve got my ++ because I hate php just like you ;)
  • 3
    $5 says this is 10 lines of python

    Also github api is for normies
  • 5
    @sharktits without any imports? ;)
  • 1
    @mlask what do you need an import for, fetching an url?
  • 2
    @sharktits some uses imports just for string padding... so you’ll never know ;)
  • 5
    @sharktits if it was python you'd need to import some library to handle url fetching.

    but this is not python..
  • 3
    @irene to make it share worthy πŸ˜‚

    I don’t need comments on a small piece of code that will never see the another computer
  • 2
    @sharktits @mlask is just messing around with you πŸ˜‚ I work with the guy for years now and he is a php addict, with php compiler in place of his brain. Don’t let you get fooled.
  • 0
    @fonfi i feel sorry for him
  • 3
    @sharktits why feel sorry for someone for being good at something? 😳 I tend to admire people that try to master any subject.
  • 1
    Pretty sure a guy out there can do this in 5 lines of python.
    A js guy would do it in 3.
  • 1
    @irene yes, but where is the fun of programming, doing something from scratch to the end by yourself? That was the point of this rant (at least that is how I understood), @C0D4 sharing the joy of actually doing sth. Going your way, „there is always an app for that...” πŸ˜‰
  • 1
    @irene forgive me, will you? πŸ˜€Laying sick with fever, makes getting the jokes much more difficult... πŸ˜‰
  • 2
    @irene in some codebases I worked with, it seemed like the coders needed a postit note on their coffee cup to remind them how to use it. I side with Uncle Bob (clean code) on comments -- they're only necessary if intent cannot be explicitly expressed in code.
  • 3
    Eww, PHP πŸ˜‰
  • 2
  • 6
    PHP is like a rusty pickup truck:
    Messy, limited, ugly to look at and you always wish you'd never use it.

    But daaamn it gets the job done!
  • 1
    Also I will totally steal your code because it is amazing dude! ❀️
  • 1
    After all PHP is the best language.
  • 2
    @irene @c0d4 Comments are added to increase line count. Higher line count means more reason to shit on PHP.

    Like @mlask pointed out, at least there are no libraries to have to import either.

    #PHPFTW #FlameWars
  • 1
    Give. Code!
  • 2
    @vlatkozelka why is it impossible to write a large scale modular application with PHP? What difficulties have you faced?
  • 2
    @vlatkozelka go tell that to Mark Zuckerberg and Slack creators :) And yes it works more than fine with our modular, highly scallable, country wide used software πŸ˜€
  • 0
    @ArchLinux

    I’ll clean it up a bit and make it work with cli arguments for the page URL and file location to save to first, so it’s easier to work with.

    This was my test page to get it working.
    https://github.com/EbookFoundation/...
  • 1
    wow, my first open source script....

    For anyone interested

    https://c0d4-101.github.io/pdfDownl...

    @ArchLinux

    @frickerg
  • 0
    @irene
    Windows and php is straight forward you don’t need the bandwagon.

    This isn’t native to either win or Linux as i hate rewriting things to migrate between OS.

    The local directory for this will accept full path or local to current folder.
  • 0
    @irene just grab the PHP binaries and copy the php folder to somewhere easy to remember and add the directory to windows PATH so you can use it in CMD globally.

    usually C:/php

    https://windows.php.net/download/...

    if you want to spin it up as a web server backend then you'll need apache (the bandwagon)
  • 1
    @vlatkozelka I agree that the OP's post doesn't prove anything, however, OP wasn't trying to prove anything though. OP expressed concern about indiscriminate PHP bashing and made the point that while others are arguing over languages, he's getting work done in PHP. I might be missing something but you have not listed any intrinsic problems with PHP. Your reasons for disparaging PHP are quite generic and can easily be applied to any aspect of life - if you don't know what you're doing, chances are you're going to make a mess of anything. Does the framework interoperability group not publish enough guidelines to assist with structuring code? Are there any problems with any PSRs you read?
  • 0
    @ymas <- this guy gets it.πŸ˜‚

    This was intended as a PHP bashing, bash post but I swapped it into a “look what I did”.
Add Comment