News for hackers. Stuff that matters.
Re:Combining Golang and PHP can solve real-world development... by cfv on Tuesday December 11, 2018 @09:21AM (#18655428)
Ohhh is that so? Show me how you do the following in Javascript.

    try{
      $exceptionType = rand(1,10) > 5?     
        BadMethodCallException::class
        : LogicException::class;
      throw new $exceptionType("smartass");
    }
    catch(BadMethodCallException $typed_1){
      file_put_contents('php://stderr', "Bad method, ".$typed_1->getMessage());
    }
    catch(LogicException $typed_2){
      file_put_contents('php://stderr', "Bad logic, ".$typed_2->getMessage());
    }
or this:

    function lieToMe(PHPMailer\PHPMailer\PHPMailer $mailer){
      
    }
or this:

    $mailStrategy = new MailStrategy();
    $mailStrategy("[email protected]","Subject","Body");
Or any of the other actually cool things you get with PHP if you can cope with the language.

It's sad to see people who probably can't program a microwave diss an entire language they haven't ever actually used.

There are no comments on this comment yet.