text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 338942 $ -->
<appendix xml:id="migration53" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <title>Migrating from PHP 5.2.x to PHP 5.3.x</title>
 <simpara>
  &manual.migration.seealso;
  <link linkend="migration5">5.0.x</link>,
  <link linkend="migration51">5.1.x</link>,
  <link linkend="migration52">5.2.x</link>,
  <link linkend="migration54">5.4.x</link>,
  <link linkend="migration55">5.5.x</link> and
  <link linkend="migration56">5.6.x</link>.
 </simpara>

 <section xml:id="migration53.changes">
  <title>What has changed in PHP 5.3.x</title>
  <simpara>
   Most improvements in PHP 5.3.x have no impact on existing code.  There are
   a <link linkend="migration53.incompatible">few incompatibilities</link>
   and <link linkend="migration53.new-features">new features</link> that should
   be considered, and code should be tested before switching PHP
   versions in production environments.
  </simpara>
  <simpara>
   For systems being upgraded from an older version of PHP, the relevant
   documentation is available at:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="migration52">Upgrade Notes for PHP 5.2.x</link>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="migration51">Upgrade Notes for PHP 5.1.x</link>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="migration5">Migrating from PHP 4 to PHP 5</link>.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.incompatible">
  <title>Backward Incompatible Changes</title>
  <simpara>
   Although most existing PHP 5 code should work without changes, please take
   note of some backward incompatible changes:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     The newer internal parameter parsing API has been applied across all the
     extensions bundled with PHP 5.3.x. This parameter parsing API causes
     functions to return &null; when passed incompatible parameters. There are
     some exceptions to this rule, such as the <function>get_class</function>
     function, which will continue to return &false; on error.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>clearstatcache</function> no longer clears the realpath cache by
     default.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>realpath</function> is now fully platform-independent.
     Consequence of this is that invalid relative paths such as
     <literal>__FILE__ . "/../x"</literal> do not work anymore.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <function>call_user_func</function> family of functions now propagate
     <literal>$this</literal> even if the callee is a parent class.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The array functions <function>natsort</function>,
     <function>natcasesort</function>, <function>usort</function>,
     <function>uasort</function>, <function>uksort</function>,
     <function>array_flip</function>, and <function>array_unique</function> no
     longer accept objects passed as arguments. To apply these functions to an
     object, cast the object to an array first.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The behaviour of functions with by-reference parameters called by value has
     changed. Where previously the function would accept the by-value argument,
     a fatal error is now emitted. Any previous code passing constants or
     literals to functions expecting references, will need altering to assign
     the value to a variable before calling the function.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The new mysqlnd library necessitates the use of MySQL 4.1's newer 41-byte
     password format. Continued use of the old 16-byte passwords will cause
     <function>mysql_connect</function> and similar functions to emit the error,
     <literal>"mysqlnd cannot connect to MySQL 4.1+ using old
     authentication."</literal>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The new mysqlnd library does not read mysql configuration files
     (my.cnf/my.ini), as the older libmysqlclient library does.  If your code relies on
     settings in the configuration file, you can load it explicitly with the
     <function>mysqli_options</function> function. Note that this means the
     PDO specific constants <constant>PDO::MYSQL_ATTR_READ_DEFAULT_FILE</constant>
     and <constant>PDO::MYSQL_ATTR_READ_DEFAULT_GROUP</constant> are not defined
     if MySQL support in PDO is compiled with mysqlnd.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The trailing / has been removed from the <classname>SplFileInfo</classname>
     class and other related directory classes.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <link linkend="object.tostring">__toString()</link> magic
     method can no longer accept arguments.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The magic methods
     <link linkend="object.get">__get()</link>,
     <link linkend="object.set">__set()</link>,
     <link linkend="object.isset">__isset()</link>,
     <link linkend="object.unset">__unset()</link>, and
     <link linkend="object.call">__call()</link> must always
     be public and can no longer be static. Method signatures are now enforced.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <link linkend="object.call">__call()</link>
     magic method is now invoked on access to private and protected methods.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>func_get_arg</function>, <function>func_get_args</function> and
     <function>func_num_args</function> can no longer be called from the
     outermost scope of a file that has been included by calling
     <function>include</function> or <function>require</function> from within
     a function in the calling file.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     An emulation layer for the MHASH extension to wrap around the Hash extension
     have been added. However not all the algorithms are covered, notable the
     s2k hashing algorithm. This means that s2k hashing is no longer available
     as of PHP 5.3.0.
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   The following keywords are now reserved and may not be used in function,
   class, etc. names.
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="control-structures.goto">goto</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="language.namespaces">namespace</link>
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.new-features">
  <title>New features</title>
  <simpara>
   PHP 5.3.0 offers a wide range of new features:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     Support for <link linkend="language.namespaces">namespaces</link> has been
     added.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Support for <link linkend="language.oop5.late-static-bindings">Late Static
     Bindings</link> has been added.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Support for <link linkend="control-structures.goto">jump labels</link>
     (limited goto) has been added.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Support for native <link linkend="functions.anonymous">Closures</link>
     (Lambda/Anonymous functions) has been added.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     There are two new magic methods,
     <link linkend="object.callstatic">__callStatic()</link> and
     <link linkend="object.invoke">__invoke()</link>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="language.types.string.syntax.nowdoc">Nowdoc</link> syntax is
     now supported, similar to
     <link linkend="language.types.string.syntax.heredoc">Heredoc</link> syntax,
     but with single quotes.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     It is now possible to use
     <link linkend="language.types.string.syntax.heredoc">Heredoc</link>s to
     initialize static variables and class properties/constants.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="language.types.string.syntax.heredoc">Heredoc</link>s may
     now be declared using double quotes, complementing the
     <link linkend="language.types.string.syntax.nowdoc">Nowdoc</link> syntax.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="language.constants.syntax">Constants</link> can now be
     declared outside a class using the <literal>const</literal> keyword.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <link linkend="language.operators.comparison.ternary">ternary</link>
     operator now has a shorthand form: <literal>?:</literal>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The HTTP stream wrapper now considers all status codes from 200 to 399 to
     be successful.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Dynamic access to static methods is now possible:
    </simpara>
    <informalexample>
     <programlisting role="php">
