diff --git a/tests/aot/basic/nullable-bool.phpt b/tests/aot/basic/nullable-bool.phpt new file mode 100644 index 00000000..1c8536cc --- /dev/null +++ b/tests/aot/basic/nullable-bool.phpt @@ -0,0 +1,45 @@ +--TEST-- +bool nullable type +--SKIPIF-- +--FILE-- +test(null); + $o->test(true); + $o->test(false); + $o->test(); + + eval("class TestBoolNullableTypeDym { + public function test(?bool \$value = true) + { + var_dump(\$value); + } + }"); + + $o2 = new TestBoolNullableTypeDym(); + $o2->test(null); + $o2->test(true); + $o2->test(false); + $o2->test(); +} +?> +--EXPECT-- +NULL +bool(true) +bool(false) +bool(true) +NULL +bool(true) +bool(false) +bool(true) \ No newline at end of file