xref: /PHP-8.2/ext/opcache/tests/opt/sccp_028.phpt (revision e9f783fc)
1--TEST--
2SCCP 028: Don't propagate typed properties
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7opcache.preload=
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12
13class Foo {
14    public int $bar = 1;
15}
16function test() {
17    $foo = new Foo();
18    $foo->bar = "10";
19    var_dump($foo->bar);
20}
21test();
22
23?>
24--EXPECT--
25int(10)
26