Skip to main content

set

Function set 

Source
pub fn set(items: &mut Vec<(PhpKey, PhpValue)>, name: &str, value: PhpValue)
Expand description

$array['name'] = $value: replaces in place, or appends.

name must not be integer-like ("5"): PHP stores such a key as an int, and this matches string keys only, so it would append a string key beside PHP’s int one.