Skip to content

Please add zend_symtable_str_add function #15595

@matyhtf

Description

@matyhtf

Description

The absence of this API requires a self-implemented solution, which should be provided by Zend_API.h.

static zend_always_inline zval *zend_symtable_str_add(HashTable *ht, const char *str, size_t len, zval *pData) {
    zend_ulong idx;

    if (ZEND_HANDLE_NUMERIC_STR(str, len, idx)) {
        return zend_hash_index_add(ht, idx, pData);
    } else {
        return zend_hash_str_add(ht, str, len, pData);
    }
}

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