Closed
Description
Description
repro: https://3v4l.org/OVu3r
<?php
declare(strict_types=1);
class Foo
{
public const MAX_LARGE_LENGTH_BYTES = 1024 + 1; // 1 KiB + 1 %
public const MAX_LARGE_LENGTH_BYTES2 = (int) (1024 * 1.01);
}
var_dump(Foo::MAX_LARGE_LENGTH_BYTES);
var_dump(Foo::MAX_LARGE_LENGTH_BYTES2);
Currently +
is supported, but cast is not. But all of these are operators with constant result /wo side effects where the arguments are constant.