<![CDATA[
<?php
class C {
   public static $foo = 123;
}

$a = "C";
echo $a::$foo;
?>
]]>
     </programlisting>
     &example.outputs;
     <screen>
<![CDATA[
123
]]>
     </screen>
    </informalexample>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="language.exceptions">Exceptions</link> can now be nested:
    </simpara>
    <informalexample>
     <programlisting role="php">
<![CDATA[
<?php
class MyCustomException extends Exception {}

try {
    throw new MyCustomException("Exceptional", 112);
} catch (Exception $e) {
    /* Note the use of the third parameter to pass $e
     * into the RuntimeException. */
    throw new RuntimeException("Rethrowing", 911, $e);
}
?>
]]>
     </programlisting>
    </informalexample>
   </listitem>
   <listitem>
    <simpara>
     A <link linkend="features.gc">garbage collector</link> for circular
     references has been added, and is enabled by default.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <function>mail</function> function now supports logging of sent email
     via the <link linkend="ini.mail.log">mail.log</link> configuration
     directive. (Note: This only applies to email sent through this function.)
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.windows">
  <title>Changes made to Windows support</title>
  <simpara>
   Changes to the Windows releases:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     The minimum Windows version is now Windows XP SP3; Windows 98, ME, 2000 and NT4
     are no longer supported.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Windows binaries now target i586 and later. i386 and i486 are not
     supported.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     There is now experimental support for x64 versions of PHP on Windows.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     There is now compiler support for Visual C++ 9 (VC9), using Visual Studio
     2008. Snapshots and releases will now also be available for VC9. Old
     binaries using VC6 are still supported and released in the line with VC9.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <link linkend="ref.pdo-oci">PDO_OCI</link>
     <literal>php_pdo_oci8.dll</literal> library (for use with Oracle version 8
     client libraries) is no longer being built. Instead, use
     <literal>php_pdo_oci.dll</literal> (note no '8') with Oracle 10 or 11
     client libraries. Connection to other database versions is still supported.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     For the <link linkend="book.oci8">OCI8</link> extension, a new library
     <literal>php_oci8_11g.dll</literal> is available in addition to
     <literal>php_oci8.dll</literal>. Only one can be enabled at any time. Use
     <literal>php_oci8.dll</literal> with Oracle 10.2 client libraries. Use
     <literal>php_oci8_11g.dll</literal> with Oracle 11 or later client libraries.
     Connection to other database versions is still supported.
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   Windows support has been added for the following functions:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>checkdnsrr</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>dns_get_record</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>fnmatch</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>getmxrr</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>getopt</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>imagecolorclosesthwb</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>inet_ntop</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>inet_pton</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>link</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>linkinfo</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>mcrypt_create_iv</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>readlink</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>socket_create_pair</function>
     - This function was previously available on Windows, but was disabled as of
     PHP 4.3.0 due to a bug.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>stream_socket_pair</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>symlink</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>time_nanosleep</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>time_sleep_until</function>
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   Other changes:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     Improved portability of the <function>stat</function>,
     <function>touch</function>, <function>filemtime</function>,
     <function>filesize</function> functions, and other related functions (100%
     portable for the available data).
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     It is now possible to create hard links on Windows using the
     <function>link</function> function, and symbolic links using the
     <function>symlink</function> function. Hard links are available as of
     Windows 2000, and symbolic links as of Windows Vista.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The Windows version of PHP now exposes a set of constants prefixed
     <literal>PHP_WINDOWS_*</literal>. A list of these constants and their usage
     can be found at <xref linkend="info.constants" />.
    </simpara>
   </listitem>
  </itemizedlist>
  <warning>
   <simpara>
    Support for the ISAPI module has been dropped. Use the improved FastCGI SAPI
    module instead.
   </simpara>
  </warning>
  <note>
   <simpara>
    A new dedicated site for PHP on Windows is now available, including
    downloads, release candidates, and snapshots in various flavors
    (thread-safe/not-thread-safe, VC6/VC9, x86/x64). The URL of this site is
    <link xlink:href="&url.php.windows;">&url.php.windows;</link>.
   </simpara>
  </note>
 </section>

 <section xml:id="migration53.sapi">
  <title>Changes in SAPI modules</title>
  <itemizedlist>
   <listitem>
    <simpara>
     A new SAPI module named litespeed is now available.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     FastCGI support in the CGI SAPI is now always enabled and can not be
     disabled. See <literal>sapi/cgi/CHANGES</literal> for more details.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     A new CGI SAPI option, <literal>-T</literal>, can be used to measure
     repeated execution time of a script.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     CGI/FastCGI now has support for .htaccess-style user-defined &php.ini;
     files.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <function>dl</function> function is now disabled by default, and is now
     available only under the CLI, CGI, and embed SAPIs.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.deprecated">
  <title>Deprecated features in PHP 5.3.x</title>
  <simpara>
   PHP 5.3.0 introduces two new error levels: <constant>E_DEPRECATED</constant>
   and <constant>E_USER_DEPRECATED</constant>. The
   <constant>E_DEPRECATED</constant> error level is used to indicate that a
   function or feature has been deprecated. The
   <constant>E_USER_DEPRECATED</constant> level is intended for indicating
   deprecated features in user code, similarly to the
   <constant>E_USER_ERROR</constant> and <constant>E_USER_WARNING</constant>
   levels.
  </simpara>
  <simpara>
   The following is a list of deprecated INI directives. Use of any of these INI
   directives will cause an <constant>E_DEPRECATED</constant> error to be thrown
   at startup.
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="ini.define-syslog-variables">define_syslog_variables</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.register-globals">register_globals</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.register-long-arrays">register_long_arrays</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.safe-mode">safe_mode</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.magic-quotes-sybase">magic_quotes_sybase</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Comments starting with '#' are now deprecated in .INI files.
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   Deprecated functions:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>call_user_method</function> (use
     <function>call_user_func</function> instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>call_user_method_array</function> (use
     <function>call_user_func_array</function> instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>define_syslog_variables</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>dl</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>ereg</function> (use <function>preg_match</function> instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>ereg_replace</function> (use <function>preg_replace</function>
     instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>eregi</function> (use <function>preg_match</function> with the
     <literal>'i'</literal> modifier instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>eregi_replace</function> (use <function>preg_replace</function>
     with the <literal>'i'</literal> modifier instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>mcrypt_generic_end</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>set_magic_quotes_runtime</function> and its alias,
     <function>magic_quotes_runtime</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>session_register</function> (use the <varname>$_SESSION</varname>
     superglobal instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>session_unregister</function> (use the
     <varname>$_SESSION</varname> superglobal instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>session_is_registered</function> (use the
     <varname>$_SESSION</varname> superglobal instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>set_socket_blocking</function> (use
     <function>stream_set_blocking</function> instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>split</function> (use <function>preg_split</function> instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>spliti</function> (use <function>preg_split</function> with the
     <literal>'i'</literal> modifier instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>sql_regcase</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>mysql_db_query</function> (use
     <function>mysql_select_db</function> and <function>mysql_query</function>
     instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>mysql_escape_string</function> (use
     <function>mysql_real_escape_string</function> instead)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Passing locale category names as strings is now deprecated. Use the LC_*
     family of constants instead.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <parameter>is_dst</parameter> parameter to <function>mktime</function>.
     Use the new timezone handling functions instead.
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   Deprecated features:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     Assigning the return value of
     <link linkend="language.oop5.basic.new">new</link> by reference is now
     deprecated.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Call-time pass-by-reference is now deprecated.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.undeprecated">
  <title>Undeprecated features in PHP 5.3.x</title>
  <simpara>
   The <function>is_a</function> function has been undeprecated by popular
   request; it will no longer issue an <constant>E_STRICT</constant> error.
  </simpara>
 </section>

 <section xml:id="migration53.parameters">
  <title>New Parameters</title>
  <simpara>
   Several functions were given new, optional parameters in PHP 5.3:
  </simpara>
  <simpara>PHP Core:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>clearstatcache</function>
     - Added <parameter>clear_realpath_cache</parameter> and
     <parameter>filename</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>copy</function>
     - Added a stream context parameter, <parameter>context</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>fgetcsv</function>
     - Added <parameter>escape</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>ini_get_all</function>
     - Added <parameter>details</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>nl2br</function>
     - Added <parameter>is_xhtml</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>parse_ini_file</function>
     - Added <parameter>scanner_mode</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>round</function>
     - Added <parameter>mode</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>stream_context_create</function>
     - Added <parameter>params</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>strstr</function> and <function>stristr</function>
     - Added <parameter>before_needle</parameter>.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.json">json</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>json_encode</function>
     - Added <parameter>options</parameter>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>json_decode</function>
     - Added <parameter>depth</parameter>.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.stream">Streams</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>stream_select</function>,
     <function>stream_set_blocking</function>,
     <function>stream_set_timeout</function>, and
     <function>stream_set_write_buffer</function> now work with user-space
     stream wrappers.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.sybase">sybase_ct</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>sybase_connect</function>
     - Added <parameter>new</parameter>.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara>
   New method parameters in PHP 5.3.0:
  </simpara>
  <simpara>PHP Core:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <methodname>Exception::__construct</methodname>
     - Added <parameter>previous</parameter>.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.functions">
  <title>New Functions</title>
  <simpara>
   PHP 5.3 introduced some new functions:
  </simpara>

  <simpara>PHP Core:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>array_replace</function>
     - Replaces elements from passed arrays into one array.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>array_replace_recursive</function>
     - Recursively replaces elements from passed arrays into one array.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>class_alias</function>
     - Creates an alias for a user defined class.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>forward_static_call</function>
     - Call a user function from a method context.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>forward_static_call_array</function>
     - Call a user function from a method context, with the arguments contained
     in an array.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>gc_collect_cycles</function>
     - Forces collection of any existing garbage cycles.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>gc_disable</function>
     - Deactivates the circular reference collector.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>gc_enable</function>
     - Activates the circular reference collector.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>gc_enabled</function>
     - Returns the status of the circular reference collector.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>get_called_class</function>
     - Return the name of the class a static method is called in.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>gethostname</function>
     - Return the current host name for the local machine.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>header_remove</function>
     - Removes an HTTP header previously set using the
     <function>header</function> function.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>lcfirst</function>
     - Make a string's first character lowercase.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>parse_ini_string</function>
     - Parse a configuration string.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>quoted_printable_encode</function>
     - Convert an 8 bit string to a quoted-printable string.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>str_getcsv</function>
     - Parse a CSV string into an array.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>stream_context_set_default</function>
     - Set the default stream context.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>stream_supports_lock</function>
     - Return &true; if the stream supports locking.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>stream_context_get_params</function>
     - Retrieve parameters from a stream context.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>streamWrapper::stream_cast</function>
     - Retrieve the underlying stream resource.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>streamWrapper::stream_set_option</function>
     - Change stream options
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.datetime">Date/Time</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>date_add</function>
     - Adds an amount of days, months, years, hours, minutes and seconds to a
     <classname>DateTime</classname> object.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>date_create_from_format</function>
     - Returns a new <classname>DateTime</classname> object formatted according
     to the given format.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>date_diff</function>
     - Returns the difference between two <classname>DateTime</classname>
     objects.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>date_get_last_errors</function>
     - Returns the warnings and errors from the last date/time operation.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>date_parse_from_format</function>
     - Get information about a given date.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>date_sub</function>
     - Subtracts an amount of days, months, years, hours, minutes and seconds
     from a <classname>DateTime</classname> object.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>timezone_version_get</function>
     - Returns the version of the timezonedb.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.gmp">GMP</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>gmp_testbit</function>
     - Tests whether a bit is set.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.hash">Hash</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>hash_copy</function>
     - Copy hashing context.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.imap">IMAP</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>imap_gc</function>
     - Clears IMAP cache.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>imap_utf8_to_mutf7</function>
     - Encode a UTF-8 string to modified UTF-7.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>imap_mutf7_to_utf8</function>
     - Decode a modified UTF-7 string to UTF-8.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.json">JSON</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>json_last_error</function>
     - Returns the last JSON error that occurred.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.mysqli">MySQL Improved</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>mysqli_fetch_all</function>
     - Fetches all result rows as an associative array, a numeric
     array, or both.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>mysqli_get_connection_stats</function>
     - Returns statistics about the client connection.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>mysqli_poll</function>
     - Poll connections.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>mysqli_reap_async_query</function>
     - Get result from async query.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.openssl">OpenSSL</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>openssl_random_pseudo_bytes</function>
     - Returns a string of the given length specified, filled with pseudo-random
     bytes.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.pcntl">PCNTL</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>pcntl_signal_dispatch</function>
     - Calls signal handlers for pending signals.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>pcntl_sigprocmask</function>
     - Sets and retrieves blocked signals.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>pcntl_sigtimedwait</function>
     - Wait for signals with a timeout.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>pcntl_sigwaitinfo</function>
     - Wait for signals.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.pcre">PCRE</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>preg_filter</function>
     - Perform a regular expression search and replace, returning only results
     which matched the pattern.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.sem">Semaphore</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>msg_queue_exists</function>
     - Check whether a message queue exists.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>shm_has_var</function>
     - Checks whether a specific key exists inside a shared memory segment.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara>
   The following functions are now natively implemented, making them available
   on all operating systems which can run PHP:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>acosh</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>asinh</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>atanh</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>expm1</function>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>log1p</function>
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.new-stream-wrappers">
  <title>New stream wrappers</title>
  <simpara>
   The following stream wrappers were introduced in 5.3.0:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="wrappers.glob">glob://</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="wrappers.phar">phar://</link>
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.new-stream-filters">
  <title>New stream filters</title>
  <simpara>
   The following stream filters were introduced in 5.3.0:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     dechunk (reverses HTTP chunked encoding)
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The bz2.decompress filter now supports concatenation.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.class-constants">
  <title>New Class Constants</title>
  <simpara>
   Several new class constants were introduced in 5.3.0:
  </simpara>

  <simpara><link linkend="ref.pdo-firebird">PDO_FIREBIRD</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>PDO::FB_ATTR_DATE_FORMAT</constant>
     - Sets the format for dates.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PDO::FB_ATTR_TIME_FORMAT</constant>
     - Sets the format for time.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PDO::FB_ATTR_TIMESTAMP_FORMAT</constant>
     - Sets the format for timestamps.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.methods">
  <title>New Methods</title>
  <simpara>
   Several new methods were introduced in 5.3.0:
  </simpara>

  <simpara><link linkend="book.datetime">Date/Time</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>DateTime::add</function>
     - Adds an amount of days, months, years, hours, minutes and seconds to a
     <classname>DateTime</classname> object.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>DateTime::createFromFormat</function>
     - Returns a new <classname>DateTime</classname> object formatted according
     to the given format.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>DateTime::diff</function>
     - Returns the difference between two <classname>DateTime</classname>
     objects.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>DateTime::getLastErrors</function>
     - Returns the warnings and errors from the last date/time operation.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>DateTime::sub</function>
     - Subtracts an amount of days, months, years, hours, minutes and seconds
     from a <classname>DateTime</classname> object.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><classname>Exception</classname>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>Exception::getPrevious</function>
     - Retrieves the previous exception.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.dom">DOM</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>DOMNode::getLineNo</function>
     - Get the line number of a parsed node.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="ref.pdo-firebird">PDO_FIREBIRD</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>PDO::setAttribute</function>
     - Sets an attribute.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.reflection">Reflection</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <methodname>ReflectionClass::getNamespaceName</methodname>
     - Returns the name of namespace where this class is defined.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <methodname>ReflectionClass::getShortName</methodname>
     - Returns the short name of this class (without namespace part).
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <methodname>ReflectionClass::inNamespace</methodname>
     - Returns whether this class is defined in a namespace.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <methodname>ReflectionFunction::getNamespaceName</methodname>
     - Returns the name of namespace where this function is defined.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <methodname>ReflectionFunction::getShortName</methodname>
     - Returns the short name of the function (without namespace part).
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <methodname>ReflectionFunction::inNamespace</methodname>
     - Returns whether this function is defined in a namespace.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <methodname>ReflectionProperty::setAccessible</methodname>
     - Sets whether non-public properties can be requested.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.spl">SPL</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>SplObjectStorage::addAll</function>
     - Add all elements from another SplObjectStorage object.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>SplObjectStorage::removeAll</function>
     - Remove all elements from another SplObjectStorage object.
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.xsl">XSL</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>XSLTProcessor::setProfiling</function>
     - Sets the profiling output file.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.new-extensions">
  <title>New Extensions</title>
  <simpara>
   The following new extensions are added (by default) as of PHP 5.3.0:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="book.enchant">Enchant</link>
     - An abstraction layer above various spelling libraries
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.fileinfo">Fileinfo</link>
     - An improved and more solid replacement, featuring full BC, for the
     <link linkend="book.mime-magic">Mimetype</link> extension, which has been
     removed.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.intl">INTL</link>
     - Internationalization extension. INTL is a wrapper around the
     <link xlink:href="&url.icu.home;">ICU</link> library.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.phar">Phar</link>
     - Implementation of PHP-Archive files.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.sqlite3">SQLite3</link>
     - Support for SQLite version 3 databases.
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   mysqlnd is a new core library shipped with PHP. It is a PHP-specific
   replacement for libmysqlclient. mysqlnd will be used to build the
   <link linkend="book.mysql">mysql</link>,
   <link linkend="book.mysqli">mysqli</link>
   and <link linkend="ref.pdo-mysql">PDO_MySQL</link> extensions if libmysqlclient
   isn't found on the system. It may also  be used instead of libmysqlclient even when
   libmysqlclient is present. mysqlnd is recommended for all PHP installations for
   performance reasons.
  </simpara>
 </section>

 <section xml:id="migration53.removed-extensions">
  <title>Removed Extensions</title>
  <simpara>
   These extensions have been moved to PECL and are no longer part of the PHP
   distribution. The PECL package versions of these extensions will be created
   according to user demand.
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="book.dbase">dbase</link>
     - No longer maintained
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.fbsql">fbsql</link>
     - No longer maintained
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.fdf">fdf</link>
     - Maintained
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.ming">ming</link>
     - Maintained
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.msql">msql</link>
     - No longer maintained
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.ncurses">ncurses</link>
     - Maintained
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.sybase">sybase</link>
     - Discontinued; use the <link linkend="book.sybase">sybase_ct</link>
     extension instead
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.mhash">mhash</link>
     - Discontinued; use the <link linkend="book.hash">hash</link> extension
     instead. <link linkend="book.hash">hash</link> has full mhash
     compatibility; all existing applications using the old functions will
     continue to work.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.extensions-other">
  <title>Other changes to extensions</title>
  <simpara>
   The following extensions can no longer be disabled during build
   configuration:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="book.pcre">PCRE</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.reflection">Reflection</link>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.spl">SPL</link>
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   Changes in extension behaviour, and new features:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="book.datetime">Date and Time</link>
     - The TZ environment variable is no longer used to guess the timezone
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.curl">cURL</link>
     - cURL now supports SSH
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.network">Network</link>
     - <function>dns_check_record</function> now returns an extra "entries"
     index, containing the TXT elements.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.hash">Hash</link>
     - The SHA-224 and salsa hash algorithms are now supported.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.mbstring">mbstring</link>
     - Now supports CP850 encoding.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.oci8">OCI8</link>
     - A call to <function>oci_close</function> on a persistent connection, or a
     variable referencing a persistent connection going out of scope, will now
     roll back any uncommitted transaction. To avoid unexpected behavior,
     explicitly issue a commit or roll back as needed. The old behavior can be
     enabled with the INI directive
     <link linkend="ini.oci8.old-oci-close-semantics">oci8.old_oci_close_semantics</link>.
    </simpara>
    <simpara>
     Database Resident Connection Pooling (DRCP) and Fast Application
     Notification (FAN) are now supported.
    </simpara>
    <simpara>
     Oracle External Authentication is now supported (except on Windows).
    </simpara>
    <simpara>
     The <function>oci_bind_by_name</function> function now supports SQLT_AFC
     (aka the CHAR datatype).
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.openssl">OpenSSL</link>
     - OpenSSL digest and cipher functions are now supported. It is also
     now possible to access the internal values of DSA, RSA and DH keys.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.session">Session</link>
     - Sessions will no longer store session-files in <literal>"/tmp"</literal>
     when <link linkend="ini.open-basedir">open_basedir</link> restrictions
     apply, unless <literal>"/tmp"</literal> is explicitly added to the list of
     allowed paths.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.soap">SOAP</link>
     Now supports sending user supplied HTTP headers.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.mysqli">MySQLi</link>
     Now supports persistent connections, by prepending the hostname with
     <literal>"p:"</literal>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="book.image">Image Processing and GD</link>
     The "JPG Support" index returned from <function>gd_info</function> has
     been renamed to "JPEG Support".
    </simpara>
   </listitem>

  </itemizedlist>
 </section>

 <section xml:id="migration53.classes">
  <title>New Classes</title>
  <simpara>
   The following classes were introduced in PHP 5.3.0:
  </simpara>

  <simpara><link linkend="book.datetime">Date/Time</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <classname>DateInterval</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>DatePeriod</classname>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.phar">Phar</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <classname>Phar</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>PharData</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>PharException</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>PharFileInfo</classname>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.spl">SPL</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <classname>FilesystemIterator</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>GlobIterator</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>MultipleIterator</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>RecursiveTreeIterator</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplDoublyLinkedList</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplFixedArray</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplHeap</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplMaxHeap</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplMinHeap</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplPriorityQueue</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplQueue</classname>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplStack</classname>
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.global-constants">
  <title>New Global Constants</title>

  <simpara>PHP Core:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>__DIR__</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>__NAMESPACE__</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>E_DEPRECATED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>E_USER_DEPRECATED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>INI_SCANNER_NORMAL</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>INI_SCANNER_RAW</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_MAXPATHLEN</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_NT_DOMAIN_CONTROLLER</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_NT_SERVER</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_NT_WORKSTATION</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_BUILD</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_MAJOR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_MINOR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_PLATFORM</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_PRODUCTTYPE</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_SP_MAJOR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_SP_MINOR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>PHP_WINDOWS_VERSION_SUITEMASK</constant>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.curl">cURL</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>CURLOPT_PROGRESSFUNCTION</constant>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.image">GD</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>IMG_FILTER_PIXELATE</constant>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.json">JSON</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>JSON_ERROR_CTRL_CHAR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_ERROR_DEPTH</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_ERROR_NONE</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_ERROR_STATE_MISMATCH</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_ERROR_SYNTAX</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_FORCE_OBJECT</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_HEX_TAG</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_HEX_AMP</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_HEX_APOS</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>JSON_HEX_QUOT</constant>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.ldap">LDAP</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>LDAP_OPT_NETWORK_TIMEOUT</constant>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.libxml">libxml</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>LIBXML_LOADED_VERSION </constant>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.pcre">PCRE</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>PREG_BAD_UTF8_OFFSET_ERROR</constant>
    </simpara>
   </listitem>
  </itemizedlist>

  <simpara><link linkend="book.pcntl">PCNTL</link>:</simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <constant>BUS_ADRALN</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>BUS_ADRERR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>BUS_OBJERR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>CLD_CONTIUNED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>CLD_DUMPED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>CLD_EXITED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>CLD_KILLED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>CLD_STOPPED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>CLD_TRAPPED</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_FLTDIV</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_FLTINV</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_FLTOVF</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_FLTRES</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_FLTSUB</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_FLTUND</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_INTDIV</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>FPE_INTOVF</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_BADSTK</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_COPROC</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_ILLADR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_ILLOPC</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_ILLOPN</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_ILLTRP</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_PRVOPC</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>ILL_PRVREG</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>POLL_ERR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>POLL_HUP</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>POLL_IN</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>POLL_MSG</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>POLL_OUT</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>POLL_PRI</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SEGV_ACCERR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SEGV_MAPERR</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_ASYNCIO</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_KERNEL</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_MESGQ</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_NOINFO</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_QUEUE</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_SIGIO</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_TIMER</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_TKILL</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SI_USER</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SIG_BLOCK</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SIG_SETMASK</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>SIG_UNBLOCK</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>TRAP_BRKPT</constant>
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <constant>TRAP_TRACE</constant>
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.ini">
  <title>Changes to INI file handling</title>
  <simpara>
   PHP 5.3.0 has significantly improved performance and parsing of INI files,
   and adds several new syntax features.
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     The standard &php.ini; files have been re-organized and renamed.
     <literal>php.ini-development</literal> contains settings recommded
     for use in development environments. <literal>php.ini-production</literal>
     contains settings recommended for use in production environments.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     There is now support for two special sections:
     <literal>[PATH=/opt/httpd/www.example.com/]</literal> and
     <literal>[HOST=www.example.com]</literal>. Directives set in these
     sections cannot be overridden by user-defined INI files or at
     runtime. More information about these sections can be found
     <link linkend="ini.sections">here</link>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.zend-extension-debug">zend_extension_debug</link>,
     <link linkend="ini.zend-extension-debug-ts">zend_extension_debug_ts</link>
     and <link linkend="ini.zend-extension-ts">zend_extension_ts</link> have
     been removed. Use the
     <link linkend="ini.zend-extension">zend_extension</link> directive to
     load all Zend Extensions.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.zend.ze1-compatibility-mode">zend.ze1_compatibility_mode</link>
     has been removed. If this INI directive is set to On, an
     <constant>E_ERROR</constant> error is emitted at startup.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     It is now possible to use the full path to load modules using the
     <link linkend="ini.extension">extension</link> directive.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <literal>"ini-variables"</literal> can now be used almost anywhere in a
     &php.ini; file.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.open-basedir">open_basedir</link> restrictions may now
     be tighted at runtime, and the directive is now PHP_INI_ALL.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     It is now possible to use alphanumeric or variable indices in INI option
     arrays.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>get_cfg_var</function> is now able to return "array" INI options.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Two new mail directives:
     <link linkend="ini.mail.add-x-header">mail.add_x_header</link> and
     <link linkend="ini.mail.log">mail.log</link>, have been added.
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   The following new ini directives have been added:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <literal>user_ini.filename</literal> and
     <literal>user_ini.cache_ttl</literal> have been added to control the use
     of <link linkend="configuration.file.per-user">user INI files</link>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.exit-on-timeout">exit_on_timeout</link> has been added
     to force Apache 1.x children to exit if a PHP execution timeout occurs.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Added <literal>mbstring.http_output_conv_mimetype</literal>.
     This directive specifies the regex pattern of content types for which
     <function>mb_output_handler</function> is activated.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     Added <link linkend="ini.request-order">request_order</link>.
     Allows controlling which external variables will be available in
     <varname>$_REQUEST</varname>.
    </simpara>
   </listitem>
  </itemizedlist>
  <simpara>
   The following ini directives have new default values:
  </simpara>
  <itemizedlist>
   <listitem>
    <simpara>
     <link linkend="ini.session.use-only-cookies">session.use_only_cookies</link>
     is now set to <literal>"1"</literal> (enabled) by default.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="ini.oci8.default-prefetch">oci8.default_prefetch</link>
     has changed from <literal>"10"</literal> to <literal>"100"</literal>.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>

 <section xml:id="migration53.other">
  <title>Other changes</title>
  <itemizedlist>
   <listitem>
    <simpara>
     <function>SplFileInfo::getpathinfo</function> now returns information about
     the path name.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <classname>SplObjectStorage</classname> now has
     <classname>ArrayAccess</classname> support. It is now also possible to
     store associative information with objects in
     <classname>SplObjectStorage</classname>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     In the GD extension, there is now pixelation support available through
     the <function>imagefilter</function> function.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>var_dump</function> output now includes private object properties.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>session_start</function> now returns &false; when session startup
     fails.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>property_exists</function> now checks the existence of a property
     independent of accessibility (like <function>method_exists</function>).
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <link linkend="wrappers">Stream wrappers</link> can now be used by
     <link linkend="ini.include-path">include_path</link>.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <parameter>initial</parameter> parameter for
     <function>array_reduce</function> can now be of any type.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The <link linkend="ref.dir">directory functions</link>
     <function>opendir</function>, <function>scandir</function>, and
     <function>dir</function> now use the default stream context if no explicit
     context is passed.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>crypt</function> now has Blowfish and extended DES support, and
     <function>crypt</function> features are now 100% portable. PHP has its own
     internal crypt implementation which drops into place when support for
     <literal>crypt</literal> or <literal>crypt_r</literal> is not found.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>getopt</function> now accepts "long options" on all platforms.
     Optional values and <literal>=</literal> as a separator for short options
     are now supported.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>fopen</function> has a new mode option (<literal>n</literal>),
     which passes <constant>O_NONBLOCK</constant> to the underlying
     <literal>open()</literal> system call. Note that this mode is not currently
     supported on Windows.
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     <function>getimagesize</function> now supports icon files (.ico).
    </simpara>
   </listitem>
   <listitem>
    <simpara>
     The mhash extension have moved to PECL, but the
     <link linkend="ref.hash">Hash</link> extension have been modified to support
     mhash if PHP is compiled with <literal>--with-mhash</literal>. Note that the
     Hash extension does not require the mhash library to be available whether or
     not the mhash emulation is enabled.
    </simpara>
   </listitem>
  </itemizedlist>
 </section>
</appendix>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
/*==================================================
 *  Simile Exhibit Data Editor Extension
 *==================================================
 */

(function() {
    var isCompiled = ("Exhibit_DataEditorExtension_isCompiled" in window) &&
                    window.Exhibit_DataEditorExtension_isCompiled;

    Exhibit.DataEditorExtension = {
        params: {
            bundle: true
        }
    };

	var javascriptFiles = [
        "data-editor.js" ,
		"editor.js" ,
		"jquery-ui-1.8.16.custom.min.js" ,
		"text-field.js" ,
		"number-field.js" ,
		"enum-field.js" ,
		"list-field.js" ,
		"ticklist-field.js"
    ];
    var cssFiles = [
        "data-editor.css" ,
		"jquery-ui-1.8.16.custom.css"
    ];

    var paramTypes = { bundle: Boolean };
    if (typeof Exhibit_DataEditorExtension_urlPrefix == "string") {
        Exhibit.DataEditorExtension.urlPrefix = Exhibit_DataEditorExtension_urlPrefix;
        if ("Exhibit_DataEditorExtension_parameters" in window) {
            SimileAjax.parseURLParameters(Exhibit_DataEditorExtension_parameters,
                                          Exhibit.DataEditorExtension.params,
                                          paramTypes);
        }
    } else {
        var url = SimileAjax.findScript(document, "/data-editor-extension.js");
        if (url == null) {
            SimileAjax.Debug.exception(new Error("Failed to derive URL prefix for Simile Exhibit Data Editor Extension code files"));
            return;
        }
        Exhibit.DataEditorExtension.urlPrefix = url.substr(0, url.indexOf("data-editor-extension.js"));

        var paramTypes = { bundle: Boolean };
        SimileAjax.parseURLParameters(url, Exhibit.DataEditorExtension.params, paramTypes);
    }

    var scriptURLs = [];
    var cssURLs = [];

    if (Exhibit.DataEditorExtension.params.bundle) {
        scriptURLs.push(Exhibit.DataEditorExtension.urlPrefix + "data-editor-extension-bundle.js");
        cssURLs.push(Exhibit.DataEditorExtension.urlPrefix + "data-editor-extension-bundle.css");
    } else {
        SimileAjax.prefixURLs(scriptURLs, Exhibit.DataEditorExtension.urlPrefix + "scripts/", javascriptFiles);
        SimileAjax.prefixURLs(cssURLs, Exhibit.DataEditorExtension.urlPrefix + "styles/", cssFiles);
    }

    for (var i = 0; i < Exhibit.locales.length; i++) {
        scriptURLs.push(Exhibit.DataEditorExtension.urlPrefix + "locales/" + Exhibit.locales[i] + "/data-editor-locale.js");
    };

    if (!isCompiled) {
        SimileAjax.includeJavascriptFiles(document, "", scriptURLs);
        SimileAjax.includeCssFiles(document, "", cssURLs);
    }
})();

redpajama_set_name: RedPajamaGithub


text:
// Copyright (c) 2017 Tigera, Inc. All rights reserved.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package bgpsyncer

/*
bgpsyncer implements an api.Syncer for consumers of BGP configuration.

The primary use case here is for a generic Calico backend for confd.

This implementation uses the watchersyncer.
*/


text:
[![npm package](https://img.shields.io/npm/v/node-harmony-cli.svg?style=flat-square)](https://www.npmjs.org/package/node-harmony-cli)

> Run node with all harmony flags, even in progress

## Install
```sh
$ npm install -g node-harmony-cli
```

## Usage
```sh
$ node-harmony script.js
```

## FAQ
> Q: What's the difference between `node-harmony` and `node --harmony`?

A: While `node --harmony` will enable all completed harmony features, `node-harmony` will enable all harmony features, including those in-progress ones.


text:
// Validation errors messages for Parsley
import Parsley from '../parsley';

Parsley.addMessages('fi', {
  dateiso: "Syötä oikea päivämäärä (YYYY-MM-DD)."
});


text:
package com.gamingmesh.jobs.api;

import org.bukkit.event.Cancellable;

import com.gamingmesh.jobs.container.Job;
import com.gamingmesh.jobs.container.JobsPlayer;

public final class JobsJoinEvent extends BaseEvent implements Cancellable {

	private JobsPlayer player;
	private Job job;
	private boolean cancelled = false;

	public JobsJoinEvent(JobsPlayer jPlayer, Job job) {
		this.player = jPlayer;
		this.job = job;
	}

	/**
	 * Returns the player who joined to a job.
	 *
	 * @return {@link JobsPlayer}
	 */
	public JobsPlayer getPlayer() {
		return player;
	}

	/**
	 * Returns the job where the player joined.
	 *
	 * @return {@link Job}
	 */
	public Job getJob() {
		return job;
	}

	@Override
	public boolean isCancelled() {
		return cancelled;
	}

	@Override
	public void setCancelled(boolean cancelled) {
		this.cancelled = cancelled;
	}
}


text:
Before(function(){
  fibResult = 0;
});

Before(['@do-fibonnacci-in-before-hook', '@reviewed'], function(){
  fibResult = fibonacciSeries(3);
});

After(function(){
  //throw 'Sabotage scenario';
});

Transform(/^(\d+)$/, function(n){
  return parseInt(n);
});

When(/^I ask Javascript to calculate fibonacci up to (\d+)$/, function(n){
  assertEqual(fibResult, 0);
  fibResult = fibonacciSeries(n);
});

When(/^I ask Javascript to calculate fibonacci up to (\d+) with formatting$/, function(n){
  assertEqual(0, fibResult)
  fibResult = fibonacciSeriesFormatted(n);
});

Then(/^it should give me (\[.*\])$/, function(expectedResult){
  assertEqual(expectedResult, fibResult)
});

Then(/^it should give me:$/, function(string){
  assertEqual(string, fibResult);
});

Then(/^it should contain:$/, function(table){
  var hashes = table.hashes;
  assertMatches(hashes[0]['cell 1'], fibResult);
  assertMatches(hashes[0]['cell 2'], fibResult);
});

Then(/^it should give me (\[.*\]) via calling another step definition$/, function(expectedResult){
  Given("I ask Javascript to calculate fibonacci up to 2");
  assertEqual(expectedResult, fibResult);
});

Then(/^it should calculate fibonacci up to (\d+) giving me (\[.*\])/, function(n, expectedResult){
  steps("Given I ask Javascript to calculate fibonacci up to "+ n + "\n" +
        "Then it should give me "+ expectedResult);
});