Skip to content

Instantly share code, notes, and snippets.

@jjergus
Created September 27, 2019 22:46
Show Gist options
  • Save jjergus/b7136a277e2a44d6b65556f5bbe5bc90 to your computer and use it in GitHub Desktop.
Save jjergus/b7136a277e2a44d6b65556f5bbe5bc90 to your computer and use it in GitHub Desktop.
docs-magic.patch
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClient.method.adoptConnection.html build/final/api-html/hack/class.AsyncMysqlClient.method.adoptConnection.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClient.method.adoptConnection.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlClient.method.adoptConnection.html 2019-09-27 15:45:16.752502745 -0700
@@ -27,11 +27,7 @@
<p>This example shows how to take a synchronous MySQL connection and convert it to use an asynchronous MySQL connection via <a href="/hack/reference/class/AsyncMysqlClient/adoptConnection/"><code>AsyncMysqlClient::adoptConnection()</code></a>.</p>
<p><strong>NOTE</strong>: Right now this does not work with <code>mysqli</code> or <code>PDO</code> connections.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Client\AdoptConn;
-
-require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClient.method.connect.html build/final/api-html/hack/class.AsyncMysqlClient.method.connect.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClient.method.connect.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlClient.method.connect.html 2019-09-27 15:45:16.760502852 -0700
@@ -41,11 +41,7 @@
<li>With <a href="/hack/reference/class/AsyncMysqlClient/"><code>AsyncMysqlClient</code></a>, we are able to take full advantage of <a href="/hack/async/introduction">async</a> to perform other DB connection or I/O operations while waiting for this connection to return.</li>
</ul>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Client\Conn;
-
-require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClient.method.setPoolsConnectionLimit.html build/final/api-html/hack/class.AsyncMysqlClient.method.setPoolsConnectionLimit.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClient.method.setPoolsConnectionLimit.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlClient.method.setPoolsConnectionLimit.html 2019-09-27 15:45:16.780503120 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>You can use <a href="/hack/reference/class/AsyncMysqlClient/setPoolsConnectionLimit/"><code>AsyncMysqlClient::setPoolsConnectionLimit()</code></a> to toggle the number of allowed async connections on the client. In this example, we are setting the number of allowed pool connections to be 2, but trying to do 3 connections, and that ends up giving an exception.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Client\setPCL;
-
-require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClientStats.method.callbackDelayMicrosAvg.html build/final/api-html/hack/class.AsyncMysqlClientStats.method.callbackDelayMicrosAvg.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClientStats.method.callbackDelayMicrosAvg.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlClientStats.method.callbackDelayMicrosAvg.html 2019-09-27 15:45:16.792503281 -0700
@@ -15,11 +15,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example describes how to get the average delay time between when a callback is scheduled (in this case, performing the connection) and when the callback actual ran (in this case, when the connection was actually established) via <a href="/hack/reference/class/AsyncMysqlClientStats/callbackDelayMicrosAvg/"><code>AsyncMysqlClientStats::callbackDelayMicrosAvg</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\CStats\CBackDelayMicro;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClientStats.method.ioEventLoopMicrosAvg.html build/final/api-html/hack/class.AsyncMysqlClientStats.method.ioEventLoopMicrosAvg.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlClientStats.method.ioEventLoopMicrosAvg.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlClientStats.method.ioEventLoopMicrosAvg.html 2019-09-27 15:45:16.792503281 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example describes how to get the average loop time of this SQL client's event handling (in this particular case, performing the connection) via <a href="/hack/reference/class/AsyncMysqlClientStats/ioEventLoopMicrosAvg/"><code>AsyncMysqlClientStats::ioEventLoopMicrosAvg</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\CStats\IOELMicros;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.close.html build/final/api-html/hack/class.AsyncMysqlConnection.method.close.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.close.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.close.html 2019-09-27 15:45:16.864504247 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Closing a database connection is usually a good idea. This example shows the closing of a connection using <a href="/hack/reference/class/AsyncMysqlConnection/close/"><code>AsyncMysqlConnection::close</code></a> and then tries to invoke a query on that connection afterwards.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\Close;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.connectResult.html build/final/api-html/hack/class.AsyncMysqlConnection.method.connectResult.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.connectResult.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.connectResult.html 2019-09-27 15:45:16.872504356 -0700
@@ -14,11 +14,7 @@
<p>This example shows how to get data about the async MySQL connection you made via a call to <a href="/hack/reference/class/AsyncMysqlConnection/connectResult/"><code>AsyncMysqlConnection::connectResult</code></a>. An <a href="/hack/reference/class/AsyncMysqlConnectResult/"><code>AsyncMysqlConnectResult</code></a> is returned and there are various statistical methods you can call. Here, we call <code>elapsedTime</code> to show the time it took to make the connection.</p>
<p>Interestingly, if you run this example twice or more, you may notice that the second time on will show a lower elapsed time than the first. This could be due to caching mechanisms, etc.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\ConnResult;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.escapeString.html build/final/api-html/hack/class.AsyncMysqlConnection.method.escapeString.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.escapeString.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.escapeString.html 2019-09-27 15:45:16.880504462 -0700
@@ -28,11 +28,7 @@
<p>We <em>strongly</em> recommend using an API like <a href="/hack/reference/class/AsyncMysqlConnection/queryf/"><code>AsyncMysqlConnection::queryf</code></a> instead,
which automatically escapes strings passed to <code>%s</code> placeholders.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\EscapeString;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.host.html build/final/api-html/hack/class.AsyncMysqlConnection.method.host.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.host.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.host.html 2019-09-27 15:45:16.884504516 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to get the host of the MySQL server that this connection is associated with via <a href="/hack/reference/class/AsyncMysqlConnection/host/"><code>AsyncMysqlConnection::host</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\Host;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.isReusable.html build/final/api-html/hack/class.AsyncMysqlConnection.method.isReusable.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.isReusable.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.isReusable.html 2019-09-27 15:45:16.892504623 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to make a connection not reusable in a connection pool with <a href="/hack/reference/class/AsyncMysqlConnection/setReusable/"><code>AsyncMysqlConnection::setReusable</code></a> and test it with <a href="/hack/reference/class/AsyncMysqlConnection/isReusable/"><code>AsyncMysqlConnection::isReusable</code></a>. By default, connections in pools are reusable. So, here we create a pool connection that is assigned to <code>$conn</code>. When we close <code>$conn</code>, that destroys that connection permanently. So when we get <code>$conn2</code>, a whole new connection will need to be created since we can't use the connection that was associated to <code>$conn</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\IsReusable;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.lastActivityTime.html build/final/api-html/hack/class.AsyncMysqlConnection.method.lastActivityTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.lastActivityTime.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.lastActivityTime.html 2019-09-27 15:45:16.904504785 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to determine the last time a successful call was made using a given connection via <a href="/hack/reference/class/AsyncMysqlConnection/lastActivityTime/"><code>AsyncMysqlConnection::lastActivityTime</code></a>. The value returned is seconds since epoch as a <code>float</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\LastActTime;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.multiQuery.html build/final/api-html/hack/class.AsyncMysqlConnection.method.multiQuery.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.multiQuery.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.multiQuery.html 2019-09-27 15:45:16.916504945 -0700
@@ -34,11 +34,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p><a href="/hack/reference/class/AsyncMysqlConnection/multiQuery/"><code>AsyncMysqlConnection::multiQuery</code></a> is similar to <a href="/hack/reference/class/AsyncMysqlConnection/query/"><code>AsyncMysqlConnection::query</code></a>, except that you can pass an array of queries to run one after the other. Then when you <code>await</code> on the call, you will get a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> of <a href="/hack/reference/class/AsyncMysqlQueryResult/"><code>AsyncMysqlQueryResult</code></a>, one result for each query.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\MultiQuery;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.port.html build/final/api-html/hack/class.AsyncMysqlConnection.method.port.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.port.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.port.html 2019-09-27 15:45:16.920504999 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to get the port of the MySQL server that this connection is associated with via <a href="/hack/reference/class/AsyncMysqlConnection/port/"><code>AsyncMysqlConnection::port</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\Port;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.queryf.html build/final/api-html/hack/class.AsyncMysqlConnection.method.queryf.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.queryf.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.queryf.html 2019-09-27 15:45:16.968505643 -0700
@@ -51,11 +51,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlConnection/queryf/"><code>AsyncMysqlConnection::queryf</code></a>. First you get a connection from an <a href="/hack/reference/class/AsyncMysqlConnectionPool/"><code>AsyncMysqlConnectionPool</code></a>; then you decide what parameters you want to pass as query placeholders.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\Queryf\Basic;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
@@ -108,11 +104,7 @@
</div>
<p>The following example uses the <code>%=s</code> placeholder in order to allow you to check whether an email address with the provided <code>string</code> exists in the table, or, if <code>null</code> is passed, whether there is a user with a <code>null</code> email address.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\Queryf\PerEqual;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
@@ -166,11 +158,7 @@
</div>
<p>The following example shows how to use the <code>%L</code> placeholder for <a href="/hack/reference/class/AsyncMysqlConnection/queryf/"><code>AsyncMysqlConnection::queryf</code></a>. First you get a connection from an <a href="/hack/reference/class/AsyncMysqlConnectionPool/"><code>AsyncMysqlConnectionPool</code></a>; then we are passing a vector of ids to used in the placeholder. The placeholder ends up being <code>%Ld</code> since the ids are integers.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\Queryf\PerL;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.query.html build/final/api-html/hack/class.AsyncMysqlConnection.method.query.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.query.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.query.html 2019-09-27 15:45:16.932505160 -0700
@@ -31,11 +31,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows a basic usage of <a href="/hack/reference/class/AsyncMysqlConnection/query/"><code>AsyncMysqlConnection::query</code></a>. First you get a connection from an <a href="/hack/reference/class/AsyncMysqlConnectionPool/"><code>AsyncMysqlConnectionPool</code></a>, then you can make the query.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\Query;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.releaseConnection.html build/final/api-html/hack/class.AsyncMysqlConnection.method.releaseConnection.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.releaseConnection.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.releaseConnection.html 2019-09-27 15:45:16.976505750 -0700
@@ -14,11 +14,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>If you ever want to get a plain, vanilla synchronous MySQL connection from your async connection, you call <a href="/hack/reference/class/AsyncMysqlConnection/releaseConnection/"><code>AsyncMysqlConnection::releaseConnection</code></a>. This examples show how to get such a connection, noting too that your async connection is destroyed.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\ReleaseConn;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.serverInfo.html build/final/api-html/hack/class.AsyncMysqlConnection.method.serverInfo.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.serverInfo.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.serverInfo.html 2019-09-27 15:45:16.976505750 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to get the version of the MySQL server that this connection is associated with via <a href="/hack/reference/class/AsyncMysqlConnection/serverInfo/"><code>AsyncMysqlConnection::serverInfo</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\ServerInfo;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.setReusable.html build/final/api-html/hack/class.AsyncMysqlConnection.method.setReusable.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.setReusable.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.setReusable.html 2019-09-27 15:45:16.988505912 -0700
@@ -21,11 +21,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to make a connection not reusable in a connection pool with <a href="/hack/reference/class/AsyncMysqlConnection/setReusable/"><code>AsyncMysqlConnection::setReusable</code></a>. By default, connections in pools are reusable. So, here we create a pool connection that is assigned to <code>$conn</code>. When we close <code>$conn</code>, that destroys that connection permanently. So when we get <code>$conn2</code>, a whole new connection will need to be created since we can't use the connection that was associated to <code>$conn</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\SetReusable;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.warningCount.html build/final/api-html/hack/class.AsyncMysqlConnection.method.warningCount.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnection.method.warningCount.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnection.method.warningCount.html 2019-09-27 15:45:16.992505965 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to get the number of errors or warnings on the last SQL query via <a href="/hack/reference/class/AsyncMysqlConnection/warningCount/"><code>AsyncMysqlConnection::warningCount</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Conn\WarningCount;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectionPool.method.connect.html build/final/api-html/hack/class.AsyncMysqlConnectionPool.method.connect.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectionPool.method.connect.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnectionPool.method.connect.html 2019-09-27 15:45:17.036506556 -0700
@@ -34,11 +34,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>It is <strong>highly recommended</strong> that you use connection pools when using async MySQL. That way you don't have to create a new connection every time you want to make a query to the database. The following example shows you how to connect to a MySQL database using an <code>AsyncMySqlConnectionPool</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\PoolConn\Connect;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectionPool.method.__construct.html build/final/api-html/hack/class.AsyncMysqlConnectionPool.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectionPool.method.__construct.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnectionPool.method.__construct.html 2019-09-27 15:45:17.028506448 -0700
@@ -49,11 +49,7 @@
</ul>
<p>This example focuses on the <code>connection_limit</code> and <code>idle_timeout_micros</code> options.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ConnPool\construct;
-
-require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../__includes/async_mysql_connect.inc.php&quot;;
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectionPool.method.getPoolStats.html build/final/api-html/hack/class.AsyncMysqlConnectionPool.method.getPoolStats.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectionPool.method.getPoolStats.html 2019-09-27 12:30:15.766833592 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnectionPool.method.getPoolStats.html 2019-09-27 15:45:17.048506716 -0700
@@ -21,11 +21,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to gather <code>AsyncMySqlConnectionPool</code> statistics using its <code>getStats()</code> method. The statistics that are gathered are connection statistics.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ConnPool\Stats;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.clientStats.html build/final/api-html/hack/class.AsyncMysqlConnectResult.method.clientStats.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.clientStats.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnectResult.method.clientStats.html 2019-09-27 15:45:16.812503550 -0700
@@ -14,11 +14,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Every connection has a connection result. You get the connection result from a call to <a href="/hack/reference/class/AsyncMysqlConnection/connectResult/"><code>AsyncMysqlConnection::connectResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlConnectResult/"><code>AsyncMysqlConnectResult</code></a> is <code>clientStats()</code>, which gives you some information about the client you are connecting too.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ConnResult\ClientStats;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.elapsedMicros.html build/final/api-html/hack/class.AsyncMysqlConnectResult.method.elapsedMicros.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.elapsedMicros.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnectResult.method.elapsedMicros.html 2019-09-27 15:45:16.816503603 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Every connection has a connection result. You get the connection result from a call to <a href="/hack/reference/class/AsyncMysqlConnection/connectResult/"><code>AsyncMysqlConnection::connectResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlConnectResult/"><code>AsyncMysqlConnectResult</code></a> is <code>elapsedMicros()</code>, which tells you how long it took to make the connection.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ConnResult\ElapsedMic;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.endTime.html build/final/api-html/hack/class.AsyncMysqlConnectResult.method.endTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.endTime.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnectResult.method.endTime.html 2019-09-27 15:45:16.820503658 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ConnResult\EndTime;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.startTime.html build/final/api-html/hack/class.AsyncMysqlConnectResult.method.startTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlConnectResult.method.startTime.html 2019-09-27 12:30:15.762833549 -0700
+++ build/final/api-html/hack/class.AsyncMysqlConnectResult.method.startTime.html 2019-09-27 15:45:16.824503710 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ConnResult\StartTime;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.clientStats.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.clientStats.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.clientStats.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.clientStats.html 2019-09-27 15:45:17.060506877 -0700
@@ -14,11 +14,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>When an error occurs when establishing a connection or on a query, and you catch the exception that is thrown, you will get an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a> is <code>clientStats()</code>, which gives you some information about the client you are connecting too.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\CStats;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.elapsedMicros.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.elapsedMicros.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.elapsedMicros.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.elapsedMicros.html 2019-09-27 15:45:17.064506931 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>When an error occurs when establishing a connection or on a query, and you catch the exception that is thrown, you will get an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a> is <code>elapsedMicros()</code>, which tells you how long the operation took until the error occurred.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\ElapsedMic;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.endTime.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.endTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.endTime.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.endTime.html 2019-09-27 15:45:17.068506985 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\EndTime;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.failureType.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.failureType.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.failureType.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.failureType.html 2019-09-27 15:45:17.072507039 -0700
@@ -12,11 +12,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>When an error occurs when establishing a connection or on a query, and you catch the exception that is thrown, you will get an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a> is <code>failureType()</code>, which tells you whether the operation was a timeout (via the string <code>TimedOut</code>) or a server rejection of our connection or query (via the string <code>Failed</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\FailType;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_errno.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_errno.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_errno.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_errno.html 2019-09-27 15:45:17.076507092 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>When an error occurs when establishing a connection or on a query, and you catch the exception that is thrown, you will get an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a> is <code>mysql_errno()</code>, which gives you the MySQL error number. In this case, the error number is 1146, which represents a table not existing.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\ErrNo;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_error.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_error.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_error.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_error.html 2019-09-27 15:45:17.076507092 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>When an error occurs when establishing a connection or on a query, and you catch the exception that is thrown, you will get an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a> is <code>mysql_error()</code>, which gives you the MySQL error string. In this case, the error string is letting us know that the <code>bogus</code> table does not exist.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\MysqlError;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_normalize_error.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_normalize_error.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_normalize_error.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.mysql_normalize_error.html 2019-09-27 15:45:17.080507146 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>When an error occurs when establishing a connection or on a query, and you catch the exception that is thrown, you will get an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a>. And one of the methods on an <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a> is <code>mysql_normalize_error()</code>, which gives you possibly alternative, normalized version of the error provided by <a href="/hack/reference/class/AsyncMysqlErrorResult/mysql_error/"><code>mysql_error()</code></a>. Many times they are the same; it depends on how the client provides the error messages. In this case, the two errors are the same; the error string is letting us know that the <code>bogus</code> table does not exist.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\MysqlNErr;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.startTime.html build/final/api-html/hack/class.AsyncMysqlErrorResult.method.startTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlErrorResult.method.startTime.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlErrorResult.method.startTime.html 2019-09-27 15:45:17.084507200 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\ErrorResult\StartTime;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.__construct.html build/final/api-html/hack/class.AsyncMysqlException.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.__construct.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlException.method.__construct.html 2019-09-27 15:45:17.096507360 -0700
@@ -18,11 +18,7 @@
<p>The two current subclasses of <a href="/hack/reference/class/AsyncMysqlException/"><code>AsyncMysqlException</code></a> are <code>AsyncMysqlConnectionException</code> for connection problems and <a href="/hack/reference/class/AsyncMysqlQueryException/"><code>AsyncMysqlQueryException</code></a> for querying issues.</p>
<p>Note that you can explicitly construct one by creating an object like <code>new AsyncMysqlException(AsyncMysqlErrorResult $result)</code>. But this is not normally done.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Except\Constr;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.failed.html build/final/api-html/hack/class.AsyncMysqlException.method.failed.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.failed.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlException.method.failed.html 2019-09-27 15:45:17.100507414 -0700
@@ -15,11 +15,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlException/failed/"><code>AsyncMysqlException::failed</code></a> to determine if the connection failed in some other way than a timeout.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Except\Failed;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.getResult.html build/final/api-html/hack/class.AsyncMysqlException.method.getResult.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.getResult.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlException.method.getResult.html 2019-09-27 15:45:17.104507468 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlException/getResult/"><code>AsyncMysqlException::getResult</code></a> to get the <a href="/hack/reference/class/AsyncMysqlErrorResult/"><code>AsyncMysqlErrorResult</code></a> object associated with this exception. Particularly, we call <code>elapsedMicros()</code> on that object.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Except\GetRes;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorCode.html build/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorCode.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorCode.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorCode.html 2019-09-27 15:45:17.108507522 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlException/mysqlErrorCode/"><code>AsyncMysqlException::mysqlErrorCode</code></a> to get the raw MySQL error code associated with this exception. The most likely error code for this example will be <code>1045</code> for access denied.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Except\MysqlErrorCode;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorString.html build/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorString.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorString.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlException.method.mysqlErrorString.html 2019-09-27 15:45:17.108507522 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Except\MysqlErrorStr;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.timedOut.html build/final/api-html/hack/class.AsyncMysqlException.method.timedOut.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlException.method.timedOut.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlException.method.timedOut.html 2019-09-27 15:45:17.112507575 -0700
@@ -14,11 +14,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlException/timedOut/"><code>AsyncMysqlException::timedOut</code></a> to determine if the connection failed by a timeout.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Except\TimedOut;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.getSuccessfulResults.html build/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.getSuccessfulResults.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.getSuccessfulResults.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.getSuccessfulResults.html 2019-09-27 15:45:17.120507683 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how we can get the successful results of a multi-query, even though one of those queries gave us an error (which we caught in the exception). This is done via <a href="/hack/reference/class/AsyncMysqlQueryErrorResult/getSuccessfulResults/"><code>AsyncMysqlQueryErrorResult::getSuccessfulResults</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryErrorRes\SuccRes;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.numSuccessfulQueries.html build/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.numSuccessfulQueries.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.numSuccessfulQueries.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryErrorResult.method.numSuccessfulQueries.html 2019-09-27 15:45:17.124507737 -0700
@@ -12,11 +12,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how we can get the number of successful queries of a multi-query, even though one of those queries gave us an error (which we caught in the exception). This is done via <a href="/hack/reference/class/AsyncMysqlQueryErrorResult/numSuccessfulQueries/"><code>AsyncMysqlQueryErrorResult::numSuccessfulQueries</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryErrorRes\NumSucc;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.clientStats.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.clientStats.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.clientStats.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.clientStats.html 2019-09-27 15:45:17.140507952 -0700
@@ -14,11 +14,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>You can get some statistical information from the MySQL client when you get an <a href="/hack/reference/class/AsyncMysqlQueryResult/"><code>AsyncMysqlQueryResult</code></a> via the <code>clientStats()</code> method.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\CStats;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.elapsedMicros.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.elapsedMicros.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.elapsedMicros.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.elapsedMicros.html 2019-09-27 15:45:17.144508004 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\ElapsedMic;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.endTime.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.endTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.endTime.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.endTime.html 2019-09-27 15:45:17.144508004 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\EndTime;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.lastInsertId.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.lastInsertId.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.lastInsertId.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.lastInsertId.html 2019-09-27 15:45:17.148508058 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to use the <a href="/hack/reference/class/AsyncMysqlQueryResult/lastInsertId/"><code>AsyncMysqlQueryResult::lastInsertId</code></a> method to get the last primary id inserted into a table, if one exists. This will return <code>0</code> if your query did not actually insert an id, for example in a <code>SELECT</code> statement.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\LastInsID;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRows.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRows.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRows.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRows.html 2019-09-27 15:45:17.156508167 -0700
@@ -33,11 +33,7 @@
</div>
<p>Note that all values in the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> returned from <code>mapRows</code> will be <code>string</code> or <code>null</code>. If you want specifically-typed values, use <a href="/hack/reference/class/AsyncMysqlQueryResult/mapRowsTyped/"><code>mapRowsTyped</code></a></p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\MapRows;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRowsTyped.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRowsTyped.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRowsTyped.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.mapRowsTyped.html 2019-09-27 15:45:17.160508219 -0700
@@ -36,11 +36,7 @@
</div>
<p>Note that all values in the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> returned from <code>mapRowsTyped</code> will be the actual typed representation of the database type, or <code>null</code>. Above you can see we have <code>string</code> and <code>int</code>. If you want just <code>string</code> values for everything, use <a href="/hack/reference/class/AsyncMysqlQueryResult/mapRows/"><code>mapRows</code></a></p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\MapRowsT;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRowsAffected.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRowsAffected.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRowsAffected.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRowsAffected.html 2019-09-27 15:45:17.172508381 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to determine the number of rows affected by a given query using <a href="/hack/reference/class/AsyncMysqlQueryResult/numRowsAffected/"><code>AsyncMysqlQueryResult::numRowsAffected</code></a>. This is especially useful on an <code>INSERT</code> query or similar, where you won't get any rows back in your result, but you want to make sure your query did what it was supposed to do.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\NumRowsA;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRows.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRows.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRows.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.numRows.html 2019-09-27 15:45:17.168508327 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to determine the number of rows returned from a given query using <a href="/hack/reference/class/AsyncMysqlQueryResult/numRows/"><code>AsyncMysqlQueryResult::numRows</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\NumRows;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.rowBlocks.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.rowBlocks.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.rowBlocks.html 2019-09-27 12:30:15.770833636 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.rowBlocks.html 2019-09-27 15:45:17.180508488 -0700
@@ -36,11 +36,7 @@
</div>
<p>and thus a subsequent call to <code>rowBlocks()</code> will return an empty <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\rowBlocks;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.startTime.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.startTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.startTime.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.startTime.html 2019-09-27 15:45:17.212508917 -0700
@@ -15,11 +15,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\StartTime;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRows.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRows.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRows.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRows.html 2019-09-27 15:45:17.220509025 -0700
@@ -35,11 +35,7 @@
<p>Note that all values in the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> returned from <code>vectorRows</code> will be <code>string</code> or <code>null</code>. If you want specifically-typed values, use <a href="/hack/reference/class/AsyncMysqlQueryResult/vectorRowsTyped/"><code>vectorRowsTyped</code></a>.</p>
<p>Also understand that if you want the actual column names associated with the values in the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>, you should use <a href="/hack/reference/class/AsyncMysqlQueryResult/mapRows/"><code>mapRows</code></a> instead.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\VectorRows;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRowsTyped.html build/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRowsTyped.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRowsTyped.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlQueryResult.method.vectorRowsTyped.html 2019-09-27 15:45:17.228509132 -0700
@@ -37,11 +37,7 @@
<p>Note that all values in the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> returned from <code>vectorRowsTyped</code> will be the actual typed representation of the database type, or <code>null</code>. Above you can see we have <code>string</code> and <code>int</code>. If you want just <code>string</code> values for everything, use <a href="/hack/reference/class/AsyncMysqlQueryResult/vectorRows/"><code>vectorRows</code></a></p>
<p>Also understand that if you want the actual column names associated with the values in the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>, you should use <a href="/hack/reference/class/AsyncMysqlQueryResult/mapRowsTyped/"><code>mapRowsTyped</code></a> instead.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\QueryResult\VecRowsT;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.clientStats.html build/final/api-html/hack/class.AsyncMysqlResult.method.clientStats.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.clientStats.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlResult.method.clientStats.html 2019-09-27 15:45:17.236509239 -0700
@@ -13,9 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>AsyncMysqlResult is abstract. See specific, concrete classes for examples of <a href="/hack/reference/class/AsyncMysqlResult/clientStats/"><code>AsyncMysqlResult::clientStats</code></a> (e.g., AsyncMysqlConnectResult, AsyncMysqlErrorResult)</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
+<pre><code class="language-PHP">echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
&quot;examples of clientStats (e.g., AsyncMysqlConnectResult, &quot;.
&quot;AsyncMysqlErrorResult)&quot;.
PHP_EOL;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.elapsedMicros.html build/final/api-html/hack/class.AsyncMysqlResult.method.elapsedMicros.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.elapsedMicros.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlResult.method.elapsedMicros.html 2019-09-27 15:45:17.240509294 -0700
@@ -10,9 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>AsyncMysqlResult is abstract. See specific, concrete classes for examples of <a href="/hack/reference/class/AsyncMysqlResult/elapsedMicros/"><code>AsyncMysqlResult::elapsedMicros</code></a> (e.g., AsyncMysqlConnectResult, AsyncMysqlErrorResult)</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
+<pre><code class="language-PHP">echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
&quot;examples of elapsedMicros (e.g., AsyncMysqlConnectResult, &quot;.
&quot;AsyncMysqlErrorResult)&quot;.
PHP_EOL;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.endTime.html build/final/api-html/hack/class.AsyncMysqlResult.method.endTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.endTime.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlResult.method.endTime.html 2019-09-27 15:45:17.240509294 -0700
@@ -10,9 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>AsyncMysqlResult is abstract. See specific, concrete classes for examples of <a href="/hack/reference/class/AsyncMysqlResult/endTime/"><code>AsyncMysqlResult::endTime</code></a> (e.g., AsyncMysqlConnectResult, AsyncMysqlErrorResult)</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
+<pre><code class="language-PHP">echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
&quot;examples of endTime (e.g., AsyncMysqlConnectResult, &quot;.
&quot;AsyncMysqlErrorResult)&quot;.
PHP_EOL;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.startTime.html build/final/api-html/hack/class.AsyncMysqlResult.method.startTime.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlResult.method.startTime.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlResult.method.startTime.html 2019-09-27 15:45:17.244509346 -0700
@@ -10,9 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>AsyncMysqlResult is abstract. See specific, concrete classes for examples of <a href="/hack/reference/class/AsyncMysqlResult/startTime/"><code>AsyncMysqlResult::startTime</code></a> (e.g., AsyncMysqlConnectResult, AsyncMysqlErrorResult)</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
+<pre><code class="language-PHP">echo &quot;AsyncMysqlResult is abstract. See specific, concrete classes for &quot;.
&quot;examples of startTime (e.g., AsyncMysqlConnectResult, &quot;.
&quot;AsyncMysqlErrorResult)&quot;.
PHP_EOL;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.current.html build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.current.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.current.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.current.html 2019-09-27 15:45:17.388511279 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to use <a href="/hack/reference/class/AsyncMysqlRowBlockIterator/current/"><code>AsyncMysqlRowBlockIterator::current</code></a> to get an <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a> from the iterator.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlockIt\Current;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.key.html build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.key.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.key.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.key.html 2019-09-27 15:45:17.388511279 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to use <a href="/hack/reference/class/AsyncMysqlRowBlockIterator/key/"><code>AsyncMysqlRowBlockIterator::key</code></a> to get the actual key pointing to an <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a> within the block iterator. The key will be an <code>int</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlockIt\Key;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.next.html build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.next.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.next.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.next.html 2019-09-27 15:45:17.392511333 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to use <a href="/hack/reference/class/AsyncMysqlRowBlockIterator/next/"><code>AsyncMysqlRowBlockIterator::next</code></a> to move on to the next <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a> in the iterator, assuming one exists.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlockIt\Next;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.rewind.html build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.rewind.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.rewind.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.rewind.html 2019-09-27 15:45:17.396511386 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlRowBlockIterator/rewind/"><code>AsyncMysqlRowBlockIterator::rewind</code></a> to get back to the beginning of the iterator as necessary.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlockIt\Rewind;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.valid.html build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.valid.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.valid.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlockIterator.method.valid.html 2019-09-27 15:45:17.400511440 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlRowBlockIterator/valid/"><code>AsyncMysqlRowBlockIterator::valid</code></a> to determine whether the current iterator is still valid (i.e., there was actually something to iterate over, or we have reached the end)</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlockIt\Valid;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.at.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.at.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.at.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.at.html 2019-09-27 15:45:17.324510421 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlRowBlock/at/"><code>AsyncMysqlRowBlock::at</code></a> to get a field value from the resulting row block. In this case we are looking at the 0th element of the row block and wanting the age field.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\At;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.count.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.count.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.count.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.count.html 2019-09-27 15:45:17.328510473 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlRowBlock/count/"><code>AsyncMysqlRowBlock::count</code></a> to get the number of rows in the given row block.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\Count;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldFlags.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldFlags.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldFlags.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldFlags.html 2019-09-27 15:45:17.336510581 -0700
@@ -114,11 +114,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\FieldFlags;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldName.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldName.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldName.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldName.html 2019-09-27 15:45:17.340510636 -0700
@@ -28,11 +28,7 @@
</div>
<p>So, in the example, given the table created with the SQL above, the string &quot;age&quot; would be returned (0-indexed).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\FieldName;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldsCount.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldsCount.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldsCount.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldsCount.html 2019-09-27 15:45:17.352510796 -0700
@@ -23,11 +23,7 @@
</div>
<p>So, in the example, given the table created with the SQL above, there are 4 fields.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\FieldsCount;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldType.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldType.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldType.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.fieldType.html 2019-09-27 15:45:17.348510742 -0700
@@ -150,11 +150,7 @@
</div>
<p>So, in our example, 253 would be returned for the <code>email</code> field.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\FieldType;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsDouble.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsDouble.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsDouble.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsDouble.html 2019-09-27 15:45:17.356510850 -0700
@@ -32,11 +32,7 @@
</div>
<p>In this case, we are actually getting a field that is an <code>int</code> (or <code>SMALLINT</code>). But there is an automatic conversion to a <code>float</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\GFAsDouble;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsInt.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsInt.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsInt.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsInt.html 2019-09-27 15:45:17.360510903 -0700
@@ -32,11 +32,7 @@
</div>
<p>In this case, we are actually getting a field that is an <code>int</code> (or <code>SMALLINT</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\GFAsInt;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsString.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsString.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsString.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getFieldAsString.html 2019-09-27 15:45:17.364510957 -0700
@@ -29,11 +29,7 @@
</div>
<p>In this case, we are actually getting a field that is a <code>string</code> (or <code>VARCHAR</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\GFAsString;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getIterator.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getIterator.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getIterator.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getIterator.html 2019-09-27 15:45:17.368511011 -0700
@@ -12,11 +12,7 @@
<p>The following example shows you how to get an iterator of an <a href="/hack/reference/class/AsyncMysqlRowBlock/"><code>AsyncMysqlRowBlock</code></a> via <code>getIterator()</code>. Getting an iterator of an <a href="/hack/reference/class/AsyncMysqlRowBlock/"><code>AsyncMysqlRowBlock</code></a> gives you an <a href="/hack/reference/class/AsyncMysqlRowBlockIterator/"><code>AsyncMysqlRowBlockIterator</code></a>, where each key of that iterator is an <code>int</code> representing the key to an <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a> of that row block, and each value from <code>current()</code> is the actual <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a>.</p>
<p>And then you can perform operations on that <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a>, including get an iterator of that as well.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\GetIterator;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getRow.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getRow.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.getRow.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.getRow.html 2019-09-27 15:45:17.368511011 -0700
@@ -17,11 +17,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to get a row from a row block via <a href="/hack/reference/class/AsyncMysqlRowBlock/getRow/"><code>AsyncMysqlRowBlock::getRow</code></a>. You pass an <code>int</code> specifying the row of the row block you want.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\GetRow;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.isEmpty.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.isEmpty.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.isEmpty.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.isEmpty.html 2019-09-27 15:45:17.372511064 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example uses <a href="/hack/reference/class/AsyncMysqlRowBlock/isEmpty/"><code>AsyncMysqlRowBlock::isEmpty</code></a> to determine whether there are actually any row_blocks returned from the call to <code>AsyncMysqlRowBlock::rowBlocks()</code> method</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\IsEmpty;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.isNull.html build/final/api-html/hack/class.AsyncMysqlRowBlock.method.isNull.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowBlock.method.isNull.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowBlock.method.isNull.html 2019-09-27 15:45:17.376511119 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example uses <a href="/hack/reference/class/AsyncMysqlRowBlock/isNull/"><code>AsyncMysqlRowBlock::isNull</code></a> to check if a field value is <code>null</code> (e.g., if a field was set in SQL to something like <code>age SMALLINT NULL</code>, then that field <em>could</em> be <code>null</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowBlock\IsNull;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.current.html build/final/api-html/hack/class.AsyncMysqlRowIterator.method.current.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.current.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowIterator.method.current.html 2019-09-27 15:45:17.412511601 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to use <a href="/hack/reference/class/AsyncMysqlRowIterator/current/"><code>AsyncMysqlRowIterator::current</code></a> to get a field value from the iterator.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowIt\Current;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.key.html build/final/api-html/hack/class.AsyncMysqlRowIterator.method.key.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.key.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowIterator.method.key.html 2019-09-27 15:45:17.416511655 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to use <a href="/hack/reference/class/AsyncMysqlRowIterator/key/"><code>AsyncMysqlRowIterator::key</code></a> to get the actual <code>int</code> key pointing to the field within the row iterator.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowIt\Key;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.next.html build/final/api-html/hack/class.AsyncMysqlRowIterator.method.next.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.next.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowIterator.method.next.html 2019-09-27 15:45:17.420511708 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to use <a href="/hack/reference/class/AsyncMysqlRowIterator/next/"><code>AsyncMysqlRowIterator::next</code></a> to move on to the next field in the iterator, assuming one exists.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowIt\Next;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.rewind.html build/final/api-html/hack/class.AsyncMysqlRowIterator.method.rewind.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.rewind.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowIterator.method.rewind.html 2019-09-27 15:45:17.424511763 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlRowIterator/rewind/"><code>AsyncMysqlRowIterator::rewind</code></a> to get back to the beginning of the iterator as necessary.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowIt\Rewind;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.valid.html build/final/api-html/hack/class.AsyncMysqlRowIterator.method.valid.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRowIterator.method.valid.html 2019-09-27 12:30:15.778833722 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRowIterator.method.valid.html 2019-09-27 15:45:17.428511815 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlRowIterator/valid/"><code>AsyncMysqlRowIterator::valid</code></a> to determine whether the current iterator is still valid (i.e., there was actually something to iterate over, or we have reached the end).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\RowIt\Valid;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.at.html build/final/api-html/hack/class.AsyncMysqlRow.method.at.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.at.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.at.html 2019-09-27 15:45:17.264509615 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <a href="/hack/reference/class/AsyncMysqlRow/at/"><code>AsyncMysqlRow::at</code></a> to get a field value from the resulting row block. In this case, we get a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> of <a href="/hack/reference/class/AsyncMysqlRowBlock/"><code>AsyncMysqlRowBlock</code></a>s, then the first row block in that <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>, then the first <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a> in that row block. Finally, we get the value of the <code>age</code> field in that row.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\At;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.count.html build/final/api-html/hack/class.AsyncMysqlRow.method.count.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.count.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.count.html 2019-09-27 15:45:17.268509669 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <code>AsyncMysqlRow:count</code> to get the number of fields in the given row.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\Count;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.fieldType.html build/final/api-html/hack/class.AsyncMysqlRow.method.fieldType.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.fieldType.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.fieldType.html 2019-09-27 15:45:17.280509829 -0700
@@ -150,11 +150,7 @@
</div>
<p>So, in our example, 253 would be returned for the <code>email</code> field.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\FieldType;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsDouble.html build/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsDouble.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsDouble.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsDouble.html 2019-09-27 15:45:17.288509937 -0700
@@ -30,11 +30,7 @@
</div>
<p>In this case, we are actually getting a field that is an <code>int</code> (or <code>SMALLINT</code>). But there is an automatic conversion to a <code>float</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\GFAsDouble;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsInt.html build/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsInt.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsInt.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsInt.html 2019-09-27 15:45:17.292509992 -0700
@@ -30,11 +30,7 @@
</div>
<p>In this case, we are actually getting a field that is an <code>int</code> (or <code>SMALLINT</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\GFAsInt;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsString.html build/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsString.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsString.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.getFieldAsString.html 2019-09-27 15:45:17.296510044 -0700
@@ -27,11 +27,7 @@
</div>
<p>In this case, we are actually getting a field that is a <code>string</code> (or <code>VARCHAR</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\GFAsString;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getIterator.html build/final/api-html/hack/class.AsyncMysqlRow.method.getIterator.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.getIterator.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.getIterator.html 2019-09-27 15:45:17.296510044 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to get an iterator of an <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a> via <code>getIterator()</code>. Getting an iterator of an <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a> gives you an <a href="/hack/reference/class/AsyncMysqlRowIterator/"><code>AsyncMysqlRowIterator</code></a>, where each key of that iterator is an <code>int</code> representing the key to the field of the <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a>, and each value from <code>current()</code> is the value of the field of that <a href="/hack/reference/class/AsyncMysqlRow/"><code>AsyncMysqlRow</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\GetIterator;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.isNull.html build/final/api-html/hack/class.AsyncMysqlRow.method.isNull.html
--- ../tmp-build-old/final/api-html/hack/class.AsyncMysqlRow.method.isNull.html 2019-09-27 12:30:15.774833679 -0700
+++ build/final/api-html/hack/class.AsyncMysqlRow.method.isNull.html 2019-09-27 15:45:17.300510098 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example uses <a href="/hack/reference/class/AsyncMysqlRow/isNull/"><code>AsyncMysqlRow::isNull</code></a> to check if a field value is <code>null</code> (e.g., if a field was set in SQL to something like <code>age SMALLINT NULL</code>, then that field <em>could</em> be <code>null</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\AsyncMysql\Row\IsNull;
-
-require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/../../__includes/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\API\Examples\AsyncMysql\ConnectionInfo as CI;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.ImmMap.method.__toString.html build/final/api-html/hack/class.HH.ImmMap.method.__toString.html
--- ../tmp-build-old/final/api-html/hack/class.HH.ImmMap.method.__toString.html 2019-09-27 12:30:15.790833853 -0700
+++ build/final/api-html/hack/class.HH.ImmMap.method.__toString.html 2019-09-27 15:45:17.988519330 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The string version of an <a href="/hack/reference/class/HH.ImmMap/"><code>ImmMap</code></a> is always <code>&quot;ImmMap&quot;</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\ImmMap\__toString;
-
-$im = ImmMap {'a' =&gt; 1, 'b' =&gt; 2, 'c' =&gt; 3};
+<pre><code class="language-PHP">$im = ImmMap {'a' =&gt; 1, 'b' =&gt; 2, 'c' =&gt; 3};
echo $im.&quot;\n&quot;;
$im3 = ImmMap {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.ImmSet.method.__toString.html build/final/api-html/hack/class.HH.ImmSet.method.__toString.html
--- ../tmp-build-old/final/api-html/hack/class.HH.ImmSet.method.__toString.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.ImmSet.method.__toString.html 2019-09-27 15:45:18.348524162 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The string version of an <a href="/hack/reference/class/HH.ImmSet/"><code>ImmSet</code></a> is always <code>&quot;ImmSet&quot;</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\ImmSet\__toString;
-
-$is = ImmSet {1, 2, 3};
+<pre><code class="language-PHP">$is = ImmSet {1, 2, 3};
echo $is.&quot;\n&quot;;
$is2 = ImmSet {'a', 'b', 'c'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.ImmVector.method.__toString.html build/final/api-html/hack/class.HH.ImmVector.method.__toString.html
--- ../tmp-build-old/final/api-html/hack/class.HH.ImmVector.method.__toString.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.ImmVector.method.__toString.html 2019-09-27 15:45:18.696528831 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The string version of a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> is always <code>&quot;Vector&quot;</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\__toString;
-
-$v = Vector {1, 2, 3};
+<pre><code class="language-PHP">$v = Vector {1, 2, 3};
echo $v.&quot;\n&quot;;
$v2 = Vector {'a', 'b', 'c'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.addAll.html build/final/api-html/hack/class.HH.Map.method.addAll.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.addAll.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.addAll.html 2019-09-27 15:45:19.192535486 -0700
@@ -22,11 +22,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example adds a collection of key-value pairs to the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> <code>$m</code> and also adds multiple collections of key-value pairs to <code>$m</code> through chaining. Since <a href="/hack/reference/class/HH.Map/addAll/"><code>Map::addAll()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$m</code> itself, you can chain a bunch of <code>addAll()</code> calls together.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\AddAll;
-
-$m = Map {};
+<pre><code class="language-PHP">$m = Map {};
// Add all the key-value pairs in an array
$m-&gt;addAll(array(Pair {'red', '#ff0000'}));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.add.html build/final/api-html/hack/class.HH.Map.method.add.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.add.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.add.html 2019-09-27 15:45:19.188535433 -0700
@@ -22,11 +22,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example adds a single key-value pair to the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> <code>$m</code> and also adds multiple key-value pairs to <code>$m</code> through chaining. Since <a href="/hack/reference/class/HH.Map/add/"><code>Map::add()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$m</code> itself, you can chain a bunch of <code>add()</code> calls together, and that will add all those values to <code>$m</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Add;
-
-$m = Map {};
+<pre><code class="language-PHP">$m = Map {};
$m-&gt;add(Pair {'red', '#ff0000'});
var_dump($m);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.at.html build/final/api-html/hack/class.HH.Map.method.at.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.at.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.at.html 2019-09-27 15:45:19.196535540 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example prints the values at the keys <code>red</code> and <code>green</code> in the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\At\ExistingKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
@@ -46,11 +42,7 @@
</div>
<p>This example throws an <code>OutOfBoundsException</code> because the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> has no key 'blurple':</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\At\MissingKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.clear.html build/final/api-html/hack/class.HH.Map.method.clear.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.clear.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.clear.html 2019-09-27 15:45:19.200535595 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Clear;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.concat.html build/final/api-html/hack/class.HH.Map.method.concat.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.concat.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.concat.html 2019-09-27 15:45:19.204535647 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example creates new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>s by concatenating the values in a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> with <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>s:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Concat;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.__construct.html build/final/api-html/hack/class.HH.Map.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.__construct.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.__construct.html 2019-09-27 15:45:19.168535165 -0700
@@ -17,11 +17,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to create a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> from various <a href="/hack/reference/interface/HH.KeyedTraversable/"><code>KeyedTraversable</code></a>s:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\__construct;
-
-// Create a new string-keyed Map from an associative array
+<pre><code class="language-PHP">// Create a new string-keyed Map from an associative array
$m = new Map(array(
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
@@ -61,11 +57,7 @@
</div>
<p>This example shows how passing <code>null</code> to the constructor creates an empty <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\__construct\FromNull;
-
-// An empty Map is created if null is provided
+<pre><code class="language-PHP">// An empty Map is created if null is provided
$m = new Map(null);
var_dump($m);
</code></pre>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.contains.html build/final/api-html/hack/class.HH.Map.method.contains.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.contains.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.contains.html 2019-09-27 15:45:19.204535647 -0700
@@ -17,11 +17,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Contains;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.containsKey.html build/final/api-html/hack/class.HH.Map.method.containsKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.containsKey.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.containsKey.html 2019-09-27 15:45:19.208535701 -0700
@@ -17,11 +17,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ContainsKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.count.html build/final/api-html/hack/class.HH.Map.method.count.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.count.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.count.html 2019-09-27 15:45:19.208535701 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Count;
-
-$m = Map {};
+<pre><code class="language-PHP">$m = Map {};
var_dump($m-&gt;count());
$m = Map {
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.differenceByKey.html build/final/api-html/hack/class.HH.Map.method.differenceByKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.differenceByKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.differenceByKey.html 2019-09-27 15:45:19.212535755 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>differenceByKey</code> can be used to get a new <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> with some keys excluded:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\DifferenceByKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.filter.html build/final/api-html/hack/class.HH.Map.method.filter.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.filter.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.filter.html 2019-09-27 15:45:19.216535809 -0700
@@ -23,11 +23,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>filter</code> returns a new <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> containing only the values (and their corresponding keys) for which <code>$callback</code> returned <code>true</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Filter;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.filterWithKey.html build/final/api-html/hack/class.HH.Map.method.filterWithKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.filterWithKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.filterWithKey.html 2019-09-27 15:45:19.224535916 -0700
@@ -24,11 +24,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>filterWithKey</code> allows you to use an element's value and corresponding key to determine whether to include it in the filtered <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\FilterWithKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.firstKey.html build/final/api-html/hack/class.HH.Map.method.firstKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.firstKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.firstKey.html 2019-09-27 15:45:19.228535970 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example gets the first key from <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>. An empty <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> will return <code>null</code> as its first key.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\FirstKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.firstValue.html build/final/api-html/hack/class.HH.Map.method.firstValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.firstValue.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.firstValue.html 2019-09-27 15:45:19.232536023 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example gets the first value from a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>. An empty <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> will return <code>null</code> as its first value.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\FirstValue;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.fromItems.html build/final/api-html/hack/class.HH.Map.method.fromItems.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.fromItems.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.fromItems.html 2019-09-27 15:45:19.240536130 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> can be created from any <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a> of key-value pairs:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\FromItems;
-
-// Create a new Map from an array of key-value pairs
+<pre><code class="language-PHP">// Create a new Map from an array of key-value pairs
$m = Map::fromItems(array(
Pair {'red', '#ff0000'},
Pair {'green', '#00ff00'},
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.get.html build/final/api-html/hack/class.HH.Map.method.get.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.get.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.get.html 2019-09-27 15:45:19.240536130 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>get</code> can be used to access the value at a key that may not exist:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Get;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.getIterator.html build/final/api-html/hack/class.HH.Map.method.getIterator.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.getIterator.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.getIterator.html 2019-09-27 15:45:19.244536184 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to get a <a href="/hack/reference/interface/HH.KeyedIterator/"><code>KeyedIterator</code></a> from a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> and how to consume it:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\GetIterator;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.immutable.html build/final/api-html/hack/class.HH.Map.method.immutable.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.immutable.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.immutable.html 2019-09-27 15:45:19.244536184 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Immutable;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.isEmpty.html build/final/api-html/hack/class.HH.Map.method.isEmpty.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.isEmpty.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.isEmpty.html 2019-09-27 15:45:19.248536238 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\IsEmpty;
-
-$m = Map {};
+<pre><code class="language-PHP">$m = Map {};
var_dump($m-&gt;isEmpty());
$m = Map {
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.items.html build/final/api-html/hack/class.HH.Map.method.items.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.items.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.items.html 2019-09-27 15:45:19.248536238 -0700
@@ -12,11 +12,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>items()</code> returns an <a href="/hack/reference/interface/HH.Iterable/"><code>Iterable</code></a> view of the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>. The <a href="/hack/reference/interface/HH.Iterable/"><code>Iterable</code></a> will produce the key-value pairs of the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> at the time it's iterated.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Items;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.keys.html build/final/api-html/hack/class.HH.Map.method.keys.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.keys.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.keys.html 2019-09-27 15:45:19.252536292 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Keys;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.lastKey.html build/final/api-html/hack/class.HH.Map.method.lastKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.lastKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.lastKey.html 2019-09-27 15:45:19.252536292 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>lastKey()</code> can be used even when a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> may be empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\LastKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.lastValue.html build/final/api-html/hack/class.HH.Map.method.lastValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.lastValue.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.lastValue.html 2019-09-27 15:45:19.256536345 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>lastValue()</code> can be used even when a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> may be empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\LastValue;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.lazy.html build/final/api-html/hack/class.HH.Map.method.lazy.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.lazy.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.lazy.html 2019-09-27 15:45:19.264536453 -0700
@@ -15,11 +15,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows you how to use <code>lazy()</code> on a rather large <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> and the time for both a <em>strict</em> and <em>non-strict</em> version. Since we only need 5 of the elements in the end, the lazy view actually allows us to stop after we meet our required 5 without having to actually filter and allocate all 1000000 elements up front.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Lazy;
-
-$map = new Map(range(0, 1000000));
+<pre><code class="language-PHP">$map = new Map(range(0, 1000000));
$s = microtime(true);
$non_lazy = $map-&gt;filter($x ==&gt; $x % 2 === 0)-&gt;take(5);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.map.html build/final/api-html/hack/class.HH.Map.method.map.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.map.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.map.html 2019-09-27 15:45:19.268536507 -0700
@@ -23,11 +23,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>In this example the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>'s values are mapped to the same type (<code>string</code>s):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Map\Strings;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
@@ -67,11 +63,7 @@
</div>
<p>In this example the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>'s values are mapped to a different type (<code>int</code>s):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Map\Ints;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.mapWithKey.html build/final/api-html/hack/class.HH.Map.method.mapWithKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.mapWithKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.mapWithKey.html 2019-09-27 15:45:19.272536560 -0700
@@ -24,11 +24,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>mapWithKey</code> can be used to create a new <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> based on <code>$m</code>'s keys and values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\MapWithKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.remove.html build/final/api-html/hack/class.HH.Map.method.remove.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.remove.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.remove.html 2019-09-27 15:45:19.276536614 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Since <a href="/hack/reference/class/HH.Map/remove/"><code>Map::remove()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$m</code> itself, you can chain a bunch of <code>remove()</code> calls together.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Remove;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.removeKey.html build/final/api-html/hack/class.HH.Map.method.removeKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.removeKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.removeKey.html 2019-09-27 15:45:19.284536722 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Since <a href="/hack/reference/class/HH.Map/removeKey/"><code>Map::removeKey()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$m</code> itself, you can chain a bunch of <code>removeKey()</code> calls together.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\RemoveKey;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.reserve.html build/final/api-html/hack/class.HH.Map.method.reserve.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.reserve.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.reserve.html 2019-09-27 15:45:19.284536722 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example reserves space for 1000 elements and then fills the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> with 1000 integer keys and values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Reserve;
-
-const int MAP_SIZE = 1000;
+<pre><code class="language-PHP">const int MAP_SIZE = 1000;
$m = Map {};
$m-&gt;reserve(MAP_SIZE);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.setAll.html build/final/api-html/hack/class.HH.Map.method.setAll.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.setAll.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.setAll.html 2019-09-27 15:45:19.300536936 -0700
@@ -24,11 +24,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>setAll()</code> can be used with any <a href="/hack/reference/interface/HH.KeyedTraversable/"><code>KeyedTraversable</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\SetAll;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.set.html build/final/api-html/hack/class.HH.Map.method.set.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.set.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.set.html 2019-09-27 15:45:19.296536882 -0700
@@ -26,11 +26,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Since <a href="/hack/reference/class/HH.Map/set/"><code>Map::set()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$m</code> itself, you can chain a bunch of <code>set()</code> calls together.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Set;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.skip.html build/final/api-html/hack/class.HH.Map.method.skip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.skip.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.skip.html 2019-09-27 15:45:19.304536989 -0700
@@ -20,11 +20,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Skip;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.slice.html build/final/api-html/hack/class.HH.Map.method.slice.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.slice.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.slice.html 2019-09-27 15:45:19.312537097 -0700
@@ -24,11 +24,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Slice;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.take.html build/final/api-html/hack/class.HH.Map.method.take.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.take.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.take.html 2019-09-27 15:45:19.316537151 -0700
@@ -17,11 +17,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Take;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toArray.html build/final/api-html/hack/class.HH.Map.method.toArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toArray.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toArray.html 2019-09-27 15:45:19.324537258 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToArray;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toImmMap.html build/final/api-html/hack/class.HH.Map.method.toImmMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toImmMap.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toImmMap.html 2019-09-27 15:45:19.328537311 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToImmMap;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toImmSet.html build/final/api-html/hack/class.HH.Map.method.toImmSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toImmSet.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toImmSet.html 2019-09-27 15:45:19.328537311 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> to an <code>ImmSet</code> also removes duplicate values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToImmSet;
-
-// This Map contains repetitions of the hex codes for 'red' and 'blue'
+<pre><code class="language-PHP">// This Map contains repetitions of the hex codes for 'red' and 'blue'
$m = Map {
'red' =&gt; '#ff0000',
'also red' =&gt; '#ff0000',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toImmVector.html build/final/api-html/hack/class.HH.Map.method.toImmVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toImmVector.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toImmVector.html 2019-09-27 15:45:19.336537420 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>toImmVector</code> returns an immutable copy of the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>'s values. Mutating the <code>Vector</code> of values doesn't affect the original <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> and vice-versa.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToImmVector;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toKeysArray.html build/final/api-html/hack/class.HH.Map.method.toKeysArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toKeysArray.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toKeysArray.html 2019-09-27 15:45:19.336537420 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToKeysArray;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toMap.html build/final/api-html/hack/class.HH.Map.method.toMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toMap.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toMap.html 2019-09-27 15:45:19.340537472 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>toMap</code> returns a deep copy of the <code>Map</code> <code>$m</code>. Mutating the new <code>Map</code> <code>$m2</code> doesn't affect the original <code>Map</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToMap;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toSet.html build/final/api-html/hack/class.HH.Map.method.toSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toSet.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toSet.html 2019-09-27 15:45:19.344537526 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> to a <code>Set</code> also removes duplicate values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToSet;
-
-// This Map contains repetitions of the hex codes for 'red' and 'blue'
+<pre><code class="language-PHP">// This Map contains repetitions of the hex codes for 'red' and 'blue'
$m = Map {
'red' =&gt; '#ff0000',
'also red' =&gt; '#ff0000',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.__toString.html build/final/api-html/hack/class.HH.Map.method.__toString.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.__toString.html 2019-09-27 12:30:15.794833896 -0700
+++ build/final/api-html/hack/class.HH.Map.method.__toString.html 2019-09-27 15:45:19.176535272 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The string version of a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> is always <code>&quot;Map&quot;</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\__toString;
-
-$m = Map {'a' =&gt; 1, 'b' =&gt; 2, 'c' =&gt; 3};
+<pre><code class="language-PHP">$m = Map {'a' =&gt; 1, 'b' =&gt; 2, 'c' =&gt; 3};
echo $m.&quot;\n&quot;;
$m3 = Map {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toValuesArray.html build/final/api-html/hack/class.HH.Map.method.toValuesArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toValuesArray.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toValuesArray.html 2019-09-27 15:45:19.348537580 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToValuesArray;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toVector.html build/final/api-html/hack/class.HH.Map.method.toVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.toVector.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.toVector.html 2019-09-27 15:45:19.348537580 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>toVector()</code> returns a <code>Vector</code> of <code>$m</code>'s values, so mutating this new <code>Vector</code> doesn't affect the original <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\ToVector;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.values.html build/final/api-html/hack/class.HH.Map.method.values.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.values.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.values.html 2019-09-27 15:45:19.352537634 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>values()</code> is identical to <a href="/hack/reference/class/HH.Map/toVector/"><code>toVector()</code></a>. It returns a new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> of <code>$m</code>'s values, so mutating this new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> doesn't affect the original <a href="/hack/reference/class/HH.Map/"><code>Map</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Values;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Map.method.zip.html build/final/api-html/hack/class.HH.Map.method.zip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Map.method.zip.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Map.method.zip.html 2019-09-27 15:45:19.360537741 -0700
@@ -25,11 +25,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>zip</code> combines the values of the <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> and another <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>. The resulting <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> <code>$labeled_colors</code> has three elements because <code>$labels</code> doesn't have a fourth element to pair with <code>$m</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Map\Zip;
-
-$m = Map {
+<pre><code class="language-PHP">$m = Map {
'red' =&gt; '#ff0000',
'green' =&gt; '#00ff00',
'blue' =&gt; '#0000ff',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.at.html build/final/api-html/hack/class.HH.Pair.method.at.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.at.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.at.html 2019-09-27 15:45:19.568540533 -0700
@@ -21,11 +21,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example prints the first and second values of the <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\At\ExistingKey;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Print the first element
var_dump($p-&gt;at(0));
@@ -42,11 +38,7 @@
</div>
<p>This example throws an <code>OutOfBoundsException</code> because a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> only has the indexes <code>0</code> and <code>1</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\At\MissingKey;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Index 2 doesn't exist because pairs always have exactly two elements
var_dump($p-&gt;at(2));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.concat.html build/final/api-html/hack/class.HH.Pair.method.concat.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.concat.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.concat.html 2019-09-27 15:45:19.576540639 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example creates a new <a href="/hack/reference/class/HH.ImmVector/"><code>ImmVector</code></a> by concatenating a <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a> with the values in the <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Concat;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$v = $p-&gt;concat(array(100, 'bar'));
var_dump($v);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.containsKey.html build/final/api-html/hack/class.HH.Pair.method.containsKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.containsKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.containsKey.html 2019-09-27 15:45:19.580540693 -0700
@@ -19,11 +19,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ContainsKey;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Prints &quot;true&quot;, since index 0 is the first value
var_dump($p-&gt;containsKey(0));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.count.html build/final/api-html/hack/class.HH.Pair.method.count.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.count.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.count.html 2019-09-27 15:45:19.580540693 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This shows that a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> always has a count of <code>2</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Count;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;count());
$p = Pair {null, null};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.filter.html build/final/api-html/hack/class.HH.Pair.method.filter.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.filter.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.filter.html 2019-09-27 15:45:19.584540747 -0700
@@ -20,11 +20,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Filter;
-
-$p = Pair {null, -1.5};
+<pre><code class="language-PHP">$p = Pair {null, -1.5};
$v = $p-&gt;filter($value ==&gt; $value !== null);
var_dump($v);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.firstKey.html build/final/api-html/hack/class.HH.Pair.method.firstKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.firstKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.firstKey.html 2019-09-27 15:45:19.592540854 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\FirstKey;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;firstKey());
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.firstValue.html build/final/api-html/hack/class.HH.Pair.method.firstValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.firstValue.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.firstValue.html 2019-09-27 15:45:19.592540854 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\FirstValue;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;firstValue());
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.get.html build/final/api-html/hack/class.HH.Pair.method.get.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.get.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.get.html 2019-09-27 15:45:19.596540908 -0700
@@ -18,11 +18,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Get;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Print the first value
var_dump($p-&gt;get(0));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.getIterator.html build/final/api-html/hack/class.HH.Pair.method.getIterator.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.getIterator.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.getIterator.html 2019-09-27 15:45:19.596540908 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to get an iterator from a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> and how to consume it:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\GetIterator;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Get a KeyedIterator for the Pair
$iterator = $p-&gt;getIterator();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.isEmpty.html build/final/api-html/hack/class.HH.Pair.method.isEmpty.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.isEmpty.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.isEmpty.html 2019-09-27 15:45:19.600540962 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> can never be empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\IsEmpty;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;isEmpty());
$p = Pair {null, -1.5};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.items.html build/final/api-html/hack/class.HH.Pair.method.items.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.items.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.items.html 2019-09-27 15:45:19.600540962 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Items;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Get an Iterable view of the Pair
$iterable = $p-&gt;items();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.keys.html build/final/api-html/hack/class.HH.Pair.method.keys.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.keys.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.keys.html 2019-09-27 15:45:19.604541016 -0700
@@ -13,11 +13,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Keys;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;keys());
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.lastKey.html build/final/api-html/hack/class.HH.Pair.method.lastKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.lastKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.lastKey.html 2019-09-27 15:45:19.608541069 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\LastKey;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;lastKey());
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.lastValue.html build/final/api-html/hack/class.HH.Pair.method.lastValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.lastValue.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.lastValue.html 2019-09-27 15:45:19.608541069 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\LastValue;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;lastValue());
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.linearSearch.html build/final/api-html/hack/class.HH.Pair.method.linearSearch.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.linearSearch.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.linearSearch.html 2019-09-27 15:45:19.620541231 -0700
@@ -17,11 +17,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\LinearSearch;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Prints 0 (the index of the first value)
var_dump($p-&gt;linearSearch('foo'));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.map.html build/final/api-html/hack/class.HH.Pair.method.map.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.map.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.map.html 2019-09-27 15:45:19.624541283 -0700
@@ -21,11 +21,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>In this example the <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a>'s values are mapped to <code>0</code> if they're <code>NULL</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Map\Strings;
-
-$p = Pair {null, -1.5};
+<pre><code class="language-PHP">$p = Pair {null, -1.5};
$immutable_v = $p-&gt;map($value ==&gt; {
if ($value === null) {
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.skip.html build/final/api-html/hack/class.HH.Pair.method.skip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.skip.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.skip.html 2019-09-27 15:45:19.640541498 -0700
@@ -22,11 +22,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Skip;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Skipping 0 returns an ImmVector of both values
var_dump($p-&gt;skip(0));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.slice.html build/final/api-html/hack/class.HH.Pair.method.slice.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.slice.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.slice.html 2019-09-27 15:45:19.652541660 -0700
@@ -23,11 +23,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Slice;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Get an ImmVector of both values
var_dump($p-&gt;slice(0, 2));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.take.html build/final/api-html/hack/class.HH.Pair.method.take.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.take.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.take.html 2019-09-27 15:45:19.656541713 -0700
@@ -20,11 +20,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Take;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Taking 0 returns an empty ImmVector
var_dump($p-&gt;take(0));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toArray.html build/final/api-html/hack/class.HH.Pair.method.toArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toArray.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toArray.html 2019-09-27 15:45:19.664541820 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToArray;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$array = $p-&gt;toArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toImmMap.html build/final/api-html/hack/class.HH.Pair.method.toImmMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toImmMap.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toImmMap.html 2019-09-27 15:45:19.668541875 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToImmMap;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$imm_map = $p-&gt;toImmMap();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toImmSet.html build/final/api-html/hack/class.HH.Pair.method.toImmSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toImmSet.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toImmSet.html 2019-09-27 15:45:19.676541981 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> to an <code>ImmSet</code> also removes duplicate values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToImmSet;
-
-// This Pair contains 'foo' twice
+<pre><code class="language-PHP">// This Pair contains 'foo' twice
$p = Pair {'foo', 'foo'};
$imm_set = $p-&gt;toImmSet();
@@ -30,11 +26,7 @@
</div>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> to an <code>ImmSet</code> will throw a fatal error if the <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> contains a value that's not a <code>string</code> or an <code>int</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToImmSet;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Fatal error will be thrown here
$imm_set = $p-&gt;toImmSet();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toImmVector.html build/final/api-html/hack/class.HH.Pair.method.toImmVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toImmVector.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toImmVector.html 2019-09-27 15:45:19.676541981 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToImmVector;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$immutable_v = $p-&gt;toImmVector();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toKeysArray.html build/final/api-html/hack/class.HH.Pair.method.toKeysArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toKeysArray.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toKeysArray.html 2019-09-27 15:45:19.680542035 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToKeysArray;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
var_dump($p-&gt;toKeysArray());
</code></pre>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toMap.html build/final/api-html/hack/class.HH.Pair.method.toMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toMap.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toMap.html 2019-09-27 15:45:19.680542035 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToMap;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$map = $p-&gt;toMap();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toSet.html build/final/api-html/hack/class.HH.Pair.method.toSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toSet.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toSet.html 2019-09-27 15:45:19.684542089 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> to a <code>Set</code> also removes duplicate values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Set;
-
-// This Pair contains 'foo' twice
+<pre><code class="language-PHP">// This Pair contains 'foo' twice
$p = Pair {'foo', 'foo'};
$s = $p-&gt;toSet();
@@ -30,11 +26,7 @@
</div>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> to a <code>Set</code> will throw a fatal error if the <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> contains a value that's not a <code>string</code> or an <code>int</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Set;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
// Fatal error will be thrown here
$s = $p-&gt;toSet();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.__toString.html build/final/api-html/hack/class.HH.Pair.method.__toString.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.__toString.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.__toString.html 2019-09-27 15:45:19.564540478 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The string version of a <a href="/hack/reference/class/HH.Pair/"><code>Pair</code></a> is always <code>&quot;Pair&quot;</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\__toString;
-
-$p = Pair {-1, 5};
+<pre><code class="language-PHP">$p = Pair {-1, 5};
echo $p.&quot;\n&quot;;
$p2 = Pair {'foo', 'bar'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toValuesArray.html build/final/api-html/hack/class.HH.Pair.method.toValuesArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toValuesArray.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toValuesArray.html 2019-09-27 15:45:19.688542143 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToValuesArray;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$array = $p-&gt;toValuesArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toVector.html build/final/api-html/hack/class.HH.Pair.method.toVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.toVector.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.toVector.html 2019-09-27 15:45:19.688542143 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\ToVector;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$v = $p-&gt;toVector();
var_dump($v);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.values.html build/final/api-html/hack/class.HH.Pair.method.values.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.values.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.values.html 2019-09-27 15:45:19.692542196 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Values;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$immutable_v = $p-&gt;values();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.zip.html build/final/api-html/hack/class.HH.Pair.method.zip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Pair.method.zip.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Pair.method.zip.html 2019-09-27 15:45:19.696542250 -0700
@@ -22,11 +22,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Pair\Zip;
-
-$p = Pair {'foo', -1.5};
+<pre><code class="language-PHP">$p = Pair {'foo', -1.5};
$labels = Vector {'First Value', 'Second Value'};
$labeled = $p-&gt;zip($labels);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.addAll.html build/final/api-html/hack/class.HH.Set.method.addAll.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.addAll.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.addAll.html 2019-09-27 15:45:20.052547027 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example adds a collection of values to the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> <code>$s</code> and also adds multiple collections of values to <code>$s</code> through chaining. Since <a href="/hack/reference/class/HH.Set/addAll/"><code>Set::addAll()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$s</code> itself, you can chain a bunch of <code>addAll()</code> calls together, and that will add all those collection of values to <code>$s</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\AddAll;
-
-$s = Set {};
+<pre><code class="language-PHP">$s = Set {};
// Add all the values in a Vector
$s-&gt;addAll(Vector {'a', 'b'});
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.addAllKeysOf.html build/final/api-html/hack/class.HH.Set.method.addAllKeysOf.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.addAllKeysOf.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.addAllKeysOf.html 2019-09-27 15:45:20.056547081 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example adds <code>string</code> keys from a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> to a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> as its values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\AddAllKeysOf\Strings;
-
-$fruit_calories = Map {
+<pre><code class="language-PHP">$fruit_calories = Map {
'apple' =&gt; 95,
'orange' =&gt; 45,
};
@@ -56,11 +52,7 @@
</div>
<p>This example adds <code>int</code> keys from a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> to a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> as its values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\AddAllKeysOf\Ints;
-
-$uploaders_by_id = Map {
+<pre><code class="language-PHP">$uploaders_by_id = Map {
4993063 =&gt; 'Amy Smith',
9361760 =&gt; 'John Doe',
};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.add.html build/final/api-html/hack/class.HH.Set.method.add.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.add.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.add.html 2019-09-27 15:45:20.048546973 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example adds a single value to the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> <code>$s</code> and also adds multiple values to <code>$s</code> through chaining. Since <a href="/hack/reference/class/HH.Set/add/"><code>Set::add()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$s</code> itself, you can chain a bunch of <code>add()</code> calls together, and that will add all those values to <code>$s</code>. Notice that adding a value that already exists in the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> has no effect.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Add;
-
-$s = Set {};
+<pre><code class="language-PHP">$s = Set {};
$s-&gt;add('red');
var_dump($s);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.clear.html build/final/api-html/hack/class.HH.Set.method.clear.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.clear.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.clear.html 2019-09-27 15:45:20.060547134 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Clear;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
var_dump($s);
$s-&gt;clear();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.concat.html build/final/api-html/hack/class.HH.Set.method.concat.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.concat.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.concat.html 2019-09-27 15:45:20.064547188 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example creates new <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>s by concatenating other <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>s. Unlike <a href="/hack/reference/class/HH.Set/addAll/"><code>Set::addAll()</code></a> this method returns a new <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> (not a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Concat;
-
-$s = Set {'red'};
+<pre><code class="language-PHP">$s = Set {'red'};
// Add all the values in a Vector
$s1 = $s-&gt;concat(Vector {'green', 'blue'});
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.__construct.html build/final/api-html/hack/class.HH.Set.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.__construct.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.__construct.html 2019-09-27 15:45:20.032546758 -0700
@@ -17,11 +17,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to create a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> from various <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>s. Notice that duplicate values in the input <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>s only appear once in the output <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\__construct;
-
-// Create a new Set from an array
+<pre><code class="language-PHP">// Create a new Set from an array
$s = new Set(array('red', 'green', 'red', 'blue', 'blue', 'yellow'));
var_dump($s);
@@ -65,11 +61,7 @@
</div>
<p>This example shows how passing <code>null</code> to the constructor creates an empty <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\__construct\FromNull;
-
-// An empty Set is created if null is provided
+<pre><code class="language-PHP">// An empty Set is created if null is provided
$s = new Set(null);
var_dump($s);
</code></pre>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.contains.html build/final/api-html/hack/class.HH.Set.method.contains.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.contains.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.contains.html 2019-09-27 15:45:20.068547241 -0700
@@ -16,11 +16,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Contains;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Prints &quot;true&quot;, since $s contains &quot;red&quot;
var_dump($s-&gt;contains('red'));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.count.html build/final/api-html/hack/class.HH.Set.method.count.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.count.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.count.html 2019-09-27 15:45:20.068547241 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Count;
-
-$s = Set {};
+<pre><code class="language-PHP">$s = Set {};
var_dump($s-&gt;count());
$s = Set {'red', 'green', 'blue', 'yellow'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.filter.html build/final/api-html/hack/class.HH.Set.method.filter.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.filter.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.filter.html 2019-09-27 15:45:20.072547296 -0700
@@ -20,11 +20,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Filter;
-
-$colors = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$colors = Set {'red', 'green', 'blue', 'yellow'};
// Create a Set of colors that contain the letter 'l'
$l_colors = $colors-&gt;filter($color ==&gt; strpos($color, 'l') !== false);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.firstKey.html build/final/api-html/hack/class.HH.Set.method.firstKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.firstKey.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.firstKey.html 2019-09-27 15:45:20.084547456 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>firstKey</code> returns the first value in the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>. An empty <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> will return <code>null</code> as its first key.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\FirstKey;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
var_dump($s-&gt;firstKey());
$s = Set {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.firstValue.html build/final/api-html/hack/class.HH.Set.method.firstValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.firstValue.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.firstValue.html 2019-09-27 15:45:20.084547456 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example gets the first value from a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>. An empty <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> will return <code>null</code> as its first value.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\FirstValue;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
var_dump($s-&gt;firstValue());
$s = Set {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.fromArrays.html build/final/api-html/hack/class.HH.Set.method.fromArrays.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.fromArrays.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.fromArrays.html 2019-09-27 15:45:20.096547617 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that duplicate values in the input arrays only appear once in the final <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\FromArrays;
-
-$s = Set::fromArrays(
+<pre><code class="language-PHP">$s = Set::fromArrays(
array('red'),
array('green', 'blue'),
array('yellow', 'red'), // Duplicate 'red' will be ignored
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.fromItems.html build/final/api-html/hack/class.HH.Set.method.fromItems.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.fromItems.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.fromItems.html 2019-09-27 15:45:20.100547671 -0700
@@ -18,11 +18,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\FromItems;
-
-// Create a new Set from an array
+<pre><code class="language-PHP">// Create a new Set from an array
$s = Set::fromItems(array('red', 'green', 'red', 'blue', 'blue', 'yellow'));
var_dump($s);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.fromKeysOf.html build/final/api-html/hack/class.HH.Set.method.fromKeysOf.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.fromKeysOf.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.fromKeysOf.html 2019-09-27 15:45:20.108547778 -0700
@@ -17,11 +17,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example creates new <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>s from a string-keyed <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> and associative array:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\FromKeysOf\Strings;
-
-$fruit_calories = Map {
+<pre><code class="language-PHP">$fruit_calories = Map {
'apple' =&gt; 95,
'orange' =&gt; 45,
};
@@ -54,11 +50,7 @@
</div>
<p>This example creates new <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>s from an int-keyed <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> and associative array:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\FromKeysOf\Ints;
-
-$uploaders_by_id = Map {
+<pre><code class="language-PHP">$uploaders_by_id = Map {
4993063 =&gt; 'Amy Smith',
9361760 =&gt; 'John Doe',
};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.getIterator.html build/final/api-html/hack/class.HH.Set.method.getIterator.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.getIterator.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.getIterator.html 2019-09-27 15:45:20.112547832 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to get an iterator from a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> and how to consume it:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\GetIterator;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Get an iterator for the Set of colors
$iterator = $s-&gt;getIterator();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.immutable.html build/final/api-html/hack/class.HH.Set.method.immutable.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.immutable.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.immutable.html 2019-09-27 15:45:20.112547832 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Immutable;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
function expects_immutable(ImmSet&lt;string&gt; $is): void {
\var_dump($is);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.isEmpty.html build/final/api-html/hack/class.HH.Set.method.isEmpty.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.isEmpty.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.isEmpty.html 2019-09-27 15:45:20.116547885 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\IsEmpty;
-
-$s = Set {};
+<pre><code class="language-PHP">$s = Set {};
var_dump($s-&gt;isEmpty());
$s = Set {'red', 'green', 'blue', 'yellow'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.items.html build/final/api-html/hack/class.HH.Set.method.items.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.items.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.items.html 2019-09-27 15:45:20.120547940 -0700
@@ -12,11 +12,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>items()</code> returns an <a href="/hack/reference/interface/HH.Iterable/"><code>Iterable</code></a> view of the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>. The <a href="/hack/reference/interface/HH.Iterable/"><code>Iterable</code></a> will produce the values of the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> at the time it's iterated.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Items;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Get an Iterable view of the Set
$iterable = $s-&gt;items();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.keys.html build/final/api-html/hack/class.HH.Set.method.keys.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.keys.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.keys.html 2019-09-27 15:45:20.124547992 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>keys()</code> returns a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> of the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>'s values because <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>s don't have keys:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Keys;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
var_dump($s-&gt;keys());
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.lastKey.html build/final/api-html/hack/class.HH.Set.method.lastKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.lastKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.lastKey.html 2019-09-27 15:45:20.128548046 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>lastKey</code> returns the last value in the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>. An empty <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> will return <code>null</code> as its last key/value.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\LastKey;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
var_dump($s-&gt;lastKey());
$s = Set {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.lastValue.html build/final/api-html/hack/class.HH.Set.method.lastValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.lastValue.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.lastValue.html 2019-09-27 15:45:20.132548100 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>lastValue()</code> can be used even when a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> may be empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\LastValue;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
var_dump($s-&gt;lastValue());
$s = Set {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.lazy.html build/final/api-html/hack/class.HH.Set.method.lazy.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.lazy.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.lazy.html 2019-09-27 15:45:20.140548208 -0700
@@ -15,11 +15,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows you how to use <code>lazy()</code> on a rather large <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> and the time for both a <em>strict</em> and <em>non-strict</em> version. Since we only need 5 of the elements in the end, the lazy view actually allows us to stop after we meet our required 5 without having to actually filter and allocate all 1000000 elements up front.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Lazy;
-
-$set = new Set(range(0, 1000000));
+<pre><code class="language-PHP">$set = new Set(range(0, 1000000));
$s = microtime(true);
$non_lazy = $set-&gt;filter($x ==&gt; $x % 2 === 0)-&gt;take(5);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.map.html build/final/api-html/hack/class.HH.Set.method.map.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.map.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.map.html 2019-09-27 15:45:20.144548261 -0700
@@ -21,11 +21,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>In this example the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>'s elements are mapped to the same type (<code>string</code>s):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Map\Strings;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$capitalized = $s-&gt;map(fun('strtoupper'));
var_dump($capitalized);
@@ -52,11 +48,7 @@
</div>
<p>In this example the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>'s elements are mapped to a different type (<code>int</code>s):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Map\Ints;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$lengths = $s-&gt;map(fun('strlen'));
var_dump($lengths);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.removeAll.html build/final/api-html/hack/class.HH.Set.method.removeAll.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.removeAll.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.removeAll.html 2019-09-27 15:45:20.156548423 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example removes multiple values from a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> and shows that the list of values to be removed can contain duplicates:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\RemoveAll;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$s-&gt;removeAll(Vector {
'red',
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.remove.html build/final/api-html/hack/class.HH.Set.method.remove.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.remove.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.remove.html 2019-09-27 15:45:20.152548369 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that removing a value that doesn't exist in the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> has no effect:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Remove;
-
-$s = Set {'red', 'green'};
+<pre><code class="language-PHP">$s = Set {'red', 'green'};
// Remove 'red' from the Set
$s-&gt;remove('red');
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.reserve.html build/final/api-html/hack/class.HH.Set.method.reserve.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.reserve.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.reserve.html 2019-09-27 15:45:20.160548476 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example reserves space for 1000 elements and then fills the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> with 1000 integers:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Reserve;
-
-const int SET_SIZE = 1000;
+<pre><code class="language-PHP">const int SET_SIZE = 1000;
$s = Set {};
$s-&gt;reserve(SET_SIZE);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.retain.html build/final/api-html/hack/class.HH.Set.method.retain.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.retain.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.retain.html 2019-09-27 15:45:20.168548583 -0700
@@ -21,11 +21,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Retain;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Only keep values beginning with 'r' or 'b'
$s-&gt;retain($color ==&gt; $color[0] === 'r' || $color[0] === 'b');
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.skip.html build/final/api-html/hack/class.HH.Set.method.skip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.skip.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.skip.html 2019-09-27 15:45:20.176548690 -0700
@@ -20,11 +20,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Skip;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Create a new Set after skipping the first two elements ('red' and 'green')
$skip2 = $s-&gt;skip(2);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.skipWhile.html build/final/api-html/hack/class.HH.Set.method.skipWhile.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.skipWhile.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.skipWhile.html 2019-09-27 15:45:20.180548744 -0700
@@ -21,11 +21,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>skipWhile</code> can be used to create a new <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> by skipping elements at the beginning of an existing <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\SkipWhile;
-
-$s = Set {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
+<pre><code class="language-PHP">$s = Set {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
// Skip values until we reach one over 10
$s2 = $s-&gt;skipWhile($x ==&gt; $x &lt;= 10);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.slice.html build/final/api-html/hack/class.HH.Set.method.slice.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.slice.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.slice.html 2019-09-27 15:45:20.184548798 -0700
@@ -23,11 +23,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Slice;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Start at index 1 ('green') and include 3 elements
$s2 = $s-&gt;slice(1, 3);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.take.html build/final/api-html/hack/class.HH.Set.method.take.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.take.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.take.html 2019-09-27 15:45:20.188548852 -0700
@@ -18,11 +18,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Take;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Take the first two elements
$take2 = $s-&gt;take(2);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.takeWhile.html build/final/api-html/hack/class.HH.Set.method.takeWhile.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.takeWhile.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.takeWhile.html 2019-09-27 15:45:20.196548959 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>takeWhile</code> can be used to create a new <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> by taking elements from the beginning of an existing <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\TakeWhile;
-
-$s = Set {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
+<pre><code class="language-PHP">$s = Set {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
// Include values until we reach one over 10
$s2 = $s-&gt;takeWhile($x ==&gt; $x &lt;= 10);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toArray.html build/final/api-html/hack/class.HH.Set.method.toArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toArray.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toArray.html 2019-09-27 15:45:20.200549013 -0700
@@ -14,11 +14,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToArray;
-
-function run() {
+<pre><code class="language-PHP">function run() {
$s = Set {'red', 'green', 'blue', 'yellow'};
$array = $s-&gt;toArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toImmMap.html build/final/api-html/hack/class.HH.Set.method.toImmMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toImmMap.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toImmMap.html 2019-09-27 15:45:20.204549067 -0700
@@ -12,11 +12,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToImmMap;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$imm_map = $s-&gt;toImmMap();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toImmSet.html build/final/api-html/hack/class.HH.Set.method.toImmSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toImmSet.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toImmSet.html 2019-09-27 15:45:20.208549120 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToImmSet;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
function expects_immutable(ImmSet&lt;string&gt; $is): void {
\var_dump($is);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toImmVector.html build/final/api-html/hack/class.HH.Set.method.toImmVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toImmVector.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toImmVector.html 2019-09-27 15:45:20.212549174 -0700
@@ -12,11 +12,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>toImmVector</code> returns an <code>ImmVector</code> containing the <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>'s values. Mutating the original <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> doesn't affect the <code>ImmVector</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToImmVector;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
function expects_immutable(ImmVector&lt;string&gt; $iv): void {
\var_dump($iv);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toKeysArray.html build/final/api-html/hack/class.HH.Set.method.toKeysArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toKeysArray.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toKeysArray.html 2019-09-27 15:45:20.216549227 -0700
@@ -13,11 +13,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>toKeysArray</code> is the same as <a href="/hack/reference/class/HH.Set/toValuesArray/"><code>toValuesArray</code></a> because <a href="/hack/reference/class/HH.Set/"><code>Set</code></a>s don't have keys:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToKeysArray;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$keys_array = $s-&gt;toKeysArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toMap.html build/final/api-html/hack/class.HH.Set.method.toMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toMap.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toMap.html 2019-09-27 15:45:20.216549227 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToMap;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$map = $s-&gt;toMap();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toSet.html build/final/api-html/hack/class.HH.Set.method.toSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toSet.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toSet.html 2019-09-27 15:45:20.220549281 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>toSet</code> returns a deep copy of the <code>Set</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToSet;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
// Make a deep copy of Set $s
$s2 = $s-&gt;toSet();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.__toString.html build/final/api-html/hack/class.HH.Set.method.__toString.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.__toString.html 2019-09-27 12:30:15.798833939 -0700
+++ build/final/api-html/hack/class.HH.Set.method.__toString.html 2019-09-27 15:45:20.040546867 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The string version of a <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> is always <code>&quot;Set&quot;</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\__toString;
-
-$s = Set {1, 2, 3};
+<pre><code class="language-PHP">$s = Set {1, 2, 3};
echo $s.&quot;\n&quot;;
$s2 = Set {'a', 'b', 'c'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toValuesArray.html build/final/api-html/hack/class.HH.Set.method.toValuesArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toValuesArray.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toValuesArray.html 2019-09-27 15:45:20.220549281 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToValuesArray;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$array = $s-&gt;toValuesArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toVector.html build/final/api-html/hack/class.HH.Set.method.toVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.toVector.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.toVector.html 2019-09-27 15:45:20.224549336 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\ToVector;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$v = $s-&gt;toVector();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.values.html build/final/api-html/hack/class.HH.Set.method.values.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.values.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.values.html 2019-09-27 15:45:20.224549336 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Values;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$v = $s-&gt;values();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Set.method.zip.html build/final/api-html/hack/class.HH.Set.method.zip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Set.method.zip.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Set.method.zip.html 2019-09-27 15:45:20.232549442 -0700
@@ -24,11 +24,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>zip</code> won't thrown an <code>Exception</code> if at least one of the current <a href="/hack/reference/class/HH.Set/"><code>Set</code></a> or the <code>$traversable</code> is empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Zip;
-
-// The $traversable is empty so the result will be empty
+<pre><code class="language-PHP">// The $traversable is empty so the result will be empty
$s = Set {'red', 'green', 'blue', 'yellow'};
$zipped = $s-&gt;zip(Vector {});
var_dump($zipped);
@@ -49,11 +45,7 @@
</div>
<p>This example shows that <code>zip</code> will throw an <code>Exception</code> if the result is non-empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Set\Zip;
-
-$s = Set {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$s = Set {'red', 'green', 'blue', 'yellow'};
$zipped = $s-&gt;zip(Vector {'My Favorite', 'My Second Favorite'});
var_dump($zipped);
</code></pre>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.idx.html build/final/api-html/hack/class.HH.Shapes.method.idx.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.idx.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Shapes.method.idx.html 2019-09-27 15:45:20.248549657 -0700
@@ -32,11 +32,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to use <a href="/hack/reference/class/HH.Shapes/idx/"><code>Shapes::idx</code></a> for keys that may or may not exist in a <code>Shape</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Shapes\Idx;
-
-function run(shape('x' =&gt; int, 'y' =&gt; int, ?'z' =&gt; int) $point): void {
+<pre><code class="language-PHP">function run(shape('x' =&gt; int, 'y' =&gt; int, ?'z' =&gt; int) $point): void {
// The key 'x' exists in the Shape $point so it's returned
\var_dump(Shapes::idx($point, 'x'));
@@ -59,11 +55,7 @@
</div>
<p>This example shows that <a href="/hack/reference/class/HH.Shapes/idx/"><code>Shapes::idx</code></a> will only return the default value if the key doesn't exist in the <code>Shape</code>. If the key exists but is <code>NULL</code> then <code>NULL</code> will be returned.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Shapes\Idx;
-
-function runNullable(shape('x' =&gt; ?int, 'y' =&gt; ?int, ...) $point): void {
+<pre><code class="language-PHP">function runNullable(shape('x' =&gt; ?int, 'y' =&gt; ?int, ...) $point): void {
// The key 'x' exists, so its value (3) is returned, not our explicit default 0
\var_dump(Shapes::idx($point, 'x', 0));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.keyExists.html build/final/api-html/hack/class.HH.Shapes.method.keyExists.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.keyExists.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Shapes.method.keyExists.html 2019-09-27 15:45:20.252549711 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>keyExists</code> returns true if a key exists in the <code>Shape</code> (even if the corresponding value is <code>NULL</code>):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Shapes\KeyExists;
-
-function run(shape(?'x' =&gt; ?int, ?'y' =&gt; ?int, ?'z' =&gt; ?int) $point): void {
+<pre><code class="language-PHP">function run(shape(?'x' =&gt; ?int, ?'y' =&gt; ?int, ?'z' =&gt; ?int) $point): void {
// The key 'x' exists in Shape $point
\var_dump(Shapes::keyExists($point, 'x'));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.removeKey.html build/final/api-html/hack/class.HH.Shapes.method.removeKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.removeKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Shapes.method.removeKey.html 2019-09-27 15:45:20.256549765 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>removeKey</code> directly removes a key from a <code>Shape</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Shapes\RemoveKey;
-
-function run(shape('x' =&gt; int, 'y' =&gt; int) $point): void {
+<pre><code class="language-PHP">function run(shape('x' =&gt; int, 'y' =&gt; int) $point): void {
// Prints the value at key 'y'
\var_dump($point['y']);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.toArray.html build/final/api-html/hack/class.HH.Shapes.method.toArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Shapes.method.toArray.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Shapes.method.toArray.html 2019-09-27 15:45:20.260549818 -0700
@@ -15,11 +15,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>toArray</code> will return the underlying array of a <code>Shape</code>. The result will be loosely typed because a single <code>Shape</code> can contain arbitrary different types (e.g. <code>string</code>, <code>int</code>, <code>float</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Shapes\ToArray;
-
-function run(): void {
+<pre><code class="language-PHP">function run(): void {
$point = shape('name' =&gt; 'Jane Doe', 'age' =&gt; 55, 'points' =&gt; 25.30);
\var_dump(Shapes::toArray($point));
}
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.addAll.html build/final/api-html/hack/class.HH.Vector.method.addAll.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.addAll.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.addAll.html 2019-09-27 15:45:20.644554970 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example adds a collection of values to the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> <code>$v</code> and also adds multiple collections of values to <code>$v</code> through chaining. Since <a href="/hack/reference/class/HH.Vector/addAll/"><code>Vector::addAll()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$v</code> itself, you can chain a bunch of <code>addAll()</code> calls together, and that will add all those collection of values to <code>$v</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\AddAll;
-
-$v = Vector {};
+<pre><code class="language-PHP">$v = Vector {};
// Add all the values in a Set
$v-&gt;addAll(Set {'a', 'b'});
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.addAllKeysOf.html build/final/api-html/hack/class.HH.Vector.method.addAllKeysOf.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.addAllKeysOf.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.addAllKeysOf.html 2019-09-27 15:45:20.648555024 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example adds <code>string</code> keys from a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> to a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> as its values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\AddAllKeysOf\Strings;
-
-$fruit_calories = Map {
+<pre><code class="language-PHP">$fruit_calories = Map {
'apple' =&gt; 95,
'orange' =&gt; 45,
};
@@ -61,11 +57,7 @@
</div>
<p>This example adds <code>int</code> keys from a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> to a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> as its values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\AddAllKeysOf\Ints;
-
-$uploaders_by_id = Map {
+<pre><code class="language-PHP">$uploaders_by_id = Map {
4993063 =&gt; 'Amy Smith',
9361760 =&gt; 'John Doe',
};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.add.html build/final/api-html/hack/class.HH.Vector.method.add.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.add.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.add.html 2019-09-27 15:45:20.640554918 -0700
@@ -24,11 +24,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example adds a single value to the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> <code>$v</code> and also adds multiple values to <code>$v</code> through chaining. Since <a href="/hack/reference/class/HH.Vector/add/"><code>Vector::add()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$v</code> itself, you can chain a bunch of <code>add()</code> calls together, and that will add all those values to <code>$v</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Add;
-
-$v = Vector {};
+<pre><code class="language-PHP">$v = Vector {};
$v-&gt;add('red');
var_dump($v);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.at.html build/final/api-html/hack/class.HH.Vector.method.at.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.at.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.at.html 2019-09-27 15:45:20.652555078 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example prints the first and last values of the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\At\ExistingKey;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Print the first element
var_dump($v-&gt;at(0));
@@ -41,11 +37,7 @@
</div>
<p>This example throws an <code>OutOfBoundsException</code> because the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> has no index 10:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\At\MissingKey;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Index 10 doesn't exist (this will throw an exception)
var_dump($v-&gt;at(10));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.clear.html build/final/api-html/hack/class.HH.Vector.method.clear.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.clear.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.clear.html 2019-09-27 15:45:20.656555132 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Clear;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
var_dump($v);
$v-&gt;clear();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.concat.html build/final/api-html/hack/class.HH.Vector.method.concat.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.concat.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.concat.html 2019-09-27 15:45:20.660555185 -0700
@@ -25,11 +25,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example creates new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>s by concatenating other <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>s. Unlike <a href="/hack/reference/class/HH.Vector/addAll/"><code>Vector::addAll()</code></a> this method returns a new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> (not a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Concat;
-
-$v = Vector {'red'};
+<pre><code class="language-PHP">$v = Vector {'red'};
// Add all the values in a Set
$v1 = $v-&gt;concat(Set {'green', 'blue'});
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.__construct.html build/final/api-html/hack/class.HH.Vector.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.__construct.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.__construct.html 2019-09-27 15:45:20.628554756 -0700
@@ -17,11 +17,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to create a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> from various <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>s:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\__construct;
-
-// Create a new Vector from an array
+<pre><code class="language-PHP">// Create a new Vector from an array
$v = new Vector(array('red', 'green', 'blue', 'yellow'));
var_dump($v);
@@ -75,11 +71,7 @@
</div>
<p>This example shows how passing <code>null</code> to the constructor creates an empty <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\__construct\FromNull;
-
-// An empty Vector is created if null is provided
+<pre><code class="language-PHP">// An empty Vector is created if null is provided
$v = new Vector(null);
var_dump($v);
</code></pre>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.containsKey.html build/final/api-html/hack/class.HH.Vector.method.containsKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.containsKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.containsKey.html 2019-09-27 15:45:20.668555293 -0700
@@ -16,11 +16,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ContainsKey;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Prints &quot;true&quot;, since index 0 is the first element
var_dump($v-&gt;containsKey(0));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.count.html build/final/api-html/hack/class.HH.Vector.method.count.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.count.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.count.html 2019-09-27 15:45:20.668555293 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Count;
-
-$v = Vector {};
+<pre><code class="language-PHP">$v = Vector {};
var_dump($v-&gt;count());
$v = Vector {'red', 'green', 'blue', 'yellow'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.filter.html build/final/api-html/hack/class.HH.Vector.method.filter.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.filter.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.filter.html 2019-09-27 15:45:20.672555346 -0700
@@ -21,11 +21,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Filter;
-
-$colors = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$colors = Vector {'red', 'green', 'blue', 'yellow'};
$primary_colors = Set {'red', 'green', 'blue'};
// Create a Vector of colors that contain the letter 'l'
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.filterWithKey.html build/final/api-html/hack/class.HH.Vector.method.filterWithKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.filterWithKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.filterWithKey.html 2019-09-27 15:45:20.676555401 -0700
@@ -25,11 +25,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\FilterWithKey;
-
-$v = Vector {'red', 'green', 'blue', 'yellow', 'purple'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow', 'purple'};
// Only include elements with an odd index
$odd_elements = $v-&gt;filterWithKey(($index, $color) ==&gt; ($index % 2) !== 0);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.firstKey.html build/final/api-html/hack/class.HH.Vector.method.firstKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.firstKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.firstKey.html 2019-09-27 15:45:20.680555453 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example gets the first key from <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>. An empty <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> will return <code>null</code> as its first key.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\FirstKey;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
var_dump($v-&gt;firstKey());
$v = Vector {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.firstValue.html build/final/api-html/hack/class.HH.Vector.method.firstValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.firstValue.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.firstValue.html 2019-09-27 15:45:20.680555453 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example gets the first value from <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>. An empty <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> will return <code>null</code> as its first value.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\FirstValue;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
var_dump($v-&gt;firstValue());
$v = Vector {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.fromItems.html build/final/api-html/hack/class.HH.Vector.method.fromItems.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.fromItems.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.fromItems.html 2019-09-27 15:45:20.688555561 -0700
@@ -19,11 +19,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\FromItems;
-
-// Create a new Vector from an array
+<pre><code class="language-PHP">// Create a new Vector from an array
$v = Vector::fromItems(array('red', 'green', 'blue', 'yellow'));
var_dump($v);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.fromKeysOf.html build/final/api-html/hack/class.HH.Vector.method.fromKeysOf.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.fromKeysOf.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.fromKeysOf.html 2019-09-27 15:45:20.692555616 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example adds <code>string</code> keys from a <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> to a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> as its values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\FromKeysOf\Strings;
-
-$fruit_calories = Map {
+<pre><code class="language-PHP">$fruit_calories = Map {
'apple' =&gt; 95,
'orange' =&gt; 45,
};
@@ -60,11 +56,7 @@
</div>
<p>This example creates new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>s from an int-keyed <a href="/hack/reference/class/HH.Map/"><code>Map</code></a> and an associative array:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\FromKeysOf\Ints;
-
-$uploaders_by_id = Map {
+<pre><code class="language-PHP">$uploaders_by_id = Map {
4993063 =&gt; 'Amy Smith',
9361760 =&gt; 'John Doe',
};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.get.html build/final/api-html/hack/class.HH.Vector.method.get.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.get.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.get.html 2019-09-27 15:45:20.696555668 -0700
@@ -19,11 +19,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>get</code> can be used to access an index that may not exist:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Get;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Index 0 is the element 'red'
var_dump($v-&gt;get(0));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.getIterator.html build/final/api-html/hack/class.HH.Vector.method.getIterator.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.getIterator.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.getIterator.html 2019-09-27 15:45:20.700555722 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how to get an iterator from a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> and how to consume it:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\GetIterator;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Get an iterator for the Vector of colors
$iterator = $v-&gt;getIterator();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.immutable.html build/final/api-html/hack/class.HH.Vector.method.immutable.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.immutable.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.immutable.html 2019-09-27 15:45:20.700555722 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Immutable;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
function expects_immutable(ImmVector $iv): void {
\var_dump($iv);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.isEmpty.html build/final/api-html/hack/class.HH.Vector.method.isEmpty.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.isEmpty.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.isEmpty.html 2019-09-27 15:45:20.700555722 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\IsEmpty;
-
-$v = Vector {};
+<pre><code class="language-PHP">$v = Vector {};
var_dump($v-&gt;isEmpty());
$v = Vector {'red', 'green', 'blue', 'yellow'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.items.html build/final/api-html/hack/class.HH.Vector.method.items.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.items.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.items.html 2019-09-27 15:45:20.704555776 -0700
@@ -12,11 +12,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>items()</code> returns an <a href="/hack/reference/interface/HH.Iterable/"><code>Iterable</code></a> view of the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>. The <a href="/hack/reference/interface/HH.Iterable/"><code>Iterable</code></a> will produce the values of the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> at the time it's iterated.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Items;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Get an Iterable view of the Vector
$iterable = $v-&gt;items();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.keys.html build/final/api-html/hack/class.HH.Vector.method.keys.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.keys.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.keys.html 2019-09-27 15:45:20.708555830 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Keys;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
var_dump($v-&gt;keys());
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.lastKey.html build/final/api-html/hack/class.HH.Vector.method.lastKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.lastKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.lastKey.html 2019-09-27 15:45:20.708555830 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>lastKey()</code> can be used even when a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> may be empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\LastKey;
-
-function echoLastKey(Vector&lt;string&gt; $v): void {
+<pre><code class="language-PHP">function echoLastKey(Vector&lt;string&gt; $v): void {
$last_key = $v-&gt;lastKey();
if ($last_key !== null) {
echo 'Last key: '.$last_key.&quot;\n&quot;;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.lastValue.html build/final/api-html/hack/class.HH.Vector.method.lastValue.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.lastValue.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.lastValue.html 2019-09-27 15:45:20.712555883 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>lastValue()</code> can be used even when a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> may be empty:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\LastValue;
-
-function echoLastValue(Vector&lt;string&gt; $v): void {
+<pre><code class="language-PHP">function echoLastValue(Vector&lt;string&gt; $v): void {
$last_value = $v-&gt;lastValue();
if ($last_value !== null) {
echo 'Last value: '.$last_value.&quot;\n&quot;;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.lazy.html build/final/api-html/hack/class.HH.Vector.method.lazy.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.lazy.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.lazy.html 2019-09-27 15:45:20.720555991 -0700
@@ -15,11 +15,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows you how to use <code>lazy()</code> on a rather large <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> and the time for both a <em>strict</em> and <em>non-strict</em> version. Since we only need 5 of the elements in the end, the lazy view actually allows us to stop after we meet our required 5 without having to actually filter and allocate all 1000000 elements up front.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Lazy;
-
-$vector = new Vector(range(0, 1000000));
+<pre><code class="language-PHP">$vector = new Vector(range(0, 1000000));
$s = microtime(true);
$non_lazy = $vector-&gt;filter($x ==&gt; $x % 2 === 0)-&gt;take(5);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.linearSearch.html build/final/api-html/hack/class.HH.Vector.method.linearSearch.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.linearSearch.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.linearSearch.html 2019-09-27 15:45:20.720555991 -0700
@@ -17,11 +17,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\LinearSearch;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Prints 2
var_dump($v-&gt;linearSearch('blue'));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.map.html build/final/api-html/hack/class.HH.Vector.method.map.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.map.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.map.html 2019-09-27 15:45:20.728556097 -0700
@@ -22,11 +22,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>In this example the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>'s elements are mapped to the same type (<code>string</code>s):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Map\Strings;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$capitalized = $v-&gt;map(fun('strtoupper'));
var_dump($capitalized);
@@ -61,11 +57,7 @@
</div>
<p>In this example the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>'s elements are mapped to a different type (<code>int</code>s):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Map\Ints;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$lengths = $v-&gt;map(fun('strlen'));
var_dump($lengths);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.mapWithKey.html build/final/api-html/hack/class.HH.Vector.method.mapWithKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.mapWithKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.mapWithKey.html 2019-09-27 15:45:20.732556151 -0700
@@ -23,11 +23,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>mapWithKey</code> can be used to create a new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> based on <code>$v</code>'s keys and values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\MapWithKey;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$sentences = $v-&gt;mapWithKey(($index, $color) ==&gt; &quot;Color at {$index}: {$color}&quot;);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.pop.html build/final/api-html/hack/class.HH.Vector.method.pop.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.pop.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.pop.html 2019-09-27 15:45:20.736556205 -0700
@@ -14,11 +14,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>pop()</code> returns the last element and removes it from the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Pop\BasicUsage;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$last_color = $v-&gt;pop();
@@ -41,11 +37,7 @@
</div>
<p>This example shows that trying to <code>pop</code> from an empty <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> will throw an exception:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Pop\EmptyException;
-
-$v = Vector {};
+<pre><code class="language-PHP">$v = Vector {};
$last_element = $v-&gt;pop(); // Throws InvalidOperationException
</code></pre>
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.removeKey.html build/final/api-html/hack/class.HH.Vector.method.removeKey.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.removeKey.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.removeKey.html 2019-09-27 15:45:20.740556260 -0700
@@ -25,11 +25,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Since <a href="/hack/reference/class/HH.Vector/removeKey/"><code>Vector::removeKey()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$v</code> itself, you can chain a bunch of <code>removeKey()</code> calls together.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\RemoveKey;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Remove 'blue' at index 2
$v-&gt;removeKey(2);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.reserve.html build/final/api-html/hack/class.HH.Vector.method.reserve.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.reserve.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.reserve.html 2019-09-27 15:45:20.744556312 -0700
@@ -20,11 +20,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example reserves space for 1000 elements and then fills the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> with 1000 integers:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Reserve;
-
-const int VECTOR_SIZE = 1000;
+<pre><code class="language-PHP">const int VECTOR_SIZE = 1000;
$v = Vector {};
$v-&gt;reserve(VECTOR_SIZE);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.resize.html build/final/api-html/hack/class.HH.Vector.method.resize.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.resize.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.resize.html 2019-09-27 15:45:20.748556366 -0700
@@ -26,11 +26,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>resize</code> can be used to decrease and increase the size of a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Resize;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Resize the Vector to 2 (removing 'blue' and 'yellow')
$v-&gt;resize(2, null);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.reverse.html build/final/api-html/hack/class.HH.Vector.method.reverse.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.reverse.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.reverse.html 2019-09-27 15:45:20.752556420 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Reverse;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$v-&gt;reverse();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.setAll.html build/final/api-html/hack/class.HH.Vector.method.setAll.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.setAll.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.setAll.html 2019-09-27 15:45:20.760556528 -0700
@@ -23,11 +23,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>setAll()</code> can be used with any <a href="/hack/reference/interface/HH.KeyedTraversable/"><code>KeyedTraversable</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\SetAll;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Set the elements at 0 and 1
$v-&gt;setAll(Vector {'foo', 'bar'});
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.set.html build/final/api-html/hack/class.HH.Vector.method.set.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.set.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.set.html 2019-09-27 15:45:20.756556474 -0700
@@ -25,11 +25,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Since <a href="/hack/reference/class/HH.Vector/set/"><code>Vector::set()</code></a> returns a <a href="https://en.wikipedia.org/wiki/Object_copying#Shallow_copy">shallow copy</a> of <code>$v</code> itself, you can chain a bunch of <code>set()</code> calls together.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Set;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Set the first element to 'RED'
$v-&gt;set(0, 'RED');
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.shuffle.html build/final/api-html/hack/class.HH.Vector.method.shuffle.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.shuffle.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.shuffle.html 2019-09-27 15:45:20.760556528 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Shuffle;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Randomize the Vector elements in place
$v-&gt;shuffle();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.skip.html build/final/api-html/hack/class.HH.Vector.method.skip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.skip.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.skip.html 2019-09-27 15:45:20.768556635 -0700
@@ -24,11 +24,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Skip;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Create a new Vector after skipping the first two elements ('red' and 'green')
$skip2 = $v-&gt;skip(2);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.skipWhile.html build/final/api-html/hack/class.HH.Vector.method.skipWhile.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.skipWhile.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.skipWhile.html 2019-09-27 15:45:20.772556688 -0700
@@ -24,11 +24,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>skipWhile</code> can be used to create a new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> by skipping elements at the beginning of an existing <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\SkipWhile;
-
-$v = Vector {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
+<pre><code class="language-PHP">$v = Vector {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
// Skip values until we reach one over 10
$v2 = $v-&gt;skipWhile($x ==&gt; $x &lt;= 10);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.slice.html build/final/api-html/hack/class.HH.Vector.method.slice.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.slice.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.slice.html 2019-09-27 15:45:20.780556795 -0700
@@ -29,11 +29,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Slice;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Start at index 1 ('green') and include 3 elements
$v2 = $v-&gt;slice(1, 3);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.splice.html build/final/api-html/hack/class.HH.Vector.method.splice.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.splice.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.splice.html 2019-09-27 15:45:20.784556849 -0700
@@ -27,11 +27,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use <code>$offset</code> and <code>$len</code> together:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Splice;
-
-// Remove the element at index 2:
+<pre><code class="language-PHP">// Remove the element at index 2:
$v = Vector {'red', 'green', 'blue', 'yellow'};
$v-&gt;splice(2, 1);
var_dump($v); // $v contains 'red', 'green', 'yellow'
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.take.html build/final/api-html/hack/class.HH.Vector.method.take.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.take.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.take.html 2019-09-27 15:45:20.788556903 -0700
@@ -23,11 +23,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Take;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Take the first two elements
$take2 = $v-&gt;take(2);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.takeWhile.html build/final/api-html/hack/class.HH.Vector.method.takeWhile.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.takeWhile.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.takeWhile.html 2019-09-27 15:45:20.792556957 -0700
@@ -23,11 +23,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>takeWhile</code> can be used to create a new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> by taking elements from the beginning of an existing <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\TakeWhile;
-
-$v = Vector {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
+<pre><code class="language-PHP">$v = Vector {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144};
// Include values until we reach one over 10
$v2 = $v-&gt;takeWhile($x ==&gt; $x &lt;= 10);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toArray.html build/final/api-html/hack/class.HH.Vector.method.toArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toArray.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toArray.html 2019-09-27 15:45:20.796557010 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToArray;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$array = $v-&gt;toArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toImmMap.html build/final/api-html/hack/class.HH.Vector.method.toImmMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toImmMap.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toImmMap.html 2019-09-27 15:45:20.800557064 -0700
@@ -11,11 +11,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToImmMap;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$imm_map = $v-&gt;toImmMap();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toImmSet.html build/final/api-html/hack/class.HH.Vector.method.toImmSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toImmSet.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toImmSet.html 2019-09-27 15:45:20.800557064 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> to an <code>ImmSet</code> also removes duplicate values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToImmSet;
-
-// This Vector contains repetitions of 'red' and 'blue'
+<pre><code class="language-PHP">// This Vector contains repetitions of 'red' and 'blue'
$v = Vector {'red', 'green', 'red', 'blue', 'red', 'yellow', 'blue'};
$imm_set = $v-&gt;toImmSet();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toImmVector.html build/final/api-html/hack/class.HH.Vector.method.toImmVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toImmVector.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toImmVector.html 2019-09-27 15:45:20.804557118 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that <code>toImmVector</code> returns an immutable copy of the <code>Vector</code>. Mutating the original <code>Vector</code> doesn't affect the immutable copy.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToImmVector;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
function expects_immutable(ImmVector $iv): void {
\var_dump($iv);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toKeysArray.html build/final/api-html/hack/class.HH.Vector.method.toKeysArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toKeysArray.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toKeysArray.html 2019-09-27 15:45:20.804557118 -0700
@@ -9,11 +9,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToKeysArray;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$keys_array = $v-&gt;toKeysArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toMap.html build/final/api-html/hack/class.HH.Vector.method.toMap.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toMap.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toMap.html 2019-09-27 15:45:20.808557172 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToMap;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$map = $v-&gt;toMap();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toSet.html build/final/api-html/hack/class.HH.Vector.method.toSet.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toSet.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toSet.html 2019-09-27 15:45:20.808557172 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows that converting a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> to a <code>Set</code> also removes duplicate values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToSet;
-
-// This Vector contains repetitions of 'red' and 'blue'
+<pre><code class="language-PHP">// This Vector contains repetitions of 'red' and 'blue'
$v = Vector {'red', 'green', 'red', 'blue', 'red', 'yellow', 'blue'};
$set = $v-&gt;toSet();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.__toString.html build/final/api-html/hack/class.HH.Vector.method.__toString.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.__toString.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.__toString.html 2019-09-27 15:45:20.632554809 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The string version of an <a href="/hack/reference/class/HH.ImmVector/"><code>ImmVector</code></a> is always <code>&quot;ImmVector&quot;</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\ImmVector\__toString;
-
-$iv = ImmVector {1, 2, 3};
+<pre><code class="language-PHP">$iv = ImmVector {1, 2, 3};
echo $iv.&quot;\n&quot;;
$iv2 = ImmVector {'a', 'b', 'c'};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toValuesArray.html build/final/api-html/hack/class.HH.Vector.method.toValuesArray.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toValuesArray.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toValuesArray.html 2019-09-27 15:45:20.812557225 -0700
@@ -10,11 +10,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToValuesArray;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$array = $v-&gt;toValuesArray();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toVector.html build/final/api-html/hack/class.HH.Vector.method.toVector.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.toVector.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.toVector.html 2019-09-27 15:45:20.816557279 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>toVector()</code> returns a copy of <code>$v</code> (a new <code>Vector</code> object), so mutating this new <code>Vector</code> doesn't affect the original.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToVector;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Make a new Vector that is a copy of $v (i.e. contains the same elements)
$v2 = $v-&gt;toVector();
@@ -58,11 +54,7 @@
<p>Thus, mutating an element of <code>$v</code> that is itself an object also mutates the corresponding element of <code>$v2</code>, since the element in <code>$v</code>
is the same object as the element in <code>$v2</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\ToVector;
-
-$inner = Vector {1, 2, 3};
+<pre><code class="language-PHP">$inner = Vector {1, 2, 3};
$v = Vector {'a', $inner, 'c'};
// Make a Vector copy of $v
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.values.html build/final/api-html/hack/class.HH.Vector.method.values.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.values.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.values.html 2019-09-27 15:45:20.820557332 -0700
@@ -12,11 +12,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>values()</code> is identical to <a href="/hack/reference/class/HH.Vector/toVector/"><code>toVector()</code></a>. It returns a deep copy of <code>$v</code>, so mutating this new <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> doesn't affect the original.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Values;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
// Make a deep Vector copy of $v
$v2 = $v-&gt;values();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.zip.html build/final/api-html/hack/class.HH.Vector.method.zip.html
--- ../tmp-build-old/final/api-html/hack/class.HH.Vector.method.zip.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.HH.Vector.method.zip.html 2019-09-27 15:45:20.824557387 -0700
@@ -23,11 +23,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows how <code>zip</code> combines the values of the <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> and another <a href="/hack/reference/interface/HH.Traversable/"><code>Traversable</code></a>. The resulting <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> <code>$labeled_colors</code> has three elements because <code>$labels</code> doesn't have a fourth element to pair with <code>$v</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\Vector\Zip;
-
-$v = Vector {'red', 'green', 'blue', 'yellow'};
+<pre><code class="language-PHP">$v = Vector {'red', 'green', 'blue', 'yellow'};
$labels = Vector {'My Favorite', 'My 2nd Favorite', 'My 3rd Favorite'};
$labeled_colors = $v-&gt;zip($labels);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouterException.method.__construct.html build/final/api-html/hack/class.MCRouterException.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouterException.method.__construct.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouterException.method.__construct.html 2019-09-27 15:45:20.996559694 -0700
@@ -17,11 +17,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>You normally will catch a <a href="/hack/reference/class/MCRouterException/"><code>MCRouterException</code></a> over constructing one explicitly, but it can be done. Here is an example where you can check the version of the memcached server and throw if you don't have the right one.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouterEx\Construct;
-
-async function simple_mcrouter(): Awaitable&lt;void&gt; {
+<pre><code class="language-PHP">async function simple_mcrouter(): Awaitable&lt;void&gt; {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
$ver = await $mc-&gt;version();
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouterException.method.getKey.html build/final/api-html/hack/class.MCRouterException.method.getKey.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouterException.method.getKey.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouterException.method.getKey.html 2019-09-27 15:45:21.000559748 -0700
@@ -9,11 +9,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to retrieve the key from an <a href="/hack/reference/class/MCRouterException/"><code>MCRouterException</code></a> using its <code>getKey</code> method. If there is no key associated with the exception, then <code>&quot;&quot;</code> will be returned.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouterEx\GetKey;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouterException.method.getOp.html build/final/api-html/hack/class.MCRouterException.method.getOp.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouterException.method.getOp.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouterException.method.getOp.html 2019-09-27 15:45:21.000559748 -0700
@@ -9,11 +9,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to retrieve the memcached operation from an <a href="/hack/reference/class/MCRouterException/"><code>MCRouterException</code></a> using its <code>getOp</code> method. Then we get its friendly name via <a href="/hack/reference/class/MCRouter/getOpName/"><code>MCRouter::getOpName()</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouterEx\GetOp;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.add.html build/final/api-html/hack/class.MCRouter.method.add.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.add.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.MCRouter.method.add.html 2019-09-27 15:45:20.908558514 -0700
@@ -39,11 +39,7 @@
</div>
<p>See the <a href="https://github.com/facebook/mcrouter/blob/5f259ed47b52f86cad750d2343edf324e80cb397/mcrouter/lib/mc/msg.h">header file with the flags</a></p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Add;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.append.html build/final/api-html/hack/class.MCRouter.method.append.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.append.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.MCRouter.method.append.html 2019-09-27 15:45:20.912558567 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use the <a href="/hack/reference/class/MCRouter/append/"><code>MCRouter::append</code></a> function.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Append;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.__construct.html build/final/api-html/hack/class.MCRouter.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.__construct.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.MCRouter.method.__construct.html 2019-09-27 15:45:20.904558460 -0700
@@ -21,11 +21,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to explicitly create an instance of <a href="/hack/reference/class/MCRouter/"><code>MCRouter</code></a> using <code>new</code>, by definition, its constructor. You must create a configuration string (or provide a configuration file that contains appropriate configuration information), and, optionally, a persistence identifier can bet passed as the second parameter to the constructor.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Construct;
-
-function construct_mcrouter(): void {
+<pre><code class="language-PHP">function construct_mcrouter(): void {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
// For many use cases, calling MCRouter::createSimple($servers) would
// suffice here. But this shows you how to explicitly create the configuration
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.createSimple.html build/final/api-html/hack/class.MCRouter.method.createSimple.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.createSimple.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.MCRouter.method.createSimple.html 2019-09-27 15:45:20.916558620 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how use <a href="/hack/reference/class/MCRouter/createSimple/"><code>MCRouter::createSimple</code></a> to create an instance of <a href="/hack/reference/class/MCRouter/"><code>MCRouter</code></a>. You only need to pass it a <a href="/hack/reference/class/HH.Vector/"><code>Vector</code></a> containing one or more locations of Memcached servers; default configurations are used after that (e.g, <code>route = 'PoolRoute|P'</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\CSimple;
-
-function simple_mcrouter(): void {
+<pre><code class="language-PHP">function simple_mcrouter(): void {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
\var_dump($mc is \MCRouter);
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.decr.html build/final/api-html/hack/class.MCRouter.method.decr.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.decr.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.MCRouter.method.decr.html 2019-09-27 15:45:20.924558729 -0700
@@ -19,11 +19,7 @@
<p>The following example shows how to decrement a value of a key by a specified integer using <a href="/hack/reference/class/MCRouter/incr/"><code>MCRouter::incr</code></a>. The value <strong>must</strong> be numeric.</p>
<p>Note that you can't decrement below 0. So if your value is 1 and you try to decrement 3, the value you get back will be 0.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Decr;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.del.html build/final/api-html/hack/class.MCRouter.method.del.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.del.html 2019-09-27 12:30:15.802833983 -0700
+++ build/final/api-html/hack/class.MCRouter.method.del.html 2019-09-27 15:45:20.928558781 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example uses <a href="/hack/reference/class/MCRouter/del/"><code>MCRouter::del</code></a> to delete a key from the memcached server. Once the key is deleted, it is no longer accessible. Nor can you delete a non-existing key.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Del;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.flushAll.html build/final/api-html/hack/class.MCRouter.method.flushAll.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.flushAll.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.flushAll.html 2019-09-27 15:45:20.940558943 -0700
@@ -18,11 +18,7 @@
<p>It is <strong>imperative</strong> to note that you must manually construct the <a href="/hack/reference/class/MCRouter/"><code>MCRouter</code></a> instance passing <code>'enable_flush_cmd' =&gt; true</code> as one of your options; otherwise a command disabled exception will be thrown. In other words, you cannot use <a href="/hack/reference/class/MCRouter/createSimple/"><code>MCRouter::createSimple()</code></a> when using <code>flushAll</code>.</p>
<p>You can add an optional delay time in seconds to your call to <code>flushAll</code> as well.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\FlushAll;
-
-function construct_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function construct_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
// For many use cases, calling MCRouter::createSimple($servers) would
// suffice here. But this shows you how to explicitly create the configuration
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.get.html build/final/api-html/hack/class.MCRouter.method.get.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.get.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.get.html 2019-09-27 15:45:20.944558997 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Most of the <a href="/hack/reference/class/MCRouter/"><code>MCRouter</code></a> examples use <a href="/hack/reference/class/MCRouter/get/"><code>MCRouter::get</code></a> in order to demonstrate other functions of the API. This example calls out <code>get</code> explicitly in its own function to show you how it works. If you try to <code>get</code> on a key that does not exist, an exception will be thrown.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Get;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.getOpName.html build/final/api-html/hack/class.MCRouter.method.getOpName.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.getOpName.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.getOpName.html 2019-09-27 15:45:20.952559104 -0700
@@ -166,11 +166,7 @@
<td data-heading="Returned String">get-service-info</td>
</tr></tbody></table>
</div><div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\GetOpName;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.getResultName.html build/final/api-html/hack/class.MCRouter.method.getResultName.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.getResultName.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.getResultName.html 2019-09-27 15:45:20.960559212 -0700
@@ -186,11 +186,7 @@
<td data-heading="String">mc_nres</td>
</tr></tbody></table>
</div><div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\GetResultName;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.incr.html build/final/api-html/hack/class.MCRouter.method.incr.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.incr.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.incr.html 2019-09-27 15:45:20.968559318 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to increment a value of a key by a specified integer using <a href="/hack/reference/class/MCRouter/incr/"><code>MCRouter::incr</code></a>. The value <strong>must</strong> be numeric.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Incr;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.prepend.html build/final/api-html/hack/class.MCRouter.method.prepend.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.prepend.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.prepend.html 2019-09-27 15:45:20.972559372 -0700
@@ -18,11 +18,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows how to use the <a href="/hack/reference/class/MCRouter/prepend/"><code>MCRouter::prepend</code></a> function.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Prepend;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.replace.html build/final/api-html/hack/class.MCRouter.method.replace.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.replace.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.replace.html 2019-09-27 15:45:20.976559426 -0700
@@ -39,11 +39,7 @@
</div>
<p>See the <a href="https://github.com/facebook/mcrouter/blob/5f259ed47b52f86cad750d2343edf324e80cb397/mcrouter/lib/mc/msg.h">header file with the flags</a></p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Replace;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.set.html build/final/api-html/hack/class.MCRouter.method.set.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.set.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.set.html 2019-09-27 15:45:20.984559533 -0700
@@ -39,11 +39,7 @@
</div>
<p>See the <a href="https://github.com/facebook/mcrouter/blob/5f259ed47b52f86cad750d2343edf324e80cb397/mcrouter/lib/mc/msg.h">header file with the flags</a></p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Set;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouter.method.version.html build/final/api-html/hack/class.MCRouter.method.version.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouter.method.version.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouter.method.version.html 2019-09-27 15:45:20.992559641 -0700
@@ -10,11 +10,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example allows you to use <a href="/hack/reference/class/MCRouter/version/"><code>MCRouter::version</code></a> to get the version information of the memcached server you are connected to.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouter\Version;
-
-function get_simple_mcrouter(): \MCRouter {
+<pre><code class="language-PHP">function get_simple_mcrouter(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
$mc = \MCRouter::createSimple($servers);
return $mc;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouterOptionException.method.__construct.html build/final/api-html/hack/class.MCRouterOptionException.method.__construct.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouterOptionException.method.__construct.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouterOptionException.method.__construct.html 2019-09-27 15:45:21.004559801 -0700
@@ -11,11 +11,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>You normally will catch a <a href="/hack/reference/class/MCRouterOptionException/"><code>MCRouterOptionException</code></a> over constructing one explicitly, but it can be done. Here is an example where you can check the options and throw the exception with a custom error if you don't have good options.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouterOptEx\Construct;
-
-function construct_mcrouter(array&lt;string, mixed&gt; $options): void {
+<pre><code class="language-PHP">function construct_mcrouter(array&lt;string, mixed&gt; $options): void {
if (!\array_key_exists('config_str', $options)) {
// You can have multiple string =&gt; string errors in the array
$errors = array(array('format' =&gt; 'Need config string'));
diff -r -U 3 ../tmp-build-old/final/api-html/hack/class.MCRouterOptionException.method.getErrors.html build/final/api-html/hack/class.MCRouterOptionException.method.getErrors.html
--- ../tmp-build-old/final/api-html/hack/class.MCRouterOptionException.method.getErrors.html 2019-09-27 12:30:15.806834026 -0700
+++ build/final/api-html/hack/class.MCRouterOptionException.method.getErrors.html 2019-09-27 15:45:21.008559856 -0700
@@ -9,11 +9,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following example shows you how to get the errors that are available when bad options are passed to the <a href="/hack/reference/class/MCRouter/"><code>MCRouter</code></a> constructor using <a href="/hack/reference/class/MCRouterOptionException/getErrors/"><code>MCRouterOptionException::getErrors</code></a></p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\MCRouter\MCrouterOptEx\GetErrors;
-
-function construct_mcrouter(): void {
+<pre><code class="language-PHP">function construct_mcrouter(): void {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
// For many use cases, calling MCRouter::createSimple($servers) would
// suffice here. But this shows you how to explicitly create the configuration
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.curl_multi_await.html build/final/api-html/hack/function.curl_multi_await.html
--- ../tmp-build-old/final/api-html/hack/function.curl_multi_await.html 2019-09-27 12:30:15.818834156 -0700
+++ build/final/api-html/hack/function.curl_multi_await.html 2019-09-27 15:45:24.612608216 -0700
@@ -29,11 +29,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following shows a scenario where you are going to wait for and return the result of activity on multiple curl handles. A bit of a simpler approach would be to use <a href="//hack/reference/function/HH.Asio.curl_exec/"><a href="/hack/reference/function/HH.Asio.curl_exec/"><code>HH\Asio\curl_exec</code></a></a>, which is a wrapper around <code>curl_multi_await</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\cma;
-
-require __DIR__.&quot;/../../vendor/autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../vendor/autoload.php&quot;;
async function get_curl_content(Set&lt;string&gt; $urls): Awaitable&lt;Vector&lt;string&gt;&gt; {
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.curl_exec.html build/final/api-html/hack/function.HH.Asio.curl_exec.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.curl_exec.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.curl_exec.html 2019-09-27 15:45:24.060600809 -0700
@@ -25,11 +25,7 @@
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>The following shows a scenario where you are going to wait for and return the result of cURL activity on URLs, using the convenient wrapper that is <code>curl_exec</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\ce;
-
-require __DIR__.&quot;/../../vendor/autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../vendor/autoload.php&quot;;
async function get_curl_content(Set&lt;string&gt; $urls): Awaitable&lt;Vector&lt;string&gt;&gt; {
$content = Vector {};
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mf.html build/final/api-html/hack/function.HH.Asio.mf.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mf.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mf.html 2019-09-27 15:45:24.076601024 -0700
@@ -29,11 +29,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mf;
-
-enum COLOR: int {
+<pre><code class="language-PHP">enum COLOR: int {
RED = 1;
ORANGE = 2;
YELLOW = 3;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mfk.html build/final/api-html/hack/function.HH.Asio.mfk.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mfk.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mfk.html 2019-09-27 15:45:24.080601077 -0700
@@ -31,11 +31,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mfk;
-
-enum COLOR: int {
+<pre><code class="language-PHP">enum COLOR: int {
RED = 1;
ORANGE = 2;
YELLOW = 3;
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mfkw.html build/final/api-html/hack/function.HH.Asio.mfkw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mfkw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mfkw.html 2019-09-27 15:45:24.088601186 -0700
@@ -35,11 +35,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mfkw;
-
-// Return all non-negative odd numbers
+<pre><code class="language-PHP">// Return all non-negative odd numbers
// Positive evens filtered out,
// Negatives and zero cause exception
$odds = \HH\Asio\join(\HH\Asio\mfkw(
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mfw.html build/final/api-html/hack/function.HH.Asio.mfw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mfw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mfw.html 2019-09-27 15:45:24.096601292 -0700
@@ -35,11 +35,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mfw;
-
-// Return all non-negative odd numbers
+<pre><code class="language-PHP">// Return all non-negative odd numbers
// Positive evens filtered out,
// Negatives and zero cause exception
$odds = \HH\Asio\join(\HH\Asio\mfw(
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.m.html build/final/api-html/hack/function.HH.Asio.m.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.m.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.m.html 2019-09-27 15:45:24.072600971 -0700
@@ -25,11 +25,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\m;
-
-/**
+<pre><code class="language-PHP">/**
* Query an arbitrary number of URLs in parallel
* returning them as a Map of string responses.
*/
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mm.html build/final/api-html/hack/function.HH.Asio.mm.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mm.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mm.html 2019-09-27 15:45:24.100601346 -0700
@@ -29,11 +29,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mm;
-
-/**
+<pre><code class="language-PHP">/**
* Query an arbitrary number of URLs in parallel
* returning them as a Map of string responses.
*
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mmk.html build/final/api-html/hack/function.HH.Asio.mmk.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mmk.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mmk.html 2019-09-27 15:45:24.108601454 -0700
@@ -31,11 +31,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mmk;
-
-/**
+<pre><code class="language-PHP">/**
* Query an arbitrary number of URLs in parallel
* returning them as a Map of string responses.
*/
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mmkw.html build/final/api-html/hack/function.HH.Asio.mmkw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mmkw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mmkw.html 2019-09-27 15:45:24.112601507 -0700
@@ -35,11 +35,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mmkw;
-
-// Map a vector of numbers to their value divided by their index
+<pre><code class="language-PHP">// Map a vector of numbers to their value divided by their index
// throwing on division by zero.
$quotients = \HH\Asio\join(\HH\Asio\mmkw(
Map {
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mmw.html build/final/api-html/hack/function.HH.Asio.mmw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mmw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mmw.html 2019-09-27 15:45:24.120601614 -0700
@@ -35,11 +35,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mmw;
-
-// Map a map of numbers to their integer half
+<pre><code class="language-PHP">// Map a map of numbers to their integer half
// throwing if they can't be divided evenly
$halves = \HH\Asio\join(\HH\Asio\mmw(
Map {
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.mw.html build/final/api-html/hack/function.HH.Asio.mw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.mw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.mw.html 2019-09-27 15:45:24.128601721 -0700
@@ -32,11 +32,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\mw;
-
-async function one(): Awaitable&lt;int&gt; {
+<pre><code class="language-PHP">async function one(): Awaitable&lt;int&gt; {
return 1;
}
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vf.html build/final/api-html/hack/function.HH.Asio.vf.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vf.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vf.html 2019-09-27 15:45:24.144601936 -0700
@@ -29,11 +29,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vf;
-
-$times = ImmVector {
+<pre><code class="language-PHP">$times = ImmVector {
100000000, // Sat, 03 Mar 1973 09:46:40
200000000, // Mon, 03 May 1976 19:33:20
300000000, // Thu, 05 Jul 1979 05:20:00
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vfk.html build/final/api-html/hack/function.HH.Asio.vfk.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vfk.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vfk.html 2019-09-27 15:45:24.152602044 -0700
@@ -31,11 +31,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vfk;
-
-$times = ImmVector {
+<pre><code class="language-PHP">$times = ImmVector {
100000000, // Sat, 03 Mar 1973 09:46:40
200000000, // Mon, 03 May 1976 19:33:20
300000000, // Thu, 05 Jul 1979 05:20:00
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vfkw.html build/final/api-html/hack/function.HH.Asio.vfkw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vfkw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vfkw.html 2019-09-27 15:45:24.160602151 -0700
@@ -34,11 +34,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vfkw;
-
-// Return all non-negative odd numbers
+<pre><code class="language-PHP">// Return all non-negative odd numbers
// Positive evens and odds at every third index filtered out,
// Negatives and zero cause exception
$odds = \HH\Asio\join(\HH\Asio\vfkw(
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vfw.html build/final/api-html/hack/function.HH.Asio.vfw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vfw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vfw.html 2019-09-27 15:45:24.168602259 -0700
@@ -33,11 +33,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vfw;
-
-// Return all non-negative odd numbers
+<pre><code class="language-PHP">// Return all non-negative odd numbers
// Positive evens filtered out,
// Negatives and zero cause exception
$odds = \HH\Asio\join(\HH\Asio\vfw(
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.v.html build/final/api-html/hack/function.HH.Asio.v.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.v.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.v.html 2019-09-27 15:45:24.136601829 -0700
@@ -26,11 +26,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\v;
-
-/**
+<pre><code class="language-PHP">/**
* Query an arbitrary number of URLs in parallel
* returning them as a Vector of string responses.
*/
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vm.html build/final/api-html/hack/function.HH.Asio.vm.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vm.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vm.html 2019-09-27 15:45:24.176602365 -0700
@@ -29,11 +29,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vm;
-
-/**
+<pre><code class="language-PHP">/**
* Query an arbitrary number of URLs in parallel
* returning them as a Vector of string responses.
*
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vmk.html build/final/api-html/hack/function.HH.Asio.vmk.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vmk.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vmk.html 2019-09-27 15:45:24.184602473 -0700
@@ -31,11 +31,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vmk;
-
-/**
+<pre><code class="language-PHP">/**
* Query an arbitrary number of URLs in parallel
* returning them as a Vector of string responses.
*/
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vmkw.html build/final/api-html/hack/function.HH.Asio.vmkw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vmkw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vmkw.html 2019-09-27 15:45:24.196602634 -0700
@@ -34,11 +34,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vmkw;
-
-// Map a vector of numbers to their value divided by their index
+<pre><code class="language-PHP">// Map a vector of numbers to their value divided by their index
// throwing on division by zero.
$quotients = \HH\Asio\join(\HH\Asio\vmkw(
Vector {1, 2, 6, 12},
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vmw.html build/final/api-html/hack/function.HH.Asio.vmw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vmw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vmw.html 2019-09-27 15:45:24.204602742 -0700
@@ -33,11 +33,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vmw;
-
-// Map a vector of numbers to half integer half
+<pre><code class="language-PHP">// Map a vector of numbers to half integer half
// throwing if they can't be divided evenly
$halves = \HH\Asio\join(\HH\Asio\vmw(
Vector {1, 2, 3, 4},
diff -r -U 3 ../tmp-build-old/final/api-html/hack/function.HH.Asio.vw.html build/final/api-html/hack/function.HH.Asio.vw.html
--- ../tmp-build-old/final/api-html/hack/function.HH.Asio.vw.html 2019-09-27 12:30:15.814834113 -0700
+++ build/final/api-html/hack/function.HH.Asio.vw.html 2019-09-27 15:45:24.212602849 -0700
@@ -30,11 +30,7 @@
</ul>
<h2 class="headingWithAnchor" id="examples">Examples<a href="#examples"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\API\Examples\HH\Asio\vw;
-
-async function one(): Awaitable&lt;int&gt; {
+<pre><code class="language-PHP">async function one(): Awaitable&lt;int&gt; {
return 1;
}
diff -r -U 3 ../tmp-build-old/final/build_id.txt build/final/build_id.txt
--- ../tmp-build-old/final/build_id.txt 2019-09-27 12:30:15.750833419 -0700
+++ build/final/build_id.txt 2019-09-27 15:44:54.864209032 -0700
@@ -1 +1 @@
-HHVM=HHVM-4.24.0:HSL=v4.15.2:2019-09-27T12:28:21-0700:8e8238d6e0fca59e3801f77449ac03bcc5dc9c8f
+HHVM=HHVM-4.24.0:HSL=v4.15.2:2019-09-27T15:44:54-0700:ae22e19b8f8eed1d4afdab0df770f85cf5a91645
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/async-vs.-awaitable.html build/final/guides-html/hack/asynchronous-operations/async-vs.-awaitable.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/async-vs.-awaitable.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/async-vs.-awaitable.html 2019-09-27 15:45:06.968371454 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>Why is the <code>async</code> keyword needed for functions that return <a href="/hack/reference/class/HH.Awaitable/"><code>Awaitable</code></a>? Because it is possible to have non-async functions that
return awaitables; the <code>async</code> keyword is merely an implementation detail. For this reason, <code>async</code> is not allowed in interfaces. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\AsyncVsAwaitables\Examples\Impl;
-
-interface Car {
+<pre><code class="language-PHP">interface Car {
// It doesn't matter to the caller how this is implemented, only that it
// returns an Awaitable&lt;void&gt;
public function drive(): Awaitable&lt;void&gt;;
@@ -14,11 +10,7 @@
</div>
<p>This can be implemented with an async function, like this:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\AsyncVsAwaitables\Examples\Impl;
-
-require_once &quot;interface.inc.php&quot;;
+<pre><code class="language-PHP">require_once &quot;interface.inc.php&quot;;
class Ford implements Car {
public async function drive(): Awaitable&lt;void&gt; {
@@ -29,11 +21,7 @@
</div>
<p>It can also be implemented by a non-async function, like this:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\AsyncVsAwaitables\Examples\Impl;
-
-require_once &quot;interface.inc.php&quot;;
+<pre><code class="language-PHP">require_once &quot;interface.inc.php&quot;;
class VolkswagenDiesel implements Car {
public function drive(): Awaitable&lt;void&gt; {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/awaitables.html build/final/guides-html/hack/asynchronous-operations/awaitables.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/awaitables.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/awaitables.html 2019-09-27 15:45:06.876370221 -0700
@@ -12,11 +12,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Awaitables\Examples\AwaitableReturn;
-
-async function f(): Awaitable&lt;int&gt; {
+<pre><code class="language-PHP">async function f(): Awaitable&lt;int&gt; {
return 2;
}
@@ -47,11 +43,7 @@
<h3 class="headingWithAnchor" id="awaiting__batching-awaitables">Batching Awaitables<a href="#awaiting__batching-awaitables"><i class="glyphIcon fa fa-link"></i></a></h3>
<p>Many times, we will <code>await</code> on one <a href="/hack/reference/class/HH.Awaitable/"><code>Awaitable</code></a>, get the result, and move on. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Awaitables\Examples\SingleAwaitable;
-
-async function foo(): Awaitable&lt;int&gt; {
+<pre><code class="language-PHP">async function foo(): Awaitable&lt;int&gt; {
return 3;
}
@@ -77,12 +69,7 @@
<li><a href="/hsl/reference/function/HH.Lib.Dict.from_async/"><code>HH\Lib\Dict\from_async</code></a>: dict of awaitables with integer or string keys</li>
</ul>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Awaitables\Examples\MultipleAwaitables;
-use namespace HH\Lib\Dict;
-
-async function quads(float $n): Awaitable&lt;float&gt; {
+<pre><code class="language-PHP">async function quads(float $n): Awaitable&lt;float&gt; {
return $n * 4.0;
}
@@ -107,11 +94,7 @@
takes an <a href="/hack/reference/class/HH.Awaitable/"><code>Awaitable</code></a> and blocks until it resolves to a result.</p>
<p>This means that invocations of async functions from the top-level scope cannot be awaited, and must be joined.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\AsyncOps\Awaitables\Examples\Join;
-
-async function get_raw(string $url): Awaitable&lt;string&gt; {
+<pre><code class="language-PHP">async function get_raw(string $url): Awaitable&lt;string&gt; {
return await \HH\Asio\curl_exec($url);
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/blocks.html build/final/guides-html/hack/asynchronous-operations/blocks.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/blocks.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/blocks.html 2019-09-27 15:45:06.892370435 -0700
@@ -18,11 +18,7 @@
<li>Replace the call required by an async lambda to return an actual <a href="/hack/reference/class/HH.Awaitable/"><code>Awaitable&lt;T&gt;</code></a>.</li>
</ul>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Blocks\Examples\SyntaticSugar;
-
-async function gen_int(): Awaitable&lt;int&gt; {
+<pre><code class="language-PHP">async function gen_int(): Awaitable&lt;int&gt; {
return 4;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/examples.html build/final/guides-html/hack/asynchronous-operations/examples.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/examples.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/examples.html 2019-09-27 15:45:07.028372260 -0700
@@ -4,11 +4,7 @@
<h2 class="headingWithAnchor" id="basic">Basic<a href="#basic"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This example shows the basic tenants of async, particularly the keywords used:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Examples\Examples\Basic;
-
-// async specifies a function will return an awaitable. Awaitable&lt;string&gt; means
+<pre><code class="language-PHP">// async specifies a function will return an awaitable. Awaitable&lt;string&gt; means
// that the awaitable will ultimately return a string when complete
async function trivial(): Awaitable&lt;string&gt; {
return &quot;Hello&quot;;
@@ -36,11 +32,7 @@
<h2 class="headingWithAnchor" id="joining">Joining<a href="#joining"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>To get the result of an awaitable in a non-async function, use <code>join</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Examples\Examples\Join;
-
-async function join_async(): Awaitable&lt;string&gt; {
+<pre><code class="language-PHP">async function join_async(): Awaitable&lt;string&gt; {
return &quot;Hello&quot;;
}
@@ -58,11 +50,7 @@
<h2 class="headingWithAnchor" id="async-closures-and-lambdas">Async Closures and Lambdas<a href="#async-closures-and-lambdas"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Closure and lambda expressions can involve async functions:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Examples\Examples\Closures;
-
-&lt;&lt;__EntryPoint&gt;&gt;
+<pre><code class="language-PHP">&lt;&lt;__EntryPoint&gt;&gt;
async function closure_async(): Awaitable&lt;void&gt; {
// closure
$hello = async function(): Awaitable&lt;string&gt; {
@@ -87,12 +75,7 @@
<h2 class="headingWithAnchor" id="data-fetching">Data Fetching<a href="#data-fetching"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This shows a way to organize async functions such that we have a nice clean data dependency graph:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Async\Examples\Examples\DataDependencies;
-use namespace HH\Lib\{Tuple, Vec};
-
-// So we can use function Vec\map_async()
+<pre><code class="language-PHP">// So we can use function Vec\map_async()
require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class PostData {
@@ -167,12 +150,7 @@
<p>Use rescheduling (via <a href="/hack/reference/function/HH.Asio.later/"><code>HH\Asio\later</code></a>) to batch up operations to send multiple keys in a single request over a high latency network (for
example purposes, the network isn't high latency, but just returns something random):</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Examples\Examples\Batching;
-use namespace HH\Lib\Vec;
-
-// For asio-utilities function later(), etc.
+<pre><code class="language-PHP">// For asio-utilities function later(), etc.
require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
async function b_one(string $key): Awaitable&lt;string&gt; {
@@ -245,12 +223,7 @@
<p>We can use rescheduling in a polling loop to allow other awaitables to run. A polling loop may be needed where a service does not have
an async function to add to the scheduler:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Examples\Examples\Polling;
-use namespace HH\Lib\Vec;
-
-// For asio-utilities function later(), etc.
+<pre><code class="language-PHP">// For asio-utilities function later(), etc.
require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
// Of course, this is all made up :)
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/exceptions.html build/final/guides-html/hack/asynchronous-operations/exceptions.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/exceptions.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/exceptions.html 2019-09-27 15:45:06.884370327 -0700
@@ -7,11 +7,7 @@
<p>However, sometimes an async function can throw an exception. The good news is that the same exception object that would be thrown in the
non-async version of the code will be returned when we <code>await</code> the awaitable.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Exceptions\Examples\BasicException;
-
-async function exception_thrower(): Awaitable&lt;void&gt; {
+<pre><code class="language-PHP">async function exception_thrower(): Awaitable&lt;void&gt; {
throw new \Exception(&quot;Return exception handle&quot;);
}
@@ -42,12 +38,7 @@
<p>The use of <code>from_async</code> ignores any successful awaitable results and just throw an exception of one of the
awaitable results, if one of the results was an exception.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Exceptions\Examples\MultipleAwaitable;
-use namespace HH\Lib\Vec;
-
-async function exception_thrower(): Awaitable&lt;void&gt; {
+<pre><code class="language-PHP">async function exception_thrower(): Awaitable&lt;void&gt; {
throw new \Exception(&quot;Return exception handle&quot;);
}
@@ -95,12 +86,7 @@
</div>
<p>Taking the example above and using the wrapping mechanism, this is what the code looks like:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Exceptions\Examples\Wrapping;
-use namespace HH\Lib\Vec;
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
async function exception_thrower(): Awaitable&lt;void&gt; {
throw new \Exception();
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/extensions.html build/final/guides-html/hack/asynchronous-operations/extensions.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/extensions.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/extensions.html 2019-09-27 15:45:06.956371293 -0700
@@ -17,11 +17,7 @@
<a href="../reference/class/AsyncMysqlQueryResult/vectorRows/"><code>vectorRows</code></a> and <a href="../reference/class/AsyncMysqlQueryResult/mapRows/"><code>mapRows</code></a>, both <em>non-async</em>.</p>
<p>Here is a simple example that shows how to get a user name from a database using this extension:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Extensions\Examples\MySQL;
-
-require __DIR__.'/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\AsyncOps\Extensions\Examples\AsyncMysql\ConnectionInfo as CI
;
@@ -100,11 +96,7 @@
<p>The async MySQL extension provides a mechanism to pool connection objects so we don't have to create a new connection every time we
want to make a query. The class is <a href="../reference/class/AsyncMysqlConnectionPool/"><a href="/hack/reference/class/AsyncMysqlConnectionPool/"><code>AsyncMysqlConnectionPool</code></a></a> and one can be created like this:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Extensions\Examples\MySQLConnectionPool;
-
-require __DIR__.'/async_mysql_connect.inc.php';
+<pre><code class="language-PHP">require __DIR__.'/async_mysql_connect.inc.php';
use \Hack\UserDocumentation\AsyncOps\Extensions\Examples\AsyncMysql\ConnectionInfo as CI
;
@@ -158,11 +150,7 @@
<a href="../reference/class/MCRouter/get/"><code>get</code></a> and <a href="../reference/class/MCRouter/del/"><code>del</code></a>.</p>
<p>Here is a simple example showing how one might get a user name from memcached:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Extensions\Examples\MCRouter;
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;; // For wrap()
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;; // For wrap()
function get_mcrouter_object(): \MCRouter {
$servers = Vector {\getenv('HHVM_TEST_MCROUTER')};
@@ -234,11 +222,7 @@
<p>Here is an example of getting a vector of URL contents, using a lambda expression to cut down on the code verbosity that would come with
full closure syntax:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Extensions\Examples\AsyncCurl;
-
-function get_urls(): vec&lt;string&gt; {
+<pre><code class="language-PHP">function get_urls(): vec&lt;string&gt; {
return vec[
&quot;http://example.com&quot;,
&quot;http://example.net&quot;,
@@ -282,12 +266,7 @@
</div>
<p>The following example shows how to use <a href="../reference/function/stream_await/"><a href="/hack/reference/function/stream_await/"><code>stream_await</code></a></a> to write to resources:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Extensions\Examples\AsyncStream;
-use namespace HH\Lib\Vec;
-
-function get_resources(): vec&lt;resource&gt; {
+<pre><code class="language-PHP">function get_resources(): vec&lt;resource&gt; {
$r1 = \fopen('php://stdout', 'w');
$r2 = \fopen('php://stdout', 'w');
$r3 = \fopen('php://stdout', 'w');
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/generators.html build/final/guides-html/hack/asynchronous-operations/generators.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/generators.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/generators.html 2019-09-27 15:45:06.964371400 -0700
@@ -11,11 +11,7 @@
<a href="/hack/reference/function/HH.Asio.usleep/"><code>usleep</code></a> to imitate a second-by-second countdown clock. Note that in the
<code>happy_new_year</code> <code>foreach</code> loop we have the syntax <code>await as</code>. This is shorthand for calling <code>await $ait-&gt;next()</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Generators\Examples\Iterator;
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
const int SECOND = 1000000; // microseconds
@@ -67,11 +63,7 @@
<p>If we are doing either of these two things, our generator must return <a href="/hack/reference/class/HH.AsyncGenerator/"><code>AsyncGenerator</code></a>. An <code>AsyncGenenator</code> has three type
parameters: the key, the value. And the type being passed to <a href="/hack/reference/class/HH.AsyncGenerator/send/"><code>send</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Generators\Examples\Send;
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
const int HALF_SECOND = 500000; // microseconds
@@ -147,11 +139,7 @@
</div>
<p>Here is how to raise an exception to an async generator.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Generators\Examples\Raise;
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
const int HALF_SECOND = 500000; // microseconds
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/guidelines.html build/final/guides-html/hack/asynchronous-operations/guidelines.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/guidelines.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/guidelines.html 2019-09-27 15:45:07.020372152 -0700
@@ -7,11 +7,7 @@
simply ready for any future changes that may require async.</p>
<p>These two programs are, for all intents and purposes, equivalent.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\NonAsyncHello;
-
-function get_hello(): string {
+<pre><code class="language-PHP">function get_hello(): string {
return &quot;Hello&quot;;
}
@@ -27,11 +23,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\AsyncHello;
-
-async function get_hello(): Awaitable&lt;string&gt; {
+<pre><code class="language-PHP">async function get_hello(): Awaitable&lt;string&gt; {
return &quot;Hello&quot;;
}
@@ -63,11 +55,7 @@
<p><strong>DON'T <code>await</code> IN A LOOP</strong></p>
<p>It totally defeats the purpose of async.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\AwaitLoop;
-
-class User {
+<pre><code class="language-PHP">class User {
public string $name;
protected function __construct(string $name) {
@@ -113,12 +101,7 @@
</ol>
<p>Instead, we will want to use our async-aware mapping function, <a href="/hsl/reference/function/HH.Lib.Vec.map_async/"><code>Vec\map_async</code></a>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\AwaitNoLoop;
-use namespace HH\Lib\Vec;
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class User {
public string $name;
@@ -176,12 +159,7 @@
<li>Generate final page of information</li>
</ol>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\DataDependencies;
-use namespace HH\Lib\Vec;
-
-// So we can use function Vec\map_async()
+<pre><code class="language-PHP">// So we can use function Vec\map_async()
require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class PostData {
@@ -265,12 +243,7 @@
run. Batching can be a good use of rescheduling. For example, say we have high latency lookup of data, but we can send multiple keys for
the lookup in a single request.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\Batching;
-use namespace HH\Lib\Vec;
-
-// For asio-utilities function later(), etc.
+<pre><code class="language-PHP">// For asio-utilities function later(), etc.
require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
async function b_one(string $key): Awaitable&lt;string&gt; {
@@ -349,11 +322,7 @@
<h2 class="headingWithAnchor" id="dont-forget-to-await-an-awaitable">Don't Forget to Await an Awaitable<a href="#dont-forget-to-await-an-awaitable"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>What do you think happens here?</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\ForgetAwait;
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
async function speak(): Awaitable&lt;void&gt; {
echo &quot;one&quot;;
@@ -380,11 +349,7 @@
<p>In order to minimize any unwanted side effects (e.g., ordering disparities), the creation and awaiting of awaitables should happen as close
together as possible.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\SideEffects;
-
-async function get_curl_data(string $url): Awaitable&lt;string&gt; {
+<pre><code class="language-PHP">async function get_curl_data(string $url): Awaitable&lt;string&gt; {
return await \HH\Asio\curl_exec($url);
}
@@ -420,11 +385,7 @@
<p>The <a href="../attributes/predefined-attributes#__memoize"><code>&lt;&lt;__Memoize&gt;&gt;</code></a> attribute does the right thing, so, use that. However, if to get
explicit control of the memoization, <em>memoize the awaitable</em> and not the result of awaiting it.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\MemoizeResult;
-
-abstract final class MemoizeResult {
+<pre><code class="language-PHP">abstract final class MemoizeResult {
private static async function time_consuming(): Awaitable&lt;string&gt; {
await \HH\Asio\usleep(5000000);
return &quot;This really is not time consuming, but the sleep fakes it.&quot;;
@@ -471,11 +432,7 @@
still a bug; the time-consuming operation is being done multiple times when it only needs to be done once.</p>
<p>Instead, memoize the awaitable:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\MemoizeAwaitable;
-
-abstract final class MemoizeAwaitable {
+<pre><code class="language-PHP">abstract final class MemoizeAwaitable {
private static async function time_consuming(): Awaitable&lt;string&gt; {
await \HH\Asio\usleep(5000000);
return &quot;Not really time consuming but sleep.&quot;; // For type-checking purposes
@@ -518,12 +475,7 @@
with the <a href="utility-functions">async utility helpers</a>. For example, look how the following three ways to accomplish the same thing can be
shortened using lambdas.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\Lambdas;
-use namespace HH\Lib\Vec;
-
-async function fourth_root(num $n): Awaitable&lt;float&gt; {
+<pre><code class="language-PHP">async function fourth_root(num $n): Awaitable&lt;float&gt; {
return \sqrt(\sqrt((float)$n));
}
@@ -585,11 +537,7 @@
<p>Imagine we are making a call to an <code>async</code> function <code>join_async</code> from a non-async scope. In order to obtain the desired results, we must
<code>join</code> in order to get the result from an awaitable.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Guidelines\Examples\Join;
-
-async function join_async(): Awaitable&lt;string&gt; {
+<pre><code class="language-PHP">async function join_async(): Awaitable&lt;string&gt; {
return &quot;Hello&quot;;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/asynchronous-operations/some-basics.html build/final/guides-html/hack/asynchronous-operations/some-basics.html
--- ../tmp-build-old/final/guides-html/hack/asynchronous-operations/some-basics.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/asynchronous-operations/some-basics.html 2019-09-27 15:45:06.852369898 -0700
@@ -31,12 +31,7 @@
</ul>
<p>For example, given the following code:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\AsyncOps\Basics\Examples\Limitations;
-use namespace HH\Lib\Vec;
-
-async function do_cpu_work(): Awaitable&lt;void&gt; {
+<pre><code class="language-PHP">async function do_cpu_work(): Awaitable&lt;void&gt; {
print(&quot;Start CPU work\n&quot;);
$a = 0;
$b = 1;
@@ -90,11 +85,7 @@
<h2 class="headingWithAnchor" id="async-in-practice-curl">Async In Practice: cURL<a href="#async-in-practice-curl"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>A naive way to make two cURL requests without async could look like this:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Basics\Examples\NonAsyncCurl;
-
-function curl_A(): mixed {
+<pre><code class="language-PHP">function curl_A(): mixed {
$ch = \curl_init();
\curl_setopt($ch, \CURLOPT_URL, &quot;http://example.com/&quot;);
\curl_setopt($ch, \CURLOPT_RETURNTRANSFER, 1);
@@ -128,12 +119,7 @@
<p><img src="/s/a6a9ac56565ef538/images/async/curl-synchronous.png" alt="No Async" /></p>
<p>Fortunately, HHVM provides an async version of <code>curl_exec</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\AsyncOps\Basics\Examples\AsyncCurl;
-use namespace HH\Lib\Vec;
-
-async function curl_A(): Awaitable&lt;string&gt; {
+<pre><code class="language-PHP">async function curl_A(): Awaitable&lt;string&gt; {
$x = await \HH\Asio\curl_exec(&quot;http://example.com/&quot;);
return $x;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/attributes/predefined-attributes.html build/final/guides-html/hack/attributes/predefined-attributes.html
--- ../tmp-build-old/final/guides-html/hack/attributes/predefined-attributes.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/attributes/predefined-attributes.html 2019-09-27 15:45:15.656488037 -0700
@@ -111,11 +111,7 @@
<p>The <code>__MockClass</code> attribute allows you to override the restriction of <code>final</code> on a class or method within a class, so that a
mock class can exist.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Attributes\__MockClass\Examples\MockClass;
-
-final class FinalClass {
+<pre><code class="language-PHP">final class FinalClass {
public static function f(): void {
echo __METHOD__, &quot;\n&quot;;
}
@@ -190,9 +186,7 @@
<h2 class="headingWithAnchor" id="__enforceable">__Enforceable<a href="#__enforceable"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This attribute is used to annotate abstract type constants so they can be used in <code>is</code> and <code>as</code> expressions. The attribute restricts deriving type constants to values that are valid for a type test.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-abstract class A {
+<pre><code class="language-PHP">abstract class A {
abstract const type Tnoenf;
&lt;&lt;__Enforceable&gt;&gt;
abstract const type Tenf;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/arrays.html build/final/guides-html/hack/built-in-types/arrays.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/arrays.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/built-in-types/arrays.html 2019-09-27 15:45:06.500365174 -0700
@@ -16,26 +16,19 @@
<p>An existing element is accessed via the subscript operator, <code>[]</code>, and the value of an element can be changed; however, new values can only be added
to the end by using subscript <code>[]</code>, and key values always start at 0, and go up in increments of 1. Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
+<pre><code class="language-PHP">$colors = vec[]; // create an empty vec
+\var_dump($colors);
-namespace Hack\UserDocumentation\Types\Arrays\Examples\VecColors;
+$colors[] = &quot;red&quot;; // add element 0 with value &quot;red&quot;
+$colors[] = &quot;white&quot;; // add element 1 with value &quot;white&quot;
+$colors[] = &quot;blue&quot;; // add element 2 with value &quot;blue&quot;
+\var_dump($colors);
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $colors = vec[]; // create an empty vec
- \var_dump($colors);
+$colors[0] = &quot;pink&quot;; // change element 0's value to &quot;pink&quot;
+\var_dump($colors);
- $colors[] = &quot;red&quot;; // add element 0 with value &quot;red&quot;
- $colors[] = &quot;white&quot;; // add element 1 with value &quot;white&quot;
- $colors[] = &quot;blue&quot;; // add element 2 with value &quot;blue&quot;
- \var_dump($colors);
-
- $colors[0] = &quot;pink&quot;; // change element 0's value to &quot;pink&quot;
- \var_dump($colors);
-
- $colors = vec[&quot;green&quot;, &quot;yellow&quot;]; // create a vec of two elements
- \var_dump($colors);
-}
+$colors = vec[&quot;green&quot;, &quot;yellow&quot;]; // create a vec of two elements
+\var_dump($colors);
</code></pre>
</div>
<em>Output</em>
@@ -197,30 +190,23 @@
same (or even compatible) types! That said, there are library functions to convert between vec and dict objects.</p>
<p>Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
+<pre><code class="language-PHP">$colors = dict[]; // create an empty dict
+\var_dump($colors);
-namespace Hack\UserDocumentation\Types\Arrays\Examples\DictColors;
+$colors[4] = &quot;black&quot;; // create element 4 with value &quot;black&quot;
+\var_dump($colors);
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $colors = dict[]; // create an empty dict
- \var_dump($colors);
-
- $colors[4] = &quot;black&quot;; // create element 4 with value &quot;black&quot;
- \var_dump($colors);
-
- $colors[4] = &quot;red&quot;; // replace element 4's value with &quot;red&quot;
- $colors[8] = &quot;white&quot;; // create element 8 with value &quot;white&quot;
- $colors[-3] = &quot;blue&quot;; // create element -3 with value &quot;blue&quot;
- \var_dump($colors);
-
- $colors = dict[
- -10 =&gt; &quot;white&quot;,
- 12 =&gt; &quot;blue&quot;,
- 0 =&gt; &quot;red&quot;,
- ]; // create a dict with 3 elements
- \var_dump($colors);
-}
+$colors[4] = &quot;red&quot;; // replace element 4's value with &quot;red&quot;
+$colors[8] = &quot;white&quot;; // create element 8 with value &quot;white&quot;
+$colors[-3] = &quot;blue&quot;; // create element -3 with value &quot;blue&quot;
+\var_dump($colors);
+
+$colors = dict[
+ -10 =&gt; &quot;white&quot;,
+ 12 =&gt; &quot;blue&quot;,
+ 0 =&gt; &quot;red&quot;,
+]; // create a dict with 3 elements
+\var_dump($colors);
</code></pre>
</div>
<em>Output</em>
@@ -438,29 +424,22 @@
<p>An existing element is accessed via the subscript operator, <code>[]</code>; the value of an element cannot be changed. And new values can only be added
by using subscript <code>[]</code>. Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
+<pre><code class="language-PHP">$colors = keyset[]; // create an empty keyset
+\var_dump($colors);
-namespace Hack\UserDocumentation\Types\Arrays\Examples\KeysetColors;
+$colors[] = &quot;red&quot;; // add element with key/value &quot;red&quot;
+$colors[] = &quot;white&quot;; // add element with key/value &quot;white&quot;
+$colors[] = &quot;blue&quot;; // add element with key/value &quot;blue&quot;
+\var_dump($colors);
+
+$colors = keyset[
+ &quot;green&quot;,
+ &quot;yellow&quot;,
+ &quot;green&quot;,
+]; // create a keyset of two elements
+\var_dump($colors);
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $colors = keyset[]; // create an empty keyset
- \var_dump($colors);
-
- $colors[] = &quot;red&quot;; // add element with key/value &quot;red&quot;
- $colors[] = &quot;white&quot;; // add element with key/value &quot;white&quot;
- $colors[] = &quot;blue&quot;; // add element with key/value &quot;blue&quot;
- \var_dump($colors);
-
- $colors = keyset[
- &quot;green&quot;,
- &quot;yellow&quot;,
- &quot;green&quot;,
- ]; // create a keyset of two elements
- \var_dump($colors);
-
- echo &quot;\$colors[\&quot;green\&quot;] = &quot;.$colors[&quot;green&quot;].&quot;\n&quot;;
-}
+echo &quot;\$colors[\&quot;green\&quot;] = &quot;.$colors[&quot;green&quot;].&quot;\n&quot;;
</code></pre>
</div>
<em>Output</em>
@@ -643,23 +622,16 @@
<p>The value (and possibly the type) of an existing element is obtained or changed, and new elements are inserted, using the
<a href="../expressions-and-operators/subscript">subscript operator <code>[]</code></a>. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
+<pre><code class="language-PHP">$colors = array(); // create an empty array
+\var_dump($colors);
-namespace Hack\UserDocumentation\Types\Arrays\Examples\LegAryColors;
+$colors[4] = &quot;black&quot;; // create element 4 with value &quot;black&quot;
+\var_dump($colors);
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $colors = array(); // create an empty array
- \var_dump($colors);
-
- $colors[4] = &quot;black&quot;; // create element 4 with value &quot;black&quot;
- \var_dump($colors);
-
- $colors[4] = &quot;red&quot;; // replace element 4’s value with &quot;red&quot;
- $colors[8] = &quot;white&quot;; // create element 8 with value &quot;white&quot;
- $colors[-3] = &quot;blue&quot;; // create element -3 with value &quot;blue&quot;
- \var_dump($colors);
-}
+$colors[4] = &quot;red&quot;; // replace element 4’s value with &quot;red&quot;
+$colors[8] = &quot;white&quot;; // create element 8 with value &quot;white&quot;
+$colors[-3] = &quot;blue&quot;; // create element -3 with value &quot;blue&quot;
+\var_dump($colors);
</code></pre>
</div>
<em>Output</em>
@@ -681,23 +653,16 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
+<pre><code class="language-PHP">$fruits = array(); // create an empty array
+\var_dump($fruits);
-namespace Hack\UserDocumentation\Types\Arrays\Examples\LegAryFruits;
+$fruits['oranges'] = 22; // create element 4 with value &quot;black&quot;
+\var_dump($fruits);
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $fruits = array(); // create an empty array
- \var_dump($fruits);
-
- $fruits['oranges'] = 22; // create element 4 with value &quot;black&quot;
- \var_dump($fruits);
-
- $fruits['oranges'] = 18; // replace element 4’s value with &quot;red&quot;
- $fruits['apples'] = 15; // create element 8 with value &quot;white&quot;
- $fruits['pears'] = 12; // create element -3 with value &quot;blue&quot;
- \var_dump($fruits);
-}
+$fruits['oranges'] = 18; // replace element 4’s value with &quot;red&quot;
+$fruits['apples'] = 15; // create element 8 with value &quot;white&quot;
+$fruits['pears'] = 12; // create element -3 with value &quot;blue&quot;
+\var_dump($fruits);
</code></pre>
</div>
<em>Output</em>
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/bool.html build/final/guides-html/hack/built-in-types/bool.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/bool.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/built-in-types/bool.html 2019-09-27 15:45:06.332362920 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>The Boolean type <code>bool</code> can store two distinct values, which correspond to the Boolean values True and False, respectively.</p>
<p>Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Bool\Examples\LeapYearTest;
-
-function is_leap_year(int $yy): bool {
+<pre><code class="language-PHP">function is_leap_year(int $yy): bool {
return ((($yy &amp; 3) === 0) &amp;&amp; (($yy % 100) !== 0)) || (($yy % 400) === 0);
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/dynamic.html build/final/guides-html/hack/built-in-types/dynamic.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/dynamic.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/built-in-types/dynamic.html 2019-09-27 15:45:06.600366516 -0700
@@ -28,9 +28,7 @@
examples). All types coerce to <code>dynamic</code>, which allows callers to pass any type into a function that expects dynamic. Also, any type
coerces to its supertypes. Coercion points include function calls, return statements, and property assignment.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-function f(dynamic $d): void {}
+<pre><code class="language-PHP">function f(dynamic $d): void {}
function g(arraykey $a): void {}
function caller(int $i): void {
@@ -48,9 +46,7 @@
</ul>
<p>Hack approximates this runtime behavior by allowing values of type <code>dynamic</code> to coerce to enforceable types at coercion points.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-function enforced(int $i): void {}
+<pre><code class="language-PHP">function enforced(int $i): void {}
function notEnforced(shape('a' =&gt; int) $s): void {}
function caller(dynamic $d): void {
@@ -62,9 +58,7 @@
</div>
<p>Unions with dynamic are also allowed to coerce to enforceable types provided that each element of the union can coerce.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-function expect_int(int $i): void {}
+<pre><code class="language-PHP">function expect_int(int $i): void {}
function expect_string(string $s): void {}
function choose(bool $b, dynamic $d, int $i): void {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/enumerated-types.html build/final/guides-html/hack/built-in-types/enumerated-types.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/enumerated-types.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/built-in-types/enumerated-types.html 2019-09-27 15:45:06.564366033 -0700
@@ -4,11 +4,7 @@
values like Top, Bottom, Left, Right, and Center. And while we could use <code>int</code>, that type allows far more invalid values than there are valid ones.
The solution is to use an enumerated type and its associated values. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Enums\Examples\Positions;
-
-enum Position: int {
+<pre><code class="language-PHP">enum Position: int {
Top = 0;
Bottom = 1;
Left = 2;
@@ -52,11 +48,7 @@
of values is up to the programmer.) And while enumerated constant within any given enumerated type must be distinct, multiple constants <em>can</em>
be given the <em>same</em> value. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Enums\Examples\Colors;
-
-enum Colors: int {
+<pre><code class="language-PHP">enum Colors: int {
Red = 3;
White = 5;
Blue = 10;
@@ -67,11 +59,7 @@
<p>The initializer for an enumeration can contain non-trivial constant expressions including references to the names of other enumeration-constants
in the same enumerated type. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Enums\Examples\BitFlags;
-
-enum BitFlags: int as int {
+<pre><code class="language-PHP">enum BitFlags: int as int {
F1 = 1; // value 1
F2 = BitFlags::F1 &lt;&lt; 1; // value 2
F3 = BitFlags::F2 &lt;&lt; 1; // value 4
@@ -84,11 +72,7 @@
the relational or bitwise operators), but not vice versa.</p>
<p>Here's an example that uses enumeration constants with <code>string</code> values:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Enums\Examples\Permission;
-
-enum Permission: string {
+<pre><code class="language-PHP">enum Permission: string {
Read = 'R';
Write = 'W';
Execute = 'E';
@@ -99,11 +83,7 @@
<p>All enumerated types behave as if they contain a set of public static methods.</p>
<p>Here is an example that uses several of these methods:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Enums\Examples\TestMethods;
-
-require_once(&quot;Positions.inc.php&quot;);
+<pre><code class="language-PHP">require_once(&quot;Positions.inc.php&quot;);
use Hack\UserDocumentation\Types\Enums\Examples\Positions\Position as Position;
&lt;&lt;__EntryPoint&gt;&gt;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/float.html build/final/guides-html/hack/built-in-types/float.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/float.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/built-in-types/float.html 2019-09-27 15:45:06.348363134 -0700
@@ -4,11 +4,7 @@
<p>The library functions <code>is_finite</code>, <code>is_infinite</code>, and <code>is_nan</code> indicate if a given floating-point value is finite, infinite, or a NaN, respectively.</p>
<p>Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Float\Examples\Average;
-
-function average_float(float $p1, float $p2): float {
+<pre><code class="language-PHP">function average_float(float $p1, float $p2): float {
return ($p1 + $p2) / 2.0;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/int.html build/final/guides-html/hack/built-in-types/int.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/int.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/built-in-types/int.html 2019-09-27 15:45:06.340363028 -0700
@@ -6,11 +6,7 @@
unary minus is applied to the smallest value.</p>
<p>Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Int\Examples\LeapYearTest;
-
-function is_leap_year(int $yy): bool {
+<pre><code class="language-PHP">function is_leap_year(int $yy): bool {
return ((($yy &amp; 3) === 0) &amp;&amp; (($yy % 100) !== 0)) || (($yy % 400) === 0);
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/num.html build/final/guides-html/hack/built-in-types/num.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/num.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/built-in-types/num.html 2019-09-27 15:45:06.352363188 -0700
@@ -13,11 +13,7 @@
type <a href="/hack/reference/interface/HH.Container/"><code>Container</code></a>-of-type-<code>num</code> and returns a nullable-of-<code>float</code>.</p>
<p>Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Num\Examples\NumArgs;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private float $x;
private float $y;
public function __construct(num $x = 0, num $y = 0) {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/shapes.html build/final/guides-html/hack/built-in-types/shapes.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/shapes.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/built-in-types/shapes.html 2019-09-27 15:45:06.540365712 -0700
@@ -53,11 +53,7 @@
<p>For non-trivial shape types (like the name and address one above), it can be cumbersome to write out the complete type. Fortunately, Hack provides
a type-aliasing capability via <code>type</code> (and <code>newtype</code>), which is demonstrated in the next example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Shapes\Examples\Banking;
-
-enum Bank: int {
+<pre><code class="language-PHP">enum Bank: int {
DEPOSIT = 1;
WITHDRAWAL = 2;
TRANSFER = 3;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/string.html build/final/guides-html/hack/built-in-types/string.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/string.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/built-in-types/string.html 2019-09-27 15:45:06.396363778 -0700
@@ -13,11 +13,7 @@
</div>
<p>Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\String\Examples\ObjectToString;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private float $x;
private float $y;
public function __construct(num $x = 0, num $y = 0) {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/this.html build/final/guides-html/hack/built-in-types/this.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/this.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/built-in-types/this.html 2019-09-27 15:45:06.572366141 -0700
@@ -2,11 +2,7 @@
a trait. (The type name <code>this</code> should not be confused with <a href="../source-code-fundamentals/names"><code>$this</code></a>, which refers to <em>the current
instance</em>, whose type is <code>this</code>.) For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\This\Examples\Interface;
-
-interface I1 {
+<pre><code class="language-PHP">interface I1 {
abstract const type T1 as arraykey;
public function get_ID(): this::T1;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/tuples.html build/final/guides-html/hack/built-in-types/tuples.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/tuples.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/built-in-types/tuples.html 2019-09-27 15:45:06.524365497 -0700
@@ -35,11 +35,7 @@
<p>For non-trivial tuple types, it can be cumbersome to write out the complete type. Fortunately, Hack provides a type-aliasing capability via
<code>newtype</code> (and <code>type</code>). For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Tuples\Examples\Distance;
-
-newtype Point = (float, float);
+<pre><code class="language-PHP">newtype Point = (float, float);
function create_point(float $x, float $y): Point {
return tuple($x, $y);
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/built-in-types/void.html build/final/guides-html/hack/built-in-types/void.html
--- ../tmp-build-old/final/guides-html/hack/built-in-types/void.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/built-in-types/void.html 2019-09-27 15:45:06.400363832 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>The type <code>void</code> indicates the absence of a value. It is used to declare that a function does <em>not</em> return any value. As such, a void function
can contain one or more <code>return</code> statements, provided none of them return a value. Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Void\Examples\DrawLine;
-
-function draw_line(Point $p1, Point $p2): void { /* ... */ }
+<pre><code class="language-PHP">function draw_line(Point $p1, Point $p2): void { /* ... */ }
class Point {
private float $x;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/constants.html build/final/guides-html/hack/classes/constants.html
--- ../tmp-build-old/final/guides-html/hack/classes/constants.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/constants.html 2019-09-27 15:45:05.964357982 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>A class may contain definitions for named constants, which have public visibility. A class constant belongs to the class
as a whole, so it is implicitly <code>static</code>. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Constants\Examples\AutoColor;
-
-class Automobile {
+<pre><code class="language-PHP">class Automobile {
const DEFAULT_COLOR = &quot;white&quot;;
// ...
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/constructors.html build/final/guides-html/hack/classes/constructors.html
--- ../tmp-build-old/final/guides-html/hack/classes/constructors.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/constructors.html 2019-09-27 15:45:06.004358519 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>A constructor is a specially named instance method that is used to initialize the instance immediately after it has been created. A
constructor is called by the <a href="../expressions-and-operators/new"><code>new</code> operator</a>. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Constructors\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private static int $pointCount = 0; // static property with initializer
private float $x; // instance property
private float $y; // instance property
@@ -42,11 +38,7 @@
<p>A constructor does not require a return type, but if one is included, it must be <code>void</code>.</p>
<p>Consider the following example in which one of the constructor parameter declarations contains a visibility modifier:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Constructors\Examples\ParmVisibiity;
-
-class C {
+<pre><code class="language-PHP">class C {
private int $pr1;
public int $pr2;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/defining-a-basic-class.html build/final/guides-html/hack/classes/defining-a-basic-class.html
--- ../tmp-build-old/final/guides-html/hack/classes/defining-a-basic-class.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/defining-a-basic-class.html 2019-09-27 15:45:05.956357874 -0700
@@ -9,11 +9,7 @@
</ul>
<p>Here's an extract from a Point class that supports a two-dimensional Cartesian point:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Basics\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private float $x; // instance property
private float $y; // instance property
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/implementing-an-interface.html build/final/guides-html/hack/classes/implementing-an-interface.html
--- ../tmp-build-old/final/guides-html/hack/classes/implementing-an-interface.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/implementing-an-interface.html 2019-09-27 15:45:06.052359163 -0700
@@ -3,11 +3,7 @@
of <em>abstract</em> methods, where those methods are implemented by client classes as they see fit. An interface allows unrelated classes to
implement the same facilities with the same names and types without requiring those classes to share a common base class. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Interfaces\Examples\MyCollection;
-
-interface MyCollection {
+<pre><code class="language-PHP">interface MyCollection {
const MAX_NUMBER_ITEMS = 1000;
public function put(int $item): void;
public function get(): int;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/inheritance.html build/final/guides-html/hack/classes/inheritance.html
--- ../tmp-build-old/final/guides-html/hack/classes/inheritance.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/inheritance.html 2019-09-27 15:45:06.096359753 -0700
@@ -2,11 +2,7 @@
languages, classes in Hack are <strong>not</strong> all derived from a common ancestor.</p>
<p>Every user-defined exception class <em>must</em> extend the library class <code>Exception</code>. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Inheritance\Examples\MyRangeException;
-
-class MyRangeException extends \Exception {
+<pre><code class="language-PHP">class MyRangeException extends \Exception {
public function __construct(string $message, int $val) {
parent::__construct($message);
// ...
@@ -26,11 +22,7 @@
</div>
<p>An <em>abstract</em> class is a base type intended for derivation, but which cannot be instantiated directly. A <em>concrete</em> class is a class that is not abstract. In the following example, <code>Vehicle</code> and <code>Aircraft</code> are abstract types while <code>PassengerJet</code> is concrete:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Inheritance\Examples\Vehicles;
-
-abstract class Vehicle {
+<pre><code class="language-PHP">abstract class Vehicle {
public abstract function get_max_speed(): int;
// ...
}
@@ -91,11 +83,7 @@
than once. A call to a base-class constructor searches for the nearest constructor in the class hierarchy. Not every level of the hierarchy
need have a constructor. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Inheritance\Examples\ColoredPoint;
-
-enum Color: int {
+<pre><code class="language-PHP">enum Color: int {
// ...
}
@@ -117,11 +105,7 @@
that with a concrete type constant. Conceptually, type constants are to types, as abstract methods are to methods. A type constant has
public visibility and is implicitly static. By convention, a type constant's name begins with an uppercase <code>T</code>. Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Inheritance\Examples\TypeConstants;
-
-abstract class CBase {
+<pre><code class="language-PHP">abstract class CBase {
abstract const type T;
public function __construct(protected this::T $value) {}
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/methods.html build/final/guides-html/hack/classes/methods.html
--- ../tmp-build-old/final/guides-html/hack/classes/methods.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/methods.html 2019-09-27 15:45:05.988358303 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>A method is a class-specific function belonging to the class as a whole (in which case, it's declared <code>static</code>) or to each instance of that
class (in which case, <code>static</code> is absent). Each method has its own visibility. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Methods\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private static int $pointCount = 0; // static property with initializer
private float $x; // instance property
private float $y; // instance property
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/methods-with-predefined-semantics.html build/final/guides-html/hack/classes/methods-with-predefined-semantics.html
--- ../tmp-build-old/final/guides-html/hack/classes/methods-with-predefined-semantics.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/methods-with-predefined-semantics.html 2019-09-27 15:45:06.112359968 -0700
@@ -49,11 +49,7 @@
<h2 class="headingWithAnchor" id="method-__tostring">Method __toString<a href="#method-__tostring"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>This public instance method is intended to create a string representation of the instance on which it is called. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\PredefinedMethods\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private static int $pointCount = 0; // static property with initializer
private float $x; // instance property
private float $y; // instance property
@@ -88,11 +84,7 @@
<p>If the instance's class is derived from a class that has or inherits a <code>__toString</code> method, the result of calling that method should be
prepended to the returned string. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\PredefinedMethods\Examples\MyRangeException;
-
-class MyRangeException extends \Exception {
+<pre><code class="language-PHP">class MyRangeException extends \Exception {
public function __toString(): string {
return parent::__toString().&quot;&gt;&gt;MyRangeException stuff&lt;&lt;&quot;;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/object-disposal.html build/final/guides-html/hack/classes/object-disposal.html
--- ../tmp-build-old/final/guides-html/hack/classes/object-disposal.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/object-disposal.html 2019-09-27 15:45:06.040359001 -0700
@@ -6,11 +6,7 @@
we need to make sure that output buffers are flushed, among other things. Let us call these tasks <em>object cleanup</em>. (The
example is skeletal; it has only the minimal machinery needed to demonstrate object disposal.)</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\ObjectDisposal\Examples\TextFile;
-
-class TextFile implements \IDisposable {
+<pre><code class="language-PHP">class TextFile implements \IDisposable {
private ?int $fileHandle = null;
private bool $openFlag = false;
private string $fileName;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/properties.html build/final/guides-html/hack/classes/properties.html
--- ../tmp-build-old/final/guides-html/hack/classes/properties.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/properties.html 2019-09-27 15:45:05.980358196 -0700
@@ -2,11 +2,7 @@
or belonging to each instance of that class (in which case, <code>static</code> is absent). Each property has its own visibility.
For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Properties\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private static int $pointCount = 0; // static property with initializer
private float $x; // instance property
private float $y; // instance property
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/trait-and-interface-requirements.html build/final/guides-html/hack/classes/trait-and-interface-requirements.html
--- ../tmp-build-old/final/guides-html/hack/classes/trait-and-interface-requirements.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/trait-and-interface-requirements.html 2019-09-27 15:45:06.072359431 -0700
@@ -16,11 +16,7 @@
<h2 class="headingWithAnchor" id="traits">Traits<a href="#traits"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Here is an example of a trait that introduces a class and interface requirement, and shows a class that meets the requirement:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TIR\Examples\TraitReqGood;
-
-abstract class Machine {
+<pre><code class="language-PHP">abstract class Machine {
public function openDoors(): void {
return;
}
@@ -68,11 +64,7 @@
</div>
<p>Here is an example of a trait that introduces a class and interface requirement, and shows a class that <em>does not</em> meet the requirement:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TIR\Examples\TraitReqBad;
-
-abstract class Machine {
+<pre><code class="language-PHP">abstract class Machine {
public function openDoors(): void {
return;
}
@@ -126,11 +118,7 @@
<h2 class="headingWithAnchor" id="interfaces">Interfaces<a href="#interfaces"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Here is an example of an interface that introduces a class requirement, and shows a class that meets the requirement:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TIR\Examples\InterfaceReqGood;
-
-abstract class Machine {
+<pre><code class="language-PHP">abstract class Machine {
public function openDoors(): void {
return;
}
@@ -172,11 +160,7 @@
</div>
<p>Here is an example of an interface that introduces a class requirement, and shows a class that <em>does not</em> meet the requirement:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TIR\Examples\InterfaceReqBad;
-
-abstract class Machine {
+<pre><code class="language-PHP">abstract class Machine {
public function openDoors(): void {
return;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/type-constants.html build/final/guides-html/hack/classes/type-constants.html
--- ../tmp-build-old/final/guides-html/hack/classes/type-constants.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/type-constants.html 2019-09-27 15:45:06.004358519 -0700
@@ -2,11 +2,7 @@
and inheritance hierarchies, so they are discussed under those topics.</p>
<p>For now, the declaration of a type constant involves the keywords <code>const type</code>. Without explanation, here's an example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TypeConstants\Examples\Simple;
-
-abstract class CBase {
+<pre><code class="language-PHP">abstract class CBase {
abstract const type T;
// ...
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/type-constants-revisited.html build/final/guides-html/hack/classes/type-constants-revisited.html
--- ../tmp-build-old/final/guides-html/hack/classes/type-constants-revisited.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/type-constants-revisited.html 2019-09-27 15:45:06.104359861 -0700
@@ -1,10 +1,6 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>Imagine that you have a class, and some various <code>extends</code> to that class.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TypeConstantsRevisited\Examples\NonParameterized;
-
-abstract class User {
+<pre><code class="language-PHP">abstract class User {
public function __construct(private int $id) {}
public function getID(): int {
return $this-&gt;id;
@@ -40,11 +36,7 @@
<p>While this situation could be handled by using generics, an alternate approach is to use type constants. Instead of types being declared
as parameters directly on the class itself, type constants allow the type to be declared as class member constants instead.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TypeConstantsRevisited\Examples\TypeConstants;
-
-abstract class User {
+<pre><code class="language-PHP">abstract class User {
abstract const type T as arraykey;
public function __construct(private this::T $id) {}
public function getID(): this::T {
@@ -116,11 +108,7 @@
<p>This example shows the real benefit of type constants. The property is defined in <code>Base</code>, but can have different types depending
on the context of where it is being used.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TypeConstantsRevisited\Examples\Annotate;
-
-abstract class Base {
+<pre><code class="language-PHP">abstract class Base {
abstract const type T;
protected this::T $value;
}
@@ -167,11 +155,7 @@
<h3 class="headingWithAnchor" id="examples__referencing-type-constants">Referencing Type Constants<a href="#examples__referencing-type-constants"><i class="glyphIcon fa fa-link"></i></a></h3>
<p>Referencing type constants is as easy as referencing a static class constant.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TypeConstantsRevisited\Exampes\Referencing;
-
-abstract class UserTC {
+<pre><code class="language-PHP">abstract class UserTC {
abstract const type Ttc as arraykey;
public function __construct(private this::Ttc $id) {}
public function getID(): this::Ttc {
@@ -203,11 +187,7 @@
<p>For type constants declared in classes, it is possible to provide a constraint as well as a concrete type. When a constraint is provided this allows
the type constant to be overridden by child classes. This feature is <em>not</em> supported for interfaces.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TypeConstantsRevisited\Examples\Overriding;
-
-abstract class BaseAbstract {
+<pre><code class="language-PHP">abstract class BaseAbstract {
abstract const type T;
}
@@ -236,11 +216,7 @@
<h3 class="headingWithAnchor" id="examples__type-constants-and-instance-methods">Type Constants and Instance Methods<a href="#examples__type-constants-and-instance-methods"><i class="glyphIcon fa fa-link"></i></a></h3>
<p>You can use type constants as inputs to class instance methods.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\TypeConstantsRevisited\Examples\Instance;
-
-abstract class Box {
+<pre><code class="language-PHP">abstract class Box {
abstract const type T;
public function __construct(private this::T $value) {}
public function get(): this::T {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/classes/using-a-trait.html build/final/guides-html/hack/classes/using-a-trait.html
--- ../tmp-build-old/final/guides-html/hack/classes/using-a-trait.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/classes/using-a-trait.html 2019-09-27 15:45:06.064359324 -0700
@@ -4,11 +4,7 @@
class does not involve any inheritance hierarchy, so unrelated classes can use the same trait. In summary, a trait is a set of methods and/or
state information that can be reused. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Classes\Traits\Examples\Common;
-
-trait Common {
+<pre><code class="language-PHP">trait Common {
private int $size = 1000;
public function compute(): void { /* ... */ }
public static function getData(): int { /* ... */
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/expressions-and-operators/coalesce.html build/final/guides-html/hack/expressions-and-operators/coalesce.html
--- ../tmp-build-old/final/guides-html/hack/expressions-and-operators/coalesce.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/expressions-and-operators/coalesce.html 2019-09-27 15:45:05.576352775 -0700
@@ -2,24 +2,19 @@
result is <code>e1</code>. Otherwise, <code>e2</code> is evaluated, and its value becomes the result.
There is a sequence point after the evaluation of <code>e1</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">namespace Hack\UserDocumentation\ExpAndOps\Coalesce\Basics;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $nully = null;
- $nonnull = 'a string';
- \print_r(vec[
- $nully ?? 10, // 10 as $nully is `null`
- $nonnull ?? 10, // 'a string' as $nonnull is `nonnull`
- ]);
-
- $arr = dict['black' =&gt; 10, 'white' =&gt; null];
- \print_r(vec[
- $arr['black'] ?? -100, // 10 as $arr['black'] is defined and not null
- $arr['white'] ?? -200, // -200 as $arr['white'] is null
- $arr['green'] ?? -300, // -300 as $arr['blue'] is not defined
- ]);
-}
+<pre><code class="language-PHP">$nully = null;
+$nonnull = 'a string';
+\print_r(vec[
+ $nully ?? 10, // 10 as $nully is `null`
+ $nonnull ?? 10, // 'a string' as $nonnull is `nonnull`
+]);
+
+$arr = dict['black' =&gt; 10, 'white' =&gt; null];
+\print_r(vec[
+ $arr['black'] ?? -100, // 10 as $arr['black'] is defined and not null
+ $arr['white'] ?? -200, // -200 as $arr['white'] is null
+ $arr['green'] ?? -300, // -300 as $arr['blue'] is not defined
+]);
</code></pre>
</div>
<em>Output</em>
@@ -56,18 +51,13 @@
value if the given key does not exist, while <code>??</code> uses the fallback value even
if a key exists but has <code>null</code> value. Compare these examples to the ones above:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">namespace Hack\UserDocumentation\ExpAndOps\Coalesce\Idx;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $arr = dict['black' =&gt; 10, 'white' =&gt; null];
- \print_r(vec[
- idx($arr, 'black', -100), // 10
- idx($arr, 'white', -200), // null
- idx($arr, 'green', -300), // -300
- idx($arr, 'green'), // null
- ]);
-}
+<pre><code class="language-PHP">$arr = dict['black' =&gt; 10, 'white' =&gt; null];
+\print_r(vec[
+ idx($arr, 'black', -100), // 10
+ idx($arr, 'white', -200), // null
+ idx($arr, 'green', -300), // -300
+ idx($arr, 'green'), // null
+]);
</code></pre>
</div>
<em>Output</em>
@@ -97,10 +87,7 @@
</div>
<p>The <code>??=</code> operator is very useful for initializing elements of a collection:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">namespace Hack\UserDocumentation\ExpAndOps\Coalesce\Assignment;
-use namespace HH\Lib\{Dict, Str};
-
-function get_counts_by_value(Traversable&lt;string&gt; $values): dict&lt;string, int&gt; {
+<pre><code class="language-PHP">function get_counts_by_value(Traversable&lt;string&gt; $values): dict&lt;string, int&gt; {
$counts_by_value = dict[];
foreach ($values as $value) {
$counts_by_value[$value] ??= 0;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/expressions-and-operators/echo.html build/final/guides-html/hack/expressions-and-operators/echo.html
--- ../tmp-build-old/final/guides-html/hack/expressions-and-operators/echo.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/expressions-and-operators/echo.html 2019-09-27 15:45:05.188347568 -0700
@@ -1,18 +1,11 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>This intrinsic function converts the value of an expression to <code>string</code> (if necessary) and writes the string to standard output. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
+<pre><code class="language-PHP">$v1 = true;
+$v2 = 123.45;
+echo '&gt;&gt;'.$v1.'|'.$v2.&quot;&lt;&lt;\n&quot;; // outputs &quot;&gt;&gt;1|123&lt;&lt;&quot;
-namespace Hack\UserDocumentation\ExpAndOps\Echo\Examples\Basics;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $v1 = true;
- $v2 = 123.45;
- echo '&gt;&gt;'.$v1.'|'.$v2.&quot;&lt;&lt;\n&quot;; // outputs &quot;&gt;&gt;1|123&lt;&lt;&quot;
-
- $v3 = &quot;abc{$v2}xyz&quot;;
- echo &quot;$v3\n&quot;;
-}
+$v3 = &quot;abc{$v2}xyz&quot;;
+echo &quot;$v3\n&quot;;
</code></pre>
</div>
<em>Output</em>
@@ -26,11 +19,7 @@
<p><code>echo</code> cannot output an array. However, <code>echo</code> can output the value of an object <em>provided</em> its type defines
a <a href="../classes/methods-with-predefined-semantics#method-__tostring"><code>__toString</code> method</a>. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExprAndOps\Echo\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private float $x;
private float $y;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/expressions-and-operators/function-call.html build/final/guides-html/hack/expressions-and-operators/function-call.html
--- ../tmp-build-old/final/guides-html/hack/expressions-and-operators/function-call.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/expressions-and-operators/function-call.html 2019-09-27 15:45:05.408350521 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>A function is called using the <code>()</code> operator, which optionally contains a comma-separated list of expressions called <em>arguments</em>. Consider
the following function definition and call:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExprAndOps\FunctionCall\Examples\Distance;
-
-newtype Point = (float, float);
+<pre><code class="language-PHP">newtype Point = (float, float);
function create_point(float $x, float $y): Point {
return tuple($x, $y);
@@ -40,32 +36,25 @@
expression that designates a function, and alternative approaches are available beside using that function's name. Consider the following example,
which indexes into an array of anonymous-function objects, and calls the resulting unnamed function:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExpAndOps\FunctionCall\Examples\Closures;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $table = vec[
- (
- function(int $p) {
- return $p * 2;
- }
- ), // doubles
- (
- function(int $p) {
- return $p * 5;
- }
- ), // times 5
- ];
+<pre><code class="language-PHP">$table = vec[
+ (
+ function(int $p) {
+ return $p * 2;
+ }
+ ), // doubles
+ (
+ function(int $p) {
+ return $p * 5;
+ }
+ ), // times 5
+];
+
+$i = 0;
+$v = $table[$i++]($i); // eval is L-to-R
+echo &quot;\$v = $v\n&quot;;
- $i = 0;
- $v = $table[$i++]($i); // eval is L-to-R
- echo &quot;\$v = $v\n&quot;;
-
- $v = $table[$i](++$i); // eval is L-to-R
- echo &quot;\$v = $v\n&quot;;
-}
+$v = $table[$i](++$i); // eval is L-to-R
+echo &quot;\$v = $v\n&quot;;
</code></pre>
</div>
<em>Output</em>
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/expressions-and-operators/member-selection.html build/final/guides-html/hack/expressions-and-operators/member-selection.html
--- ../tmp-build-old/final/guides-html/hack/expressions-and-operators/member-selection.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/expressions-and-operators/member-selection.html 2019-09-27 15:45:05.408350521 -0700
@@ -1,10 +1,6 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>The operator <code>-&gt;</code> is used to select an instance property or instance method from a given object; for example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExpAndOps\MemberSelection\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private float $x;
private float $y;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/expressions-and-operators/new.html build/final/guides-html/hack/expressions-and-operators/new.html
--- ../tmp-build-old/final/guides-html/hack/expressions-and-operators/new.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/expressions-and-operators/new.html 2019-09-27 15:45:05.392350306 -0700
@@ -2,11 +2,7 @@
class's <a href="../classes/constructors">constructor</a> passing it the optional argument list, just like a function call. If the class has no
constructor, the constructor that class inherits (if any) is used. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExprAndOps\New\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private static int $pointCount = 0; // static property with initializer
private float $x; // instance property
private float $y; // instance property
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/expressions-and-operators/string-concatenation.html build/final/guides-html/hack/expressions-and-operators/string-concatenation.html
--- ../tmp-build-old/final/guides-html/hack/expressions-and-operators/string-concatenation.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/expressions-and-operators/string-concatenation.html 2019-09-27 15:45:05.496351702 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>The binary operator <code>.</code> creates a string that is the concatenation of the left-hand operand and the right-hand operand, in that order. If
either or both operands have types other than <code>string</code>, their values are converted to type <code>string</code>. Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExpAndOps\StringConcatenation\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private float $x;
private float $y;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/expressions-and-operators/yield.html build/final/guides-html/hack/expressions-and-operators/yield.html
--- ../tmp-build-old/final/guides-html/hack/expressions-and-operators/yield.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/expressions-and-operators/yield.html 2019-09-27 15:45:05.612353258 -0700
@@ -5,11 +5,7 @@
the runtime calls the generator function implicitly to get the element. Then the runtime saves the state of the generator for subsequent
element-fetch requests. Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExpAndOps\Yield\Examples\Series;
-
-function series(
+<pre><code class="language-PHP">function series(
int $start,
int $end,
int $incr = 1,
@@ -55,11 +51,7 @@
for each collection. This is demonstrated in the output, which has keys 0-5.</p>
<p><code>yield</code> can also specify the value of a key; for example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExpAndOps\Yield\Examples\Squares;
-
-function squares(
+<pre><code class="language-PHP">function squares(
int $start,
int $end,
string $keyPrefix = &quot;&quot;,
@@ -91,11 +83,7 @@
type of <code>squares</code> now uses <code>string</code> as the first generic type argument, as the element type has a key of type <code>string</code>.</p>
<p>The following example uses <code>yield</code> to generate a collection of strings, each of which is a record from a text file:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\ExpAndOps\Yield\Examples\ProcessFile;
-
-function getTextFileLines(string $filename): \Generator&lt;int, string, void&gt; {
+<pre><code class="language-PHP">function getTextFileLines(string $filename): \Generator&lt;int, string, void&gt; {
$infile = \fopen($filename, 'r');
if ($infile === false) {
// handle file-open failure
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/functions/anonymous-functions.html build/final/guides-html/hack/functions/anonymous-functions.html
--- ../tmp-build-old/final/guides-html/hack/functions/anonymous-functions.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/functions/anonymous-functions.html 2019-09-27 15:45:05.876356801 -0700
@@ -16,11 +16,7 @@
<p>There are two ways to create an anonymous function object: via a <a href="../expressions-and-operators/closure-creation">closure-creation</a> expression
or a <a href="../expressions-and-operators/lambda-creation">lambda-creation</a> expression. Consider the following example which shows both approaches:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Anonymous\Examples\Basics;
-
-function do_it((function(int): int) $process, int $value): int {
+<pre><code class="language-PHP">function do_it((function(int): int) $process, int $value): int {
return $process($value);
}
@@ -74,20 +70,13 @@
The resulting object can then be used to call that function, as in <code>$lambda(5)</code>.</p>
<p>The <code>==&gt;</code> operator is right-associative, and lambda expressions can be chained together; for example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Anonymous\Examples\Chaining;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $lam1 = $x ==&gt; $y ==&gt; $x + $y;
- $lam2 = $lam1(10);
- $res = $lam2(7);
- echo &quot;\$res = $res\n&quot;;
+<pre><code class="language-PHP">$lam1 = $x ==&gt; $y ==&gt; $x + $y;
+$lam2 = $lam1(10);
+$res = $lam2(7);
+echo &quot;\$res = $res\n&quot;;
- $res = $lam1(10)(7);
- echo &quot;\$res = $res\n&quot;;
-}
+$res = $lam1(10)(7);
+echo &quot;\$res = $res\n&quot;;
</code></pre>
</div>
<em>Output</em>
@@ -104,11 +93,7 @@
</div>
<p>Consider the following example, in which an anonymous function accesses variables declared outside it:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Anonymous\Examples\UseClause;
-
-function get_process_1(int $val1): (function(int): int) {
+<pre><code class="language-PHP">function get_process_1(int $val1): (function(int): int) {
$val2 = $val1 * 3;
$af = function(int $p): int use ($val1, $val2) {
return $p + $val1 + $val2;
@@ -152,11 +137,7 @@
<p>Note the expression <code>get_process_2(2)(4)</code>. As <code>get_process_2</code> is a function, we can call that. And as it returns an anonymous function, we can call that.</p>
<p>Consider the following example, which calls an anonymous function stored in an instance property:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Anonymous\Examples\Run;
-
-class C {
+<pre><code class="language-PHP">class C {
private (function(int): int) $af;
public function __construct((function(int): int) $af) {
$this-&gt;af = $af;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/functions/calling-a-function.html build/final/guides-html/hack/functions/calling-a-function.html
--- ../tmp-build-old/final/guides-html/hack/functions/calling-a-function.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/functions/calling-a-function.html 2019-09-27 15:45:05.844356371 -0700
@@ -10,11 +10,7 @@
of type <code>float</code>, and it returns a value of the same type.</p>
<p>Hack supports recursion; that is, a function can call itself directly or indirectly. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Calling\Examples\Recursion;
-
-function factorial(int $i): int {
+<pre><code class="language-PHP">function factorial(int $i): int {
return ($i &gt; 1) ? $i * factorial($i - 1) : $i;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/functions/defining-a-function.html build/final/guides-html/hack/functions/defining-a-function.html
--- ../tmp-build-old/final/guides-html/hack/functions/defining-a-function.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/functions/defining-a-function.html 2019-09-27 15:45:05.856356532 -0700
@@ -32,11 +32,7 @@
an ellipsis (<code>...</code>) as the last part of a parameter list. The parameter list components preceding that represents the fixed part while the
ellipsis represents the variable part. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Definition\Examples\Varargs;
-
-function maximum(int $val1, int ...$vals): int {
+<pre><code class="language-PHP">function maximum(int $val1, int ...$vals): int {
$retVal = $val1;
foreach ($vals as $e) {
if ($e &gt; $retVal) $retVal = $e;
@@ -62,11 +58,7 @@
<p>By default, arguments are passed by value; however, if a parameter contains the <code>inout</code> modifier, the corresponding argument must also
contain that modifier. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Definition\Examples\Swap;
-
-function swap(inout int $i1, inout int $i2): void {
+<pre><code class="language-PHP">function swap(inout int $i1, inout int $i2): void {
$temp = $i1;
$i1 = $i2;
$i2 = $temp;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/functions/some-basics.html build/final/guides-html/hack/functions/some-basics.html
--- ../tmp-build-old/final/guides-html/hack/functions/some-basics.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/functions/some-basics.html 2019-09-27 15:45:05.824356103 -0700
@@ -8,11 +8,7 @@
expressions</em>, or more simply, <em>arguments</em>. These correspond by position to the <em>parameters</em> in a <em>parameter list</em> in the called function's
definition. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Introduction\Examples\Distance;
-
-&lt;&lt;__EntryPoint&gt;&gt;
+<pre><code class="language-PHP">&lt;&lt;__EntryPoint&gt;&gt;
function main(): void {
$pA = create_point(3.5, -6.2);
$pB = create_point(-2.4, 3.6);
@@ -53,11 +49,7 @@
with a top-level function. That is, methods are called using the function-call operator, they take zero or more arguments, and they return
zero or one value. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Functions\Introduction\Examples\Point;
-
-class Point {
+<pre><code class="language-PHP">class Point {
private float $x; // instance property
private float $y; // instance property
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/generics/reified-generics.html build/final/guides-html/hack/generics/reified-generics.html
--- ../tmp-build-old/final/guides-html/hack/generics/reified-generics.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/generics/reified-generics.html 2019-09-27 15:45:06.768368770 -0700
@@ -8,11 +8,7 @@
<p>The goal of opt-in reified generics is to bridge the gap between generics and runtime availability while keeping erasure available to maintain performance when reification is not needed. To mark a generic as reified, simply add the <code>reify</code> keyword at the declaration site.</p>
<h2 class="headingWithAnchor" id="reified-generics__parameter-and-return-type-verification">Parameter and return type verification<a href="#reified-generics__parameter-and-return-type-verification"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-namespace Hack\UserDocumentation\Generics\ReifiedGenerics\Examples\TypeVerification;
-
-class C&lt;reify T&gt; {}
+<pre><code class="language-PHP">class C&lt;reify T&gt; {}
function f(C&lt;int&gt; $c): void {}
@@ -27,11 +23,7 @@
</div>
<p>The reified type parameter is checked as well:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-namespace Hack\UserDocumentation\Generics\ReifiedGenerics\Examples\TypeVerification2;
-
-class C&lt;reify T&gt; {}
+<pre><code class="language-PHP">class C&lt;reify T&gt; {}
function f&lt;reify T&gt;(T $x): C&lt;T&gt; {
return new C&lt;int&gt;();
@@ -48,11 +40,7 @@
<h2 class="headingWithAnchor" id="reified-generics__type-testing-and-assertion-with-is-and-as-expressions">Type testing and assertion with <code>is</code> and <code>as</code> expressions<a href="#reified-generics__type-testing-and-assertion-with-is-and-as-expressions"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Suppose you have a <code>vec&lt;mixed&gt;</code> and you want to extract all types <code>T</code> from it. Prior to reified generics, you'd need to implement a new function for each type <code>T</code> but with reified generics you can do this in a generic way. Start by adding the keyword <code>reify</code> to the type parameter list.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-namespace Hack\UserDocumentation\Generics\ReifiedGenerics\Examples\TypeTesting;
-
-function filter&lt;&lt;&lt;__Enforceable&gt;&gt; reify T&gt;(vec&lt;mixed&gt; $list): vec&lt;T&gt; {
+<pre><code class="language-PHP">function filter&lt;&lt;&lt;__Enforceable&gt;&gt; reify T&gt;(vec&lt;mixed&gt; $list): vec&lt;T&gt; {
$ret = vec[];
foreach ($list as $elem) {
if ($elem is T) {
@@ -87,11 +75,7 @@
<h2 class="headingWithAnchor" id="reified-generics__creating-an-instance-of-a-class-with-new">Creating an instance of a class with <code>new</code><a href="#reified-generics__creating-an-instance-of-a-class-with-new"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Prior to reified generics, in order to create a new instance of a class without a constant class name, you'd need to pass it as <code>classname&lt;T&gt;</code> which is not type safe. In the runtime, classnames are strings.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-namespace Hack\UserDocumentation\Generics\ReifiedGenerics\Examples\New;
-
-&lt;&lt;__ConsistentConstruct&gt;&gt;
+<pre><code class="language-PHP">&lt;&lt;__ConsistentConstruct&gt;&gt;
abstract class A {}
class B extends A {}
@@ -124,11 +108,7 @@
</div>
<h2 class="headingWithAnchor" id="reified-generics__accessing-a-class-constant--static-class-method">Accessing a class constant / static class method<a href="#reified-generics__accessing-a-class-constant--static-class-method"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh
-
-namespace Hack\UserDocumentation\Generics\ReifiedGenerics\Examples\Access;
-
-class C {
+<pre><code class="language-PHP">class C {
const string class_const = &quot;hi&quot;;
public static function h&lt;reify T&gt;(): void {}
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/generics/some-basics.html build/final/guides-html/hack/generics/some-basics.html
--- ../tmp-build-old/final/guides-html/hack/generics/some-basics.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/generics/some-basics.html 2019-09-27 15:45:06.620366785 -0700
@@ -5,11 +5,7 @@
<p>Generics allow programmers to write a class or method with the ability to be parameterized to any set of types, all while preserving type safety.</p>
<p>Consider the following example in which <code>Stack</code> is a generic class having one type parameter, <code>T</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Generics\Introduction\Examples\Stack;
-
-class StackUnderflowException extends \Exception {}
+<pre><code class="language-PHP">class StackUnderflowException extends \Exception {}
class Stack&lt;T&gt; {
private vec&lt;T&gt; $stack;
@@ -38,10 +34,7 @@
<code>push</code>, and as the return type of the instance method <code>pop</code>. Note that although <code>push</code> and <code>pop</code> use the type parameter, they are not themselves
generic methods.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Generics\Introduction\Examples\StackTest;
-require_once(&quot;Stack.inc.php&quot;);
+<pre><code class="language-PHP">require_once(&quot;Stack.inc.php&quot;);
function useIntStack(
\Hack\UserDocumentation\Generics\Introduction\Examples\Stack\Stack&lt;int&gt;
@@ -59,11 +52,7 @@
<p>The <em>arity</em> of a generic type or method is the number of type parameters declared for that type or method. As such, class <code>Stack</code> has arity 1.</p>
<p>Here is an example of a generic function, <code>swap</code>, having one type parameter, <code>T</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Generics\Introduction\Examples\Swap;
-
-function swap&lt;T&gt;(inout T $i1, inout T $i2): void {
+<pre><code class="language-PHP">function swap&lt;T&gt;(inout T $i1, inout T $i2): void {
$temp = $i1;
$i1 = $i2;
$i2 = $temp;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/generics/type-constraints.html build/final/guides-html/hack/generics/type-constraints.html
--- ../tmp-build-old/final/guides-html/hack/generics/type-constraints.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/generics/type-constraints.html 2019-09-27 15:45:06.644367106 -0700
@@ -9,11 +9,7 @@
</ul>
<p>Consider the following example in which function <code>max_val</code> has one type parameter, <code>T</code>, and that has a constraint, <code>num</code>:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Generics\TypeConstraints\Examples\MaxVal;
-
-function max_val&lt;T as num&gt;(T $p1, T $p2): T {
+<pre><code class="language-PHP">function max_val&lt;T as num&gt;(T $p1, T $p2): T {
return $p1 &gt; $p2 ? $p1 : $p2;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/generics/variance.html build/final/guides-html/hack/generics/variance.html
--- ../tmp-build-old/final/guides-html/hack/generics/variance.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/generics/variance.html 2019-09-27 15:45:06.652367214 -0700
@@ -9,11 +9,7 @@
<p>If <code>Foo&lt;int&gt;</code> is a subtype of <code>Foo&lt;num&gt;</code>, then <code>Foo</code> is covariant on <code>T</code>. 'co' means 'with'; and the subtype relationship of the generic
type goes with the subtype relationship of arguments to a covariant type parameter. Here is an example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\Generics\Variance\Examples\Covariance;
-
-// This class is readonly. Had we put in a setter for $this-&gt;t, we could not
+<pre><code class="language-PHP">// This class is readonly. Had we put in a setter for $this-&gt;t, we could not
// use covariance. e.g., if we had function setMe(T $x), you would get this
// cov.php:9:25,25: Illegal usage of a covariant type parameter (Typing[4120])
// cov.php:7:10,10: This is where the parameter was declared as covariant (+)
@@ -49,11 +45,7 @@
<p>If <code>Foo&lt;num&gt;</code> is a subtype of <code>Foo&lt;int&gt;</code>, then <code>Foo</code> is contravariant on <code>T</code>. 'contra' means 'against'; and the subtype relationship
of the generic type goes against the subtype relationship of arguments to a contravariant type parameter. Here is an example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace Hack\UserDocumentation\Generics\Variance\Examples\Contravariance;
-
-// This class is write only. Had we put in a getter for $this-&gt;t, we could not
+<pre><code class="language-PHP">// This class is write only. Had we put in a getter for $this-&gt;t, we could not
// use contravariance. e.g., if we had function getMe(T $x): T, you would get
// con.php:10:28,28: Illegal usage of a contravariant type
// parameter (Typing[4121])
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/comments.html build/final/guides-html/hack/source-code-fundamentals/comments.html
--- ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/comments.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/source-code-fundamentals/comments.html 2019-09-27 15:45:04.368336565 -0700
@@ -1,10 +1,6 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>There are two forms of comments: delimited and single-line. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Comments\Examples\UseComments;
-
-/* Class Point represents a point in a two-dimensional Cartesian
+<pre><code class="language-PHP">/* Class Point represents a point in a two-dimensional Cartesian
coordinate system. */
class Point {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/constants.html build/final/guides-html/hack/source-code-fundamentals/constants.html
--- ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/constants.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/source-code-fundamentals/constants.html 2019-09-27 15:45:04.744341611 -0700
@@ -2,11 +2,7 @@
of two ways: using the <code>const</code> keyword at the top level, or inside a class or
interface. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Constants\Examples\DefiningConstants;
-
-const int MAX_COUNT = 123;
+<pre><code class="language-PHP">const int MAX_COUNT = 123;
class C {
const float MAX_HEIGHT = 10.5;
const float UPPER_LIMIT = C::MAX_HEIGHT;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/literals.html build/final/guides-html/hack/source-code-fundamentals/literals.html
--- ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/literals.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/source-code-fundamentals/literals.html 2019-09-27 15:45:04.576339357 -0700
@@ -136,11 +136,7 @@
is performed.</p>
<p>Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Literals\Examples\DQVariableSubstitution;
-
-class C {
+<pre><code class="language-PHP">class C {
public int $p1 = 2;
}
@@ -166,11 +162,7 @@
A heredoc literal supports variable substitution as defined for <a href="#string-literals__double-quoted-string-literals">double-quoted string literals</a>.
For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Literals\Examples\HeredocLiterals;
-
-&lt;&lt;__EntryPoint&gt;&gt;
+<pre><code class="language-PHP">&lt;&lt;__EntryPoint&gt;&gt;
function main(): void {
$v = 123;
$s = &lt;&lt;&lt; ID
@@ -196,11 +188,7 @@
id is enclosed in single quotes ('). The two forms of string literal have the same semantics and constraints except that a
nowdoc string literal is not subject to variable substitution. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Literals\Examples\NowdocLiterals;
-
-&lt;&lt;__EntryPoint&gt;&gt;
+<pre><code class="language-PHP">&lt;&lt;__EntryPoint&gt;&gt;
function main(): void {
$v = 123;
$s = &lt;&lt;&lt; 'ID'
@@ -227,11 +215,7 @@
<p>Here, <code>null</code> is used as a default argument value in the library function <code>log</code>.</p>
<p>In the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Literals\Examples\NullLiteral;
-
-type IdSet = shape('id' =&gt; ?string, 'url' =&gt; ?string, 'count' =&gt; int);
+<pre><code class="language-PHP">type IdSet = shape('id' =&gt; ?string, 'url' =&gt; ?string, 'count' =&gt; int);
function get_IdSet(): IdSet {
return shape('id' =&gt; null, 'url' =&gt; null, 'count' =&gt; 0);
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/names.html build/final/guides-html/hack/source-code-fundamentals/names.html
--- ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/names.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/source-code-fundamentals/names.html 2019-09-27 15:45:04.392336888 -0700
@@ -2,11 +2,7 @@
with an upper- or lowercase letter or underscore, which can optionally be followed by those same characters or decimal digits.
Furthermore, variable names (which includes function parameter names) and property names <em>must</em> be preceded by <code>$</code>. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Names\Examples\SomeNames;
-
-class Data {
+<pre><code class="language-PHP">class Data {
const int MAX_VALUE = 100;
private int $value = 0;
/* ... */
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/namespaces.html build/final/guides-html/hack/source-code-fundamentals/namespaces.html
--- ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/namespaces.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/source-code-fundamentals/namespaces.html 2019-09-27 15:45:04.860343168 -0700
@@ -48,9 +48,7 @@
<p>A namespace can import—that is, get access to—one or more names into a scope, optionally giving them each an alias.
Each of those names may designate a namespace, a sub-namespace, a class, an interface, or a trait. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace NS1 {
+<pre><code class="language-PHP">namespace NS1 {
const int CON1 = 100;
function f(): void {
echo &quot;In &quot;.__FUNCTION__.&quot;\n&quot;;
@@ -90,9 +88,7 @@
</code></pre>
</div>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Namespaces\Examples\Main;
+<pre><code class="language-PHP">namespace Hack\UserDocumentation\Fundamentals\Namespaces\Examples\Main;
require_once(&quot;namespaces.inc.php&quot;);
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/variables.html build/final/guides-html/hack/source-code-fundamentals/variables.html
--- ../tmp-build-old/final/guides-html/hack/source-code-fundamentals/variables.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/source-code-fundamentals/variables.html 2019-09-27 15:45:04.764341879 -0700
@@ -32,11 +32,7 @@
variables <code>$count</code> and <code>$message</code> take on the type of the respective value being assigned to them.</p>
<p>Consider the following example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Fundamentals\Variables\Examples\LocalVar;
-
-function f(): void {
+<pre><code class="language-PHP">function f(): void {
$lv = 1;
echo &quot;\$lv = $lv\n&quot;;
++$lv;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/continue.html build/final/guides-html/hack/statements/continue.html
--- ../tmp-build-old/final/guides-html/hack/statements/continue.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/statements/continue.html 2019-09-27 15:45:05.720354707 -0700
@@ -1,16 +1,9 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>A <code>continue</code> statement terminates the execution of the innermost enclosing <code>do</code>, <code>for</code>, <code>foreach</code>, or <code>while</code> statement. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\Continue\Examples\OddValues;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- for ($i = 1; $i &lt;= 10; ++$i) {
- if (($i % 2) === 0)
- continue;
- echo &quot;$i is odd\n&quot;;
- }
+<pre><code class="language-PHP">for ($i = 1; $i &lt;= 10; ++$i) {
+ if (($i % 2) === 0)
+ continue;
+ echo &quot;$i is odd\n&quot;;
}
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/do.html build/final/guides-html/hack/statements/do.html
--- ../tmp-build-old/final/guides-html/hack/statements/do.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/statements/do.html 2019-09-27 15:45:05.692354332 -0700
@@ -4,18 +4,11 @@
to the point immediately following the end of the <code>do</code> statement. The loop body (that is, the single statement) is executed one or more times.
Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\Do\Examples\TableOfSquares;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $i = 1;
- do {
- echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
- ++$i;
- } while ($i &lt;= 10);
-}
+<pre><code class="language-PHP">$i = 1;
+do {
+ echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
+ ++$i;
+} while ($i &lt;= 10);
</code></pre>
</div>
<em>Output</em>
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/expression-statements.html build/final/guides-html/hack/statements/expression-statements.html
--- ../tmp-build-old/final/guides-html/hack/statements/expression-statements.html 2019-09-27 12:30:15.830834286 -0700
+++ build/final/guides-html/hack/statements/expression-statements.html 2019-09-27 15:45:05.652353795 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>An <em>expression statement</em> is simply <em>any</em> expression followed by a semicolon (<code>;</code>). The expression is evaluated for its side-effects <em>only</em>;
any resulting value is discarded. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\Expression\Examples\Useful;
-
-function do_it(): int {
+<pre><code class="language-PHP">function do_it(): int {
return 100;
}
@@ -19,11 +15,7 @@
</div>
<p>While the following expression statements are syntactically correct, they serve no useful purpose:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\Expression\Examples\Useless;
-
-function f(int $i): void {
+<pre><code class="language-PHP">function f(int $i): void {
$i;
-$i;
123 &lt;&lt; $i;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/for.html build/final/guides-html/hack/statements/for.html
--- ../tmp-build-old/final/guides-html/hack/statements/for.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/statements/for.html 2019-09-27 15:45:05.712354600 -0700
@@ -1,29 +1,22 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>The <code>for</code> statement is typically used to step through a range of values in ascending or descending increments, performing some set of operations
on each value. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\For\Examples\TableOfSquares;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- for ($i = 1; $i &lt;= 5; ++$i) {
- echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
- }
+<pre><code class="language-PHP">for ($i = 1; $i &lt;= 5; ++$i) {
+ echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
+}
- $i = 1;
- for (; $i &lt;= 5; ) {
- echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
- ++$i;
- }
+$i = 1;
+for (; $i &lt;= 5; ) {
+ echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
+ ++$i;
+}
- $i = 1;
- for (; ; ) {
- if ($i &gt; 5)
- break;
- echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
- ++$i;
- }
+$i = 1;
+for (; ; ) {
+ if ($i &gt; 5)
+ break;
+ echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
+ ++$i;
}
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/return.html build/final/guides-html/hack/statements/return.html
--- ../tmp-build-old/final/guides-html/hack/statements/return.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/statements/return.html 2019-09-27 15:45:05.728354815 -0700
@@ -3,11 +3,7 @@
type), whose type must be compatible with the function's declared return type. If the <code>return</code> statement contains no value, or there
is no <code>return</code> statement (in which case, execution drops into the function's closing brace), no value is returned. For example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\Return\Examples\Various;
-
-function average_float(float $p1, float $p2): float {
+<pre><code class="language-PHP">function average_float(float $p1, float $p2): float {
return ($p1 + $p2) / 2.0;
}
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/try.html build/final/guides-html/hack/statements/try.html
--- ../tmp-build-old/final/guides-html/hack/statements/try.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/statements/try.html 2019-09-27 15:45:05.784355567 -0700
@@ -15,11 +15,7 @@
</ul>
<p>Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\Try\Examples\Simple;
-
-function do_it(int $x, int $y): void {
+<pre><code class="language-PHP">function do_it(int $x, int $y): void {
try {
$result = $x / $y;
echo &quot;\$result = $result\n&quot;;
@@ -53,11 +49,7 @@
only an exception of that type is thrown, is the catch handler code executed.</p>
<p>Consider the following hierarchy of exception-class types:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\Try\Examples\Classes;
-
-class DeviceException extends \Exception { /*...*/ }
+<pre><code class="language-PHP">class DeviceException extends \Exception { /*...*/ }
class DiskException extends DeviceException { /*...*/ }
class RemovableDiskException extends DiskException { /*...*/ }
class FloppyDiskException extends RemovableDiskException { /*...*/ }
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/use.html build/final/guides-html/hack/statements/use.html
--- ../tmp-build-old/final/guides-html/hack/statements/use.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/statements/use.html 2019-09-27 15:45:05.788355620 -0700
@@ -3,9 +3,7 @@
present at the top level.</p>
<p>Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace UseNS {
+<pre><code class="language-PHP">namespace UseNS {
const int CON = 100;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/statements/while.html build/final/guides-html/hack/statements/while.html
--- ../tmp-build-old/final/guides-html/hack/statements/while.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/statements/while.html 2019-09-27 15:45:05.684354225 -0700
@@ -4,17 +4,10 @@
control transfers to the point immediately following the end of the <code>while</code> statement. The loop body (that is, the single statement) is executed
zero or more times. Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Statements\While\Examples\TableOfSquares;
-
-&lt;&lt;__EntryPoint&gt;&gt;
-function main(): void {
- $i = 1;
- while ($i &lt;= 10) {
- echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
- ++$i;
- }
+<pre><code class="language-PHP">$i = 1;
+while ($i &lt;= 10) {
+ echo &quot;$i\t&quot;.($i * $i).&quot;\n&quot;; // output a table of squares
+ ++$i;
}
</code></pre>
</div>
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/types/generic-types.html build/final/guides-html/hack/types/generic-types.html
--- ../tmp-build-old/final/guides-html/hack/types/generic-types.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/types/generic-types.html 2019-09-27 15:45:06.152360505 -0700
@@ -2,11 +2,7 @@
them via type parameters.</p>
<p>Consider the following example in which <code>Stack</code> is a generic class having one type parameter, <code>T</code>, and that implements a stack:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Generics\Examples\Stk;
-
-class StackUnderflowException extends \Exception {}
+<pre><code class="language-PHP">class StackUnderflowException extends \Exception {}
class Stack&lt;T&gt; {
private vec&lt;T&gt; $stack;
@@ -35,11 +31,7 @@
the parameter type of the instance method <code>push</code>, and as the return type of the instance method <code>pop</code>. Note that although <code>push</code> and <code>pop</code> use
the type parameter, they are not themselves generic methods.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\Generics\Examples\UseStack;
-
-require_once('Stack.inc.php');
+<pre><code class="language-PHP">require_once('Stack.inc.php');
function use_int_stack(
\Hack\UserDocumentation\Types\Generics\Examples\Stk\Stack&lt;int&gt; $stInt,
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/types/type-refinement.html build/final/guides-html/hack/types/type-refinement.html
--- ../tmp-build-old/final/guides-html/hack/types/type-refinement.html 2019-09-27 12:30:15.834834329 -0700
+++ build/final/guides-html/hack/types/type-refinement.html 2019-09-27 15:45:06.292362383 -0700
@@ -4,11 +4,7 @@
occur with <code>arraykey</code> and its subtypes <code>int</code> and <code>string</code>, with nullable types and their subtypes, and with <code>mixed</code> and its subtypes.)</p>
<p>Certain program elements are capable of changing the type of an expression using what is called <em>type refinement</em>. Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\TypeRefinement\Examples\Test1;
-
-function f1(?int $p): void {
+<pre><code class="language-PHP">function f1(?int $p): void {
// $x = $p % 3; // rejected; % not defined for ?int
if ($p is int) { // type refinement occurs; $p has type int
$x = $p % 3; // accepted; % defined for int
@@ -22,11 +18,7 @@
be applied. However, once execution flows out of the <code>if</code> statement, the type of the expression <code>$p</code> is <code>?int</code>.</p>
<p>Consider the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\TypeRefinement\Examples\Test2;
-
-function f2(?int $p): void {
+<pre><code class="language-PHP">function f2(?int $p): void {
if (\is_null($p)) { // type refinement occurs; $p has type null
// $x = $p % 3; // rejected; % not defined for null
} else { // type refinement occurs; $p has type int
@@ -38,11 +30,7 @@
<p>The first assignment is rejected, not because we don't know <code>$p</code>'s type, but because we know its type is not <code>int</code>. See how an opposite
type refinement occurs with the <code>else</code>. Similarly, we can write the following:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\TypeRefinement\Examples\Test3;
-
-function f3(?int $p): void {
+<pre><code class="language-PHP">function f3(?int $p): void {
if (!\is_null($p)) { // type refinement occurs; $p has type int
$x = $p % 3; // accepted; % defined for int
}
@@ -55,11 +43,7 @@
</div>
<p>Consider the following example that contains multiple selection criteria:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\TypeRefinement\Examples\Test4;
-
-function f4(?num $p): void {
+<pre><code class="language-PHP">function f4(?num $p): void {
if (($p is int) || ($p is float)) {
// $x = $p**2; // rejected
}
@@ -79,11 +63,7 @@
<p>Thus far, all the examples use the value of an expression that designates a parameter (which is a local variable). Consider the following
case, which involves a property:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-
-namespace Hack\UserDocumentation\Types\TypeRefinement\Examples\Test5;
-
-class C {
+<pre><code class="language-PHP">class C {
private ?int $p = 8; // holds an int, but type is ?int
public function m(): void {
if ($this-&gt;p is int) { // type refinement occurs; $this-&gt;p1 is int
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/XHP/basic-usage.html build/final/guides-html/hack/XHP/basic-usage.html
--- ../tmp-build-old/final/guides-html/hack/XHP/basic-usage.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/XHP/basic-usage.html 2019-09-27 15:45:15.692488521 -0700
@@ -13,9 +13,7 @@
<p>The following example utilizes three XHP classes: <code>:div</code>, <code>:strong</code>, <code>:i</code>. Whitespace is insignificant, so you can create a readable
tree structure in your code.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
&lt;&lt;__EntryPoint&gt;&gt;
function basic_usage_examples_basic_xhp(): void {
@@ -102,9 +100,7 @@
</div>
<p>More complicated expressions are also supported, for example:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class MyBasicUsageExampleClass {
public function getInt(): int {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/XHP/extending.html build/final/guides-html/hack/XHP/extending.html
--- ../tmp-build-old/final/guides-html/hack/XHP/extending.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/XHP/extending.html 2019-09-27 15:45:15.740489165 -0700
@@ -9,9 +9,7 @@
<li>implement the method <code>render</code> to return an XHP Object via <code>XHPRoot</code>.</li>
</ul>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :introduction extends :x:element {
protected function render(): \XHPRoot {
@@ -75,9 +73,7 @@
<p>You can specify an attribute as required with the <code>@required</code> declaration after the attribute name. If you try to render the XHP object and
have not set the required attribute, then an <code>XHPAttributeRequiredException</code> will be thrown.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :user-info extends :x:element {
attribute int userid @required;
@@ -136,9 +132,7 @@
that doesn't allow one or doesn't exist in its declaration list, then an <code>XHPInvalidChildrenException</code> will be thrown.</p>
<p>You can use the standard regex operators <code>*</code> (zero or more), <code>+</code> (one or more) <code>|</code> (this or that) when declaring your children.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :my-br extends :x:element {
children empty; // no children allowed
@@ -214,9 +208,7 @@
</div>
<p>The categories are taken from the HTML specification (e.g., <code>%flow</code>, <code>%phrase</code>).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :my-text extends :x:element {
category %phrase;
@@ -252,9 +244,7 @@
<li>implement <code>asyncRender: Awaitable&lt;XHPRoot&gt;</code> instead of <code>render: XHPRoot</code></li>
</ul>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :ui:get-status extends :x:element {
@@ -294,9 +284,7 @@
<h3 class="headingWithAnchor" id="xhp-helpers__attribute-transfer">Attribute Transfer<a href="#xhp-helpers__attribute-transfer"><i class="glyphIcon fa fa-link"></i></a></h3>
<p>Let's say you have a class that wants to inherit attributes from <code>:div</code>. You could do something like this:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :ui-my-box extends :x:element {
attribute :div; // inherit from attributes from &lt;div&gt;
@@ -326,9 +314,7 @@
get those attributes.</p>
<p>Instead, you should use <code>XHPHelpers</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :ui-my-good-box extends :x:element {
attribute :div; // inherit from attributes from &lt;div&gt;
@@ -358,9 +344,7 @@
<p><code>XHPHelpers</code> has a method <code>getID</code> that you can call to give your rendered custom XHP object a unique ID that can be referred to in other
parts of your code or UI framework (e.g., CSS).</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :my-id extends :x:element {
attribute string id;
@@ -388,9 +372,7 @@
declares the <code>class</code> attribute directly or through inheritance. <code>addClass</code> takes a <code>string</code> and appends that <code>string</code> to the <code>class</code>
attribute; <code>conditionClass</code> takes a <code>string</code> and a <code>bool</code> appends that <code>string</code> to the <code>class</code> attribute if the <code>bool</code> is <code>true</code>.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :my-cls-adder extends :x:element {
attribute :div;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/XHP/guidelines.html build/final/guides-html/hack/XHP/guidelines.html
--- ../tmp-build-old/final/guides-html/hack/XHP/guidelines.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/XHP/guidelines.html 2019-09-27 15:45:15.752489325 -0700
@@ -16,9 +16,7 @@
<p>If you have a parent object, and you want to give information to some object further down the UI tree (e.g., <code>&lt;ul&gt;</code> to <code>&lt;li&gt;</code>), you
can set a context for those lower objects and the lower objects can retrieve them. You use <code>setContext</code> and <code>getContext</code></p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
class :ui-myparent extends :x:element {
attribute string text @required;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/XHP/interfaces.html build/final/guides-html/hack/XHP/interfaces.html
--- ../tmp-build-old/final/guides-html/hack/XHP/interfaces.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/XHP/interfaces.html 2019-09-27 15:45:15.704488681 -0700
@@ -30,8 +30,7 @@
<h2 class="headingWithAnchor" id="xhpunsaferenderable">XHPUnsafeRenderable<a href="#xhpunsaferenderable"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>If you need to render raw HTML strings, wrap them in a class that implements this interface and provides a <code>toHTMLString: string</code> method:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
require_once __DIR__.'/md_render.inc.php';
@@ -66,8 +65,7 @@
<p>We do not provide an implementation of this interface as a generic implementation tends to be overused; instead, consider making more specific
implementations:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
require_once __DIR__.'/md_render.inc.php';
@@ -103,8 +101,7 @@
interface is intentionally breaking part of XHP's safety, so should be used as sparingly as possible.</p>
<h2 class="headingWithAnchor" id="example">Example<a href="#example"><i class="glyphIcon fa fa-link"></i></a></h2>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
final class XHPUnsafeExample implements XHPUnsafeRenderable {
public function toHTMLString(): string {
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/XHP/methods.html build/final/guides-html/hack/XHP/methods.html
--- ../tmp-build-old/final/guides-html/hack/XHP/methods.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/XHP/methods.html 2019-09-27 15:45:15.712488789 -0700
@@ -58,9 +58,7 @@
<td data-heading="Description">Replaces the XHP object's array of attributes with <code>$attrs</code>. Same errors can apply as <code>setAttribute()</code>.</td>
</tr></tbody></table>
</div><div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
function xhp_object_methods_build_list(Vector&lt;string&gt; $names): XHPRoot {
$list = &lt;ul id=&quot;names&quot; /&gt;;
diff -r -U 3 ../tmp-build-old/final/guides-html/hack/XHP/some-basics.html build/final/guides-html/hack/XHP/some-basics.html
--- ../tmp-build-old/final/guides-html/hack/XHP/some-basics.html 2019-09-27 12:30:15.838834373 -0700
+++ build/final/guides-html/hack/XHP/some-basics.html 2019-09-27 15:45:15.680488360 -0700
@@ -54,8 +54,7 @@
which can then be used like plain HTML elements. For example, this site defines an <code>&lt;a:post&gt;</code> tag that has the same interface
as a standard <code>&lt;a&gt;</code> tag, but makes a POST request instead of a GET request:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // strict
-/*
+<pre><code class="language-PHP">/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
@@ -108,8 +107,7 @@
</div>
<p>At this point, the new element can be used like any built-in element:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
&lt;&lt;__EntryPoint&gt;&gt;
function intro_examples_a_a_post() {
@@ -132,9 +130,7 @@
<h2 class="headingWithAnchor" id="runtime-validation">Runtime Validation<a href="#runtime-validation"><i class="glyphIcon fa fa-link"></i></a></h2>
<p>Since XHP objects are first-class and not just strings, a whole slew of validation can occur to ensure that your UI does not have subtle bugs:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-function intro_examples_tag_matching_validation_using_string(): void {
+<pre><code class="language-PHP">function intro_examples_tag_matching_validation_using_string(): void {
echo '&lt;div class=&quot;section-header&quot;&gt;';
echo '&lt;a href=&quot;#use&quot;&gt;You should have used &lt;span class=&quot;xhp&quot;&gt;XHP&lt;/naps&gt;&lt;/a&gt;';
echo '&lt;/div&gt;';
@@ -166,9 +162,7 @@
the following code will typecheck correctly but fail to run, because while the tags are matched, they are not nested correctly
(according to the HTML specification), and nesting verification only happens at runtime:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
function intro_examples_allowed_tag_validation_using_string(): void {
echo '&lt;ul&gt;&lt;i&gt;Item 1&lt;/i&gt;&lt;/ul&gt;';
@@ -213,9 +207,7 @@
functions like <a href="http://php.net/manual/en/function.htmlspecialchars.php"><code>htmlspecialchars</code></a>, but then you have to actually remember
to use those functions. XHP automatically escapes reserved HTML characters to HTML entities before output.</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
+<pre><code class="language-PHP">require __DIR__.&quot;/../../../../vendor/hh_autoload.php&quot;;
function intro_examples_avoid_xss_using_string(string $could_be_bad): void {
// Could call htmlspecialchars() here
diff -r -U 3 ../tmp-build-old/final/guides-html/hhvm/basic-usage/command-line.html build/final/guides-html/hhvm/basic-usage/command-line.html
--- ../tmp-build-old/final/guides-html/hhvm/basic-usage/command-line.html 2019-09-27 12:30:15.842834416 -0700
+++ build/final/guides-html/hhvm/basic-usage/command-line.html 2019-09-27 15:45:15.884491098 -0700
@@ -1,11 +1,7 @@
<!-- fbgfm --><script>hljs.initHighlightingOnLoad();</script><p>In command-line (cli) mode, you run the <code>hhvm</code> binary from the command-line, execute the script and then exit HHVM immediately when the script completes.</p>
<p>Here is an example of how to run a script in HHVM cli mode. Take the following PHP script:</p>
<div class="highlight fbgfm source-language-Hack">
-<pre><code class="language-PHP">&lt;?hh // partial
-
-namespace HHVM\UserDocumentation\BasicUsage\Examples\CommandLine;
-
-function fibonacci(int $number): int {
+<pre><code class="language-PHP">function fibonacci(int $number): int {
return \intval(\round(\pow((\sqrt(5.0) + 1) / 2, $number) / \sqrt(5.0)));
}
diff -r -U 3 ../tmp-build-old/final/static_resources.json build/final/static_resources.json
--- ../tmp-build-old/final/static_resources.json 2019-09-27 12:30:15.754833462 -0700
+++ build/final/static_resources.json 2019-09-27 15:45:02.628313217 -0700
@@ -2,7 +2,7 @@
"/css/main.css": {
"localPath": "/home/jjergus/work/code/user-documentation/public/css/main.css",
"checksum": "02a824768d8ebd00",
- "mtime": 1569612510,
+ "mtime": 1569624302,
"mimeType": "text/css"
},
"/favicon.png": {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment