<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Updates the map with a new key-value pair</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="weakmap.offsetget.html">WeakMap::offsetGet</a></div> <div class="next" style="text-align: right; float: right;"><a href="weakmap.offsetunset.html">WeakMap::offsetUnset</a></div> <div class="up"><a href="class.weakmap.html">WeakMap</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="weakmap.offsetset" class="refentry"> <div class="refnamediv"> <h1 class="refname">WeakMap::offsetSet</h1> <p class="verinfo">(PECL weakref >= 0.2.0)</p><p class="refpurpose"><span class="refname">WeakMap::offsetSet</span> — <span class="dc-title">Updates the map with a new key-value pair</span></p> </div> <div class="refsect1 description" id="refsect1-weakmap.offsetset-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>WeakMap::offsetSet</strong></span> ( <span class="methodparam"><span class="type">object</span> <code class="parameter">$object</code></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span> )</div> <p class="para rdfs-comment"> Updates the map with a new key-value pair. If the key already existed in the map, the old value is replaced with the new. </p> </div> <div class="refsect1 parameters" id="refsect1-weakmap.offsetset-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <span class="term"><em><code class="parameter">object</code></em></span> <dd> <p class="para"> The object serving as key of the key-value pair. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">value</code></em></span> <dd> <p class="para"> The arbitrary data serving as value of the key-value pair. </p> </dd> </dt> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-weakmap.offsetset-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="weakmap.offsetget.html">WeakMap::offsetGet</a></div> <div class="next" style="text-align: right; float: right;"><a href="weakmap.offsetunset.html">WeakMap::offsetUnset</a></div> <div class="up"><a href="class.weakmap.html">WeakMap</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>