xref: /PHP-8.3/Zend/tests/gh10251.phpt (revision 6faeb957)
1--TEST--
2GH-10251 (Assertion `(flag & (1<<3)) == 0' failed.)
3--FILE--
4<?php
5#[\AllowDynamicProperties]
6class A
7{
8    function __set($o, $l)
9    {
10        $this->$p = $v;
11    }
12}
13$a = new A();
14$pp = "";
15$op = $pp & "";
16// Bitwise operators on strings don't compute the hash.
17// The code below previously assumed a hash was actually computed, leading to a crash.
18$a->$op = 0;
19echo "Done\n";
20?>
21--EXPECTF--
22Warning: Undefined variable $v in %s on line %d
23
24Warning: Undefined variable $p in %s on line %d
25Done
26