diff options
Diffstat (limited to 'Zend/tests/type_declarations/typed_properties_049.phpt')
-rw-r--r-- | Zend/tests/type_declarations/typed_properties_049.phpt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/type_declarations/typed_properties_049.phpt b/Zend/tests/type_declarations/typed_properties_049.phpt new file mode 100644 index 0000000000..e761590548 --- /dev/null +++ b/Zend/tests/type_declarations/typed_properties_049.phpt @@ -0,0 +1,10 @@ +--TEST-- +Nullable typed property +--FILE-- +<?php +class Foo { + public int $foo = null; +} +?> +--EXPECTF-- +Fatal error: Default value for property of type int may not be null. Use the nullable type ?int to allow null default value in %s on line %d |