summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/typed_properties_027.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/type_declarations/typed_properties_027.phpt')
-rw-r--r--Zend/tests/type_declarations/typed_properties_027.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Zend/tests/type_declarations/typed_properties_027.phpt b/Zend/tests/type_declarations/typed_properties_027.phpt
new file mode 100644
index 0000000000..861769932c
--- /dev/null
+++ b/Zend/tests/type_declarations/typed_properties_027.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Test typed properties float widen at runtime
+--FILE--
+<?php
+
+class Foo {
+ public float $bar = 1.1;
+}
+
+$foo = new Foo;
+$foo->bar = 10;
+
+var_dump($foo->bar);
+?>
+--EXPECT--
+float(10)