<!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>Creates a new value of some type</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.spltype.html">SplType</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.splint.html">SplInt</a></div> <div class="up"><a href="class.spltype.html">SplType</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="spltype.construct" class="refentry"> <div class="refnamediv"> <h1 class="refname">SplType::__construct</h1> <p class="verinfo">(PECL spl_types >= 0.1.0)</p><p class="refpurpose"><span class="refname">SplType::__construct</span> — <span class="dc-title">Creates a new value of some type</span></p> </div> <div class="refsect1 description" id="refsect1-spltype.construct-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="methodname"><strong>SplType::__construct</strong></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">$initial_value</code></span> [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$strict</code></span> ]] )</div> <p class="para rdfs-comment"> </p> <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is currently not documented; only its argument list is available. </p></div> </div> <div class="refsect1 parameters" id="refsect1-spltype.construct-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <span class="term"><em><code class="parameter">initial_value</code></em></span> <dd> <p class="para"> Type and default value depends on the extension class. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">strict</code></em></span> <dd> <p class="para"> Whether to set the object's sctrictness. </p> </dd> </dt> </dl> </div> <div class="refsect1 errors" id="refsect1-spltype.construct-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> Throws an <a href="class.unexpectedvalueexception.html" class="classname">UnexpectedValueException</a> if incompatible type is given. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.spltype.html">SplType</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.splint.html">SplInt</a></div> <div class="up"><a href="class.spltype.html">SplType</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>