2 comments

  • anthk 1 hour ago
    Thou shall use the Rust rewrite of PHP.
    • Y-bar 11 minutes ago
      ”Rewrite in Rust” fanboys are more annoying than crypto bros. How is such a feat even possible?
  • origini 1 hour ago
    Ah boy o boy, PHP was the first lanuage I teached myself but man it still needs PHPDoc comment on return types?

    Come on PHP has so many shitty things, but even something basic like this is still not in the lanuage itself?

    • monster_truck 1 hour ago
      It's had return type declarations since 7. There's even intersection and literal types now. You could have typed this into google and it would have told you
      • origini 9 minutes ago
        I did and it told me that it doesn't support typed arrays.
      • bakugo 19 minutes ago
        Type declarations are still quite limited, though. For example, you can declare that a function returns an array or a string, but not an array of strings.
    • Y-bar 1 hour ago
      TFA even shows examples of native return types. How could you not see that?
      • origini 7 minutes ago
        The page itself shows plenty of examples were this is not true.

        Including generic type arrays which is not supported.

    • throw1234567891 24 minutes ago
      "Taught", not "teached".
    • spiderfarmer 44 minutes ago
      "Cool! A PHP article on HN, let's rehash some of my comments that got lots of upvotes 11 years ago!"
      • origini 6 minutes ago
        Yepp, especially because not much changed and other languages did quite a lot. Strong contrast don't you think?