Skip to content

[HttpClient] toArray is a bad and wrong name for json #32481

@zorn-v

Description

@zorn-v

Imagine that I got true response from API. That method do it right and return PHP true (coz json_decode). But... TO ARRAY ? Is true IS ARRAY ? Or maybe 123 is array also ? 😄

Also someone want to get PHP object instead array (preferences).

Maybe one more method like getJson($throw = true, $asArray = true) and deprecate toArray ? 😸

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy