is empty string

    0

    22

    jvitstringemptyβ€’β€’β€’
    JVIT PHP

    only "" is empty, 0 not true.

    Shortcut: str.empty

    /**
    * Check a string is empty.
    *
    * @param  string $value
    * @return string
    */
    function isEmptyString($value)
    {
        return empty($value) && $value !== "0";
    }
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.