php-src/ext/reflection/tests/ReflectionConstant_double_construct.phpt
Ilija Tovilo e23440e5a6
Implement reflection constant
Fixes GH-13570
Closes GH-13669
2024-04-17 22:53:09 +02:00

24 lines
363 B
PHP

--TEST--
ReflectionConstant double construct call
--FILE--
<?php
const C1 = 42;
const C2 = 43;
$r = new ReflectionConstant('C' . mt_rand(1, 1));
var_dump($r);
$r->__construct('C' . mt_rand(2, 2));
var_dump($r);
?>
--EXPECT--
object(ReflectionConstant)#1 (1) {
["name"]=>
string(2) "C1"
}
object(ReflectionConstant)#1 (1) {
["name"]=>
string(2) "C2"
}