diff options
Diffstat (limited to 'Zend/tests')
| -rw-r--r-- | Zend/tests/bug30820.phpt | 1 | ||||
| -rw-r--r-- | Zend/tests/incompat_ctx_user.phpt | 20 | ||||
| -rw-r--r-- | Zend/tests/zend_signed_multiply-32bit.phpt | 14 | ||||
| -rw-r--r-- | Zend/tests/zend_signed_multiply-64bit.phpt | 14 |
4 files changed, 49 insertions, 0 deletions
diff --git a/Zend/tests/bug30820.phpt b/Zend/tests/bug30820.phpt index 97e46e9287..a0f71e72a7 100644 --- a/Zend/tests/bug30820.phpt +++ b/Zend/tests/bug30820.phpt @@ -2,6 +2,7 @@ Bug #30820 (static member conflict with $this->member silently ignored) --INI-- error_reporting=4095 +opcache.optimization_level=0 --FILE-- <?php class Blah { diff --git a/Zend/tests/incompat_ctx_user.phpt b/Zend/tests/incompat_ctx_user.phpt new file mode 100644 index 0000000000..2d9b59c1e8 --- /dev/null +++ b/Zend/tests/incompat_ctx_user.phpt @@ -0,0 +1,20 @@ +--TEST-- +Incompatible context call (non-internal function) +--INI-- +error_reporting=E_ALL +--FILE-- +<?php + +class A { + function foo() { var_dump(get_class($this)); } +} +class B { + function bar() { A::foo(); } +} +$b = new B; +$b->bar(); + +?> +--EXPECTF-- +Deprecated: Non-static method A::foo() should not be called statically, assuming $this from incompatible context in %s on line %d +string(1) "B" diff --git a/Zend/tests/zend_signed_multiply-32bit.phpt b/Zend/tests/zend_signed_multiply-32bit.phpt new file mode 100644 index 0000000000..3f37cbac19 --- /dev/null +++ b/Zend/tests/zend_signed_multiply-32bit.phpt @@ -0,0 +1,14 @@ +--TEST-- +Zend signed multiply 32-bit +--SKIPIF-- +<?php if ((1 << 31) > 0) print "skip Running on 64-bit target"; ?> +--FILE-- +<?php +var_dump(0x8000 * -0xffff); +var_dump(0x8001 * 0xfffe); +var_dump(0x8001 * -0xffff); +?> +--EXPECTF-- +int(-2147450880) +int(2147483646) +float(-2147516415) diff --git a/Zend/tests/zend_signed_multiply-64bit.phpt b/Zend/tests/zend_signed_multiply-64bit.phpt new file mode 100644 index 0000000000..94a6e035fa --- /dev/null +++ b/Zend/tests/zend_signed_multiply-64bit.phpt @@ -0,0 +1,14 @@ +--TEST-- +Zend signed multiply 64-bit +--SKIPIF-- +<?php if ((1 << 31) < 0) print "skip Running on 32-bit target"; ?> +--FILE-- +<?php +var_dump(0x80000000 * -0xffffffff); +var_dump(0x80000001 * 0xfffffffe); +var_dump(0x80000001 * -0xffffffff); +?> +--EXPECTF-- +int(-9223372034707292160) +int(9223372036854775806) +float(-9.2233720390023E+18) |
