sidawson,
@sidawson@mastodon.nz avatar

@cspray Oh, and to your specific example, if phpstan is anything to go by, it seems php stores non associative arrays internally AS associative, it’s just that the keys are indexes (0, 1, 2…) so that’s the “expects array <int, string >, was provided array<string >” malarkey.

In phpstan you can go either array<int, string> (or array<array-key, string>), or, more simply string[] - but the latter form avoids those sorts of complaints. Might be worth having a looksee if psalm is similar.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • kavyap
  • tacticalgear
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • slotface
  • vwfavf
  • everett
  • rosin
  • osvaldo12
  • provamag3
  • modclub
  • GTA5RPClips
  • ethstaker
  • InstantRegret
  • cisconetworking
  • cubers
  • ngwrru68w68
  • tester
  • normalnudes
  • Leos
  • anitta
  • megavids
  • JUstTest
  • All magazines