# Deprecation of assert() with string argument

- Thread: https://staging.externals.io/message/101560
- Original archive: https://news-web.php.net/php.internals/101560
- Started by Christoph M. Becker on 2018-01-06T13:36:24+00:00
- Messages: 2
- RFC: Deprecations for PHP 7.2 (Implemented (PHP 7.2)) — https://staging.externals.io/rfc/deprecations_php_7_2.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://staging.externals.io/search.md?q={query} · RFCs at https://staging.externals.io/rfc.md · JSON API at https://staging.externals.io/api · documentation at https://staging.externals.io/llms.txt

---

## #101560 — Christoph M. Becker — 2018-01-06T13:36:24+00:00

URL: https://staging.externals.io/message/101560#101560

Hi everybody!

As of PHP 7.2.0 calling `assert()` with a string argument has been
deprecated[1].  However, it seems that ASSERT_QUIET_EVAL /
assert.quiet_eval is supposed to only work as documented, if a string
argument is passed[2].  If that is indeed the case, wouldn't it make
sense to deprecate the usage of this flag / ini setting as well?

[1]
<https://wiki.php.net/rfc/deprecations_php_7_2#assert_with_string_argument>
[2] <https://bugs.php.net/75769>

-- 
Christoph M. Becker

---

## #101561 — Michael Morris — 2018-01-06T14:46:47+00:00

URL: https://staging.externals.io/message/101560#101561 · In reply to: #101560

On Sat, Jan 6, 2018 at 7:36 AM Christoph M. Becker <cmbecker69@gmx.de>
wrote:

> Hi everybody!
>
> As of PHP 7.2.0 calling `assert()` with a string argument has been
> deprecated[1].  However, it seems that ASSERT_QUIET_EVAL /
> assert.quiet_eval is supposed to only work as documented, if a string
> argument is passed[2].  If that is indeed the case, wouldn't it make
> sense to deprecate the usage of this flag / ini setting as well?
>
> [1]
> <https://wiki.php.net/rfc/deprecations_php_7_2#assert_with_string_argument
> > […]
> [2] <https://bugs.php.net/75769>
>

Yes.

For what it’s worth, I’m expecting the asset_options function to be
deprecated entirely eventually and am working on a patch for Drupal to
address this
