mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
assert() no longer evaluates strings as of PHP 8.0.0
As per the PHP changelog, the functionality to use a string for `assert` has been removed in PHP 8.0: 69888c3ff1/UPGRADING (L350-L354)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Closes GH-1471.
This commit is contained in:
parent
443531f6c6
commit
883d2fe5cb
3 changed files with 13 additions and 2 deletions
|
@ -75,7 +75,7 @@
|
|||
<entry><link linkend="ini.assert.quiet-eval">assert.quiet_eval</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry></entry>
|
||||
<entry>Removed as of PHP 8.0.0</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.assert.warning">assert.warning</link></entry>
|
||||
|
|
|
@ -239,6 +239,7 @@
|
|||
<entry>assert.quiet_eval</entry>
|
||||
<entry>
|
||||
Disable <literal>error_reporting</literal> during assertion expression evaluation.
|
||||
Removed as of PHP 8.0.0.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
<warning>
|
||||
<para>
|
||||
Using <type>string</type> as the <parameter>assertion</parameter> is
|
||||
<emphasis>DEPRECATED</emphasis> as of PHP 7.2.
|
||||
<emphasis>DEPRECATED</emphasis> as of PHP 7.2.0 and <emphasis>REMOVED</emphasis> as of PHP 8.0.0.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
|
@ -224,6 +224,16 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<function>assert()</function> will no longer evaluate string arguments, instead they will be
|
||||
treated like any other argument. <code>assert($a == $b)</code> should be used instead of
|
||||
<code>assert('$a == $b')</code>. The <literal>assert.quiet_eval</literal> &php.ini; directive and
|
||||
the <constant>ASSERT_QUIET_EVAL</constant> constant have also been removed, as they would no longer
|
||||
have any effect.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
|
|
Loading…
Reference in a new issue