To lighten up some discussion here, I would like to ask what features or changes you would love to see in future PHP versions? We know that in recent versions a lot of nice adjustments were added, but I bet most of us dreams for more.

I personally would love to see types on inline variables, at first even not strict. However, I don’t know if it’s remotely possible with how currently the language is implemented.

  • blackshadev@programming.dev
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    Proper typing of nested or generic types. For instance: generic classes or array elements without phpdoc’s template.

    For me the typing of array elements is the most important one. As soon as you have some form of array, the typing in php ends. I see this as such a short coming in the growing type system of php. Seeing a lonely array type always leaves me questioning simple things like: What kind of array is it, a list of strings, objects? Or maybe an associative array? Does it even hold items? Why are we here?

    • prwnr@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Ah right. that would be definitely great too.

      Maybe this could go in steps or simply as some new structure like a map. I would love to see map-like structure in PHP like there is in Go