is empty string

    0

    21

    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
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.