xref: /PHP-7.4/Zend/tests/bug71922.phpt (revision ed06d130)
1--TEST--
2Bug #71922: Crash on assert(new class{});
3--INI--
4zend.assertions=1
5assert.exception=1
6--FILE--
7<?php
8
9try {
10    assert(0 && new class {
11    } && new class(42) extends stdclass {
12    });
13} catch (AssertionError $e) {
14    echo "Assertion failure: ", $e->getMessage(), "\n";
15}
16
17?>
18--EXPECT--
19Assertion failure: assert(0 && new class {
20} && new class(42) extends stdclass {
21})
22