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:
Bradley Taylor 2022-03-19 11:52:13 +00:00 committed by Christoph M. Becker
parent 443531f6c6
commit 883d2fe5cb
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
3 changed files with 13 additions and 2 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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>