diff --git a/tests/typed_prop.phpt b/tests/typed_prop.phpt new file mode 100644 index 00000000..80f0d3c0 --- /dev/null +++ b/tests/typed_prop.phpt @@ -0,0 +1,35 @@ +--TEST-- +Success parameters should respect property types +--SKIPIF-- +=') or die('skip Requires PHP >= 7.4'); +?> +--INI-- +apc.enabled=1 +apc.enable_cli=1 +--FILE-- +bool); +var_dump($test->bool); +try { + apcu_fetch('foo', $test->array); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} +var_dump($test->array); + +?> +--EXPECT-- +bool(true) +Cannot assign bool to reference held by property Test::$array of type array +array(0) { +}