diff --git a/tests/aot/decimal/toString.phpt b/tests/aot/decimal/toString.phpt new file mode 100644 index 00000000..214a988e --- /dev/null +++ b/tests/aot/decimal/toString.phpt @@ -0,0 +1,14 @@ +--TEST-- +decimal: literal +--FILE-- +toString()); +} +?> +--EXPECT-- +string(3) "0.3" \ No newline at end of file diff --git a/tests/aot/trait/012.phpt b/tests/aot/trait/012.phpt new file mode 100644 index 00000000..ed47835c --- /dev/null +++ b/tests/aot/trait/012.phpt @@ -0,0 +1,49 @@ +--TEST-- +Single Trait with simple trait method +--FILE-- + ['toInt' => 123,], + 'test_fn_2' => ['toInt' => 234, ], + 'test_fn_3' => ['toInt' => 333,], + ]; + + public function run(string $key1) { + var_dump(isset(self::CONST_ARRAY[$key1]['toInt'])); + var_dump(self::CONST_ARRAY[$key1]); + } +} + +class TraitsTest { + use THello; + + function hello1() { + $this->run('test_fn_2'); + } +} + +class Test extends TraitsTest { + function hello2() { + $this->run('test_fn_2'); + } +} + +function main() { + $o1 = new TraitsTest(); + $o1->hello1(); + $o2 = new Test(); + $o2->hello2(); +} +?> +--EXPECT-- +bool(true) +array(1) { + ["toInt"]=> + int(234) +} +bool(true) +array(1) { + ["toInt"]=> + int(234) +} \ No newline at end of file diff --git a/version.txt b/version.txt index c500a5fe..9a9755e4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1057 +1058