summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/012.phpt2
-rw-r--r--tests/basic/027.phpt33
-rw-r--r--tests/basic/bug71273.phpt6
-rw-r--r--tests/classes/abstract_user_call.phpt11
-rw-r--r--tests/classes/autoload_012.phpt15
-rw-r--r--tests/classes/bug27504.phpt41
-rw-r--r--tests/classes/constants_basic_001.phpt12
-rw-r--r--tests/classes/constants_scope_001.phpt5
-rw-r--r--tests/classes/ctor_name_clash.phpt23
-rw-r--r--tests/classes/final_ctor1.phpt8
-rw-r--r--tests/classes/final_ctor2.phpt30
-rw-r--r--tests/classes/final_ctor3.phpt15
-rw-r--r--tests/classes/inheritance_002.phpt74
-rw-r--r--tests/classes/inheritance_003.phpt4
-rw-r--r--tests/classes/inheritance_004.phpt6
-rw-r--r--tests/classes/inheritance_005.phpt58
-rw-r--r--tests/classes/inheritance_007.phpt40
-rw-r--r--tests/classes/method_override_optional_arg_001.phpt4
-rw-r--r--tests/classes/method_override_optional_arg_002.phpt3
-rw-r--r--tests/classes/tostring_004.phpt2
-rw-r--r--tests/classes/type_hinting_005a.phpt10
-rw-r--r--tests/classes/type_hinting_005c.phpt7
-rw-r--r--tests/classes/type_hinting_005d.phpt7
-rw-r--r--tests/lang/031.phpt72
-rw-r--r--tests/lang/bug17115.phpt17
-rw-r--r--tests/lang/bug22510.phpt2
-rw-r--r--tests/lang/bug22690.phpt13
-rw-r--r--tests/lang/bug23384.phpt5
-rw-r--r--tests/lang/bug23922.phpt21
-rw-r--r--tests/lang/bug24926.phpt29
-rw-r--r--tests/lang/bug25547.phpt2
-rw-r--r--tests/lang/each_binary_safety.phpt14
-rw-r--r--tests/lang/func_get_arg_variation.phpt9
-rw-r--r--tests/lang/passByReference_005.phpt203
-rw-r--r--tests/lang/passByReference_006.phpt12
-rw-r--r--tests/output/bug74815.phpt19
-rw-r--r--tests/output/ob_014.phpt23
-rw-r--r--tests/output/ob_015.phpt23
-rw-r--r--tests/output/ob_start_basic_005.phpt7
-rw-r--r--tests/output/ob_start_error_001.phpt32
-rw-r--r--tests/output/stream_isatty.inc1
-rw-r--r--tests/output/stream_isatty_err.phpt3
-rw-r--r--tests/output/stream_isatty_in-err.phpt3
-rw-r--r--tests/output/stream_isatty_in-out-err.phpt3
-rw-r--r--tests/output/stream_isatty_in-out.phpt3
-rw-r--r--tests/output/stream_isatty_out-err.phpt3
-rw-r--r--tests/output/stream_isatty_out.phpt3
-rw-r--r--tests/run-test/test005.phpt36
-rw-r--r--tests/run-test/test008.phpt33
-rw-r--r--tests/run-test/test008a.phpt36
-rw-r--r--tests/strings/001.phpt6
-rw-r--r--tests/strings/offsets_chaining_1.phpt2
-rw-r--r--tests/strings/offsets_chaining_2.phpt2
-rw-r--r--tests/strings/offsets_chaining_3.phpt2
-rw-r--r--tests/strings/offsets_chaining_4.phpt2
-rw-r--r--tests/strings/offsets_chaining_5.phpt2
-rw-r--r--tests/strings/offsets_general.phpt2
57 files changed, 203 insertions, 858 deletions
diff --git a/tests/basic/012.phpt b/tests/basic/012.phpt
index 038d4beff9..50af0b49f6 100644
--- a/tests/basic/012.phpt
+++ b/tests/basic/012.phpt
@@ -1,7 +1,5 @@
--TEST--
Testing $argc and $argv handling (cli)
---SKIPIF--
-<?php if(php_sapi_name()!='cli') echo 'skip'; ?>
--INI--
register_argc_argv=1
variables_order=GPS
diff --git a/tests/basic/027.phpt b/tests/basic/027.phpt
deleted file mode 100644
index 0528e835a1..0000000000
--- a/tests/basic/027.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-Handling of max_input_nesting_level being reached
---INI--
-always_populate_raw_post_data=0
-display_errors=0
-max_input_nesting_level=10
-max_input_vars=1000
-track_errors=1
-log_errors=0
---POST--
-a=1&b=ZYX&c[][][][][][][][][][][][][][][][][][][][][][]=123&d=123&e[][]][]=3
---FILE--
-<?php
-var_dump($_POST, $php_errormsg);
-?>
---EXPECT--
-array(4) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(3) "ZYX"
- ["d"]=>
- string(3) "123"
- ["e"]=>
- array(1) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "3"
- }
- }
-}
-string(115) "Unknown: Input variable nesting level exceeded 10. To increase the limit change max_input_nesting_level in php.ini."
diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
index 3db4454605..3e32b7a4b7 100644
--- a/tests/basic/bug71273.phpt
+++ b/tests/basic/bug71273.phpt
@@ -1,11 +1,5 @@
--TEST--
Bug #71273 A wrong ext directory setup in php.ini leads to crash
---SKIPIF--
-<?php
- if ("cli" != php_sapi_name()) {
- die("skip CLI only");
- }
-?>
--FILE--
<?php
/* NOTE this file is required to be encoded in iso-8859-1 */
diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt
index 6ce810c836..c69eaa458c 100644
--- a/tests/classes/abstract_user_call.phpt
+++ b/tests/classes/abstract_user_call.phpt
@@ -20,12 +20,15 @@ $o = new test;
$o->func();
-call_user_func(array($o, 'test_base::func'));
+try {
+ call_user_func(array($o, 'test_base::func'));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
===DONE===
---EXPECTF--
+--EXPECT--
test::func()
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, cannot call abstract method test_base::func() in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, cannot call abstract method test_base::func()
===DONE===
diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt
index 4fc41c85f5..c5b32debae 100644
--- a/tests/classes/autoload_012.phpt
+++ b/tests/classes/autoload_012.phpt
@@ -3,12 +3,15 @@ Ensure callback methods in unknown classes trigger autoload.
--FILE--
<?php
spl_autoload_register(function ($name) {
- echo "In autoload: ";
- var_dump($name);
+ echo "In autoload: ";
+ var_dump($name);
});
-call_user_func("UndefC::test");
+try {
+ call_user_func("UndefC::test");
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
+--EXPECT--
In autoload: string(6) "UndefC"
-
-Warning: call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found in %s on line %d
+call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found
diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt
index ba44806bfe..4e227a1075 100644
--- a/tests/classes/bug27504.phpt
+++ b/tests/classes/bug27504.phpt
@@ -2,27 +2,30 @@
Bug #27504 (call_user_func_array allows calling of private/protected methods)
--FILE--
<?php
- class foo {
- function __construct () {
- $this->bar('1');
- }
- private function bar ( $param ) {
- echo 'Called function foo:bar('.$param.')'."\n";
- }
- }
+class foo {
+ function __construct () {
+ $this->bar('1');
+ }
+ private function bar ( $param ) {
+ echo 'Called function foo:bar('.$param.')'."\n";
+ }
+}
- $foo = new foo();
+$foo = new foo();
- call_user_func_array( array( $foo , 'bar' ) , array( '2' ) );
+try {
+ call_user_func_array( array( $foo , 'bar' ) , array( '2' ) );
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
+try {
+ $foo->bar('3');
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
- $foo->bar('3');
?>
---EXPECTF--
+--EXPECT--
Called function foo:bar(1)
-
-Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar() in %s on line %d
-
-Fatal error: Uncaught Error: Call to private method foo::bar() from context '' in %s:%d
-Stack trace:
-#0 {main}
- thrown in %s on line %d
+call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method foo::bar()
+Call to private method foo::bar() from context ''
diff --git a/tests/classes/constants_basic_001.phpt b/tests/classes/constants_basic_001.phpt
index 6a281e7d32..38da2dfde0 100644
--- a/tests/classes/constants_basic_001.phpt
+++ b/tests/classes/constants_basic_001.phpt
@@ -9,8 +9,6 @@ Class constant declarations
class C
{
- const c0 = UNDEFINED;
-
const c1 = 1, c2 = 1.5;
const c3 = + 1, c4 = + 1.5;
const c5 = -1, c6 = -1.5;
@@ -32,7 +30,6 @@ Class constant declarations
}
echo "\nAttempt to access various kinds of class constants:\n";
- var_dump(C::c0);
var_dump(C::c1);
var_dump(C::c2);
var_dump(C::c3);
@@ -61,16 +58,13 @@ Class constant declarations
Notice: Undefined variable: undef in %s on line 5
Attempt to access various kinds of class constants:
-
-Warning: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' (this will throw an Error in a future version of PHP) in %s on line %d
-string(9) "UNDEFINED"
int(1)
float(1.5)
int(1)
float(1.5)
int(-1)
float(-1.5)
-int(15)
+int(13)
string(%d) "%s"
string(1) "C"
string(0) ""
@@ -85,7 +79,7 @@ string(6) "hello2"
Expecting fatal error:
-Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:53
+Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:%d
Stack trace:
#0 {main}
- thrown in %s on line 53
+ thrown in %s on line %d
diff --git a/tests/classes/constants_scope_001.phpt b/tests/classes/constants_scope_001.phpt
index 7adf3f8681..e9635d8d23 100644
--- a/tests/classes/constants_scope_001.phpt
+++ b/tests/classes/constants_scope_001.phpt
@@ -9,7 +9,6 @@ class ErrorCodes {
const INFO = "Informational message\n";
static function print_fatal_error_codes() {
- echo "FATAL = " . FATAL . "\n";
echo "self::FATAL = " . self::FATAL;
}
}
@@ -27,9 +26,7 @@ ErrorCodes::print_fatal_error_codes();
ErrorCodesDerived::print_fatal_error_codes();
?>
---EXPECTF--
-Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in %sconstants_scope_001.php on line %d
-FATAL = FATAL
+--EXPECT--
self::FATAL = Fatal error
self::FATAL = Worst error
parent::FATAL = Fatal error
diff --git a/tests/classes/ctor_name_clash.phpt b/tests/classes/ctor_name_clash.phpt
deleted file mode 100644
index e6518775ff..0000000000
--- a/tests/classes/ctor_name_clash.phpt
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-ZE2 The child class can re-use the parent class name for a function member
---FILE--
-<?php
-class base {
- function base() {
- echo __CLASS__."::".__FUNCTION__."\n";
- }
-}
-
-class derived extends base {
- function base() {
- echo __CLASS__."::".__FUNCTION__."\n";
- }
-}
-
-$obj = new derived();
-$obj->base();
-?>
---EXPECTF--
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; base has a deprecated constructor in %s on line %d
-base::base
-derived::base
diff --git a/tests/classes/final_ctor1.phpt b/tests/classes/final_ctor1.phpt
index acf20918fd..33fcbe6bd8 100644
--- a/tests/classes/final_ctor1.phpt
+++ b/tests/classes/final_ctor1.phpt
@@ -16,15 +16,11 @@ class Works extends Base
class Extended extends Base
{
- public function Extended()
+ public function __construct()
{
}
}
-ReflectionClass::export('Extended');
-
?>
--EXPECTF--
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Extended has a deprecated constructor in %s on line %d
-
-Fatal error: Cannot override final Base::__construct() with Extended::Extended() in %sfinal_ctor1.php on line %d
+Fatal error: Cannot override final method Base::__construct() in %s on line %d
diff --git a/tests/classes/final_ctor2.phpt b/tests/classes/final_ctor2.phpt
deleted file mode 100644
index 37fcac29a9..0000000000
--- a/tests/classes/final_ctor2.phpt
+++ /dev/null
@@ -1,30 +0,0 @@
---TEST--
-ZE2 cannot override final old style ctor
---FILE--
-<?php
-
-class Base
-{
- public final function Base()
- {
- }
-}
-
-class Works extends Base
-{
-}
-
-class Extended extends Base
-{
- public function __construct()
- {
- }
-}
-
-ReflectionClass::export('Extended');
-
-?>
---EXPECTF--
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Base has a deprecated constructor in %s on line %d
-
-Fatal error: Cannot override final Base::Base() with Extended::__construct() in %sfinal_ctor2.php on line %d
diff --git a/tests/classes/final_ctor3.phpt b/tests/classes/final_ctor3.phpt
deleted file mode 100644
index b0156ef294..0000000000
--- a/tests/classes/final_ctor3.phpt
+++ /dev/null
@@ -1,15 +0,0 @@
---TEST--
-Ensure implicit final inherited old-style constructor cannot be overridden.
---FILE--
-<?php
- class A {
- final function A() { }
- }
- class B extends A {
- function A() { }
- }
-?>
---EXPECTF--
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in %s on line %d
-
-Fatal error: Cannot override final method A::A() in %s on line 6
diff --git a/tests/classes/inheritance_002.phpt b/tests/classes/inheritance_002.phpt
deleted file mode 100644
index f88c0996bd..0000000000
--- a/tests/classes/inheritance_002.phpt
+++ /dev/null
@@ -1,74 +0,0 @@
---TEST--
-ZE2 Constructor precedence
---FILE--
-<?php
-class Base_php4 {
- function Base_php4() {
- var_dump('Base constructor');
- }
-}
-
-class Child_php4 extends Base_php4 {
- function Child_php4() {
- var_dump('Child constructor');
- parent::Base_php4();
- }
-}
-
-class Base_php5 {
- function __construct() {
- var_dump('Base constructor');
- }
- }
-
-class Child_php5 extends Base_php5 {
- function __construct() {
- var_dump('Child constructor');
- parent::__construct();
- }
- }
-
-class Child_mx1 extends Base_php4 {
- function __construct() {
- var_dump('Child constructor');
- parent::Base_php4();
- }
-}
-
-class Child_mx2 extends Base_php5 {
- function Child_mx2() {
- var_dump('Child constructor');
- parent::__construct();
- }
-}
-
-echo "### PHP 4 style\n";
-$c4= new Child_php4();
-
-echo "### PHP 5 style\n";
-$c5= new Child_php5();
-
-echo "### Mixed style 1\n";
-$cm= new Child_mx1();
-
-echo "### Mixed style 2\n";
-$cm= new Child_mx2();
-?>
---EXPECTF--
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Base_php4 has a deprecated constructor in %s on line %d
-
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Child_php4 has a deprecated constructor in %s on line %d
-
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Child_mx2 has a deprecated constructor in %s on line %d
-### PHP 4 style
-string(17) "Child constructor"
-string(16) "Base constructor"
-### PHP 5 style
-string(17) "Child constructor"
-string(16) "Base constructor"
-### Mixed style 1
-string(17) "Child constructor"
-string(16) "Base constructor"
-### Mixed style 2
-string(17) "Child constructor"
-string(16) "Base constructor"
diff --git a/tests/classes/inheritance_003.phpt b/tests/classes/inheritance_003.phpt
index bcbead1be7..925544e754 100644
--- a/tests/classes/inheritance_003.phpt
+++ b/tests/classes/inheritance_003.phpt
@@ -14,7 +14,5 @@ class B extends A
}
?>
-===DONE===
--EXPECTF--
-Warning: Declaration of B::f() should be compatible with A::f($x) in %sinheritance_003.php on line %d
-===DONE===
+Fatal error: Declaration of B::f() must be compatible with A::f($x) in %sinheritance_003.php on line %d
diff --git a/tests/classes/inheritance_004.phpt b/tests/classes/inheritance_004.phpt
index 7eb57b2770..682bee7a1b 100644
--- a/tests/classes/inheritance_004.phpt
+++ b/tests/classes/inheritance_004.phpt
@@ -5,7 +5,7 @@ ZE2 method inheritance without interfaces
class A
{
- function f() {}
+function f() {}
}
class B extends A
@@ -14,7 +14,5 @@ class B extends A
}
?>
-===DONE===
--EXPECTF--
-Warning: Declaration of B::f($x) should be compatible with A::f() in %sinheritance_004.php on line %d
-===DONE===
+Fatal error: Declaration of B::f($x) must be compatible with A::f() in %sinheritance_004.php on line %d
diff --git a/tests/classes/inheritance_005.phpt b/tests/classes/inheritance_005.phpt
deleted file mode 100644
index 8c5167f4bf..0000000000
--- a/tests/classes/inheritance_005.phpt
+++ /dev/null
@@ -1,58 +0,0 @@
---TEST--
-Check for inherited old-style constructor.
---FILE--
-<?php
- class A
- {
- function A()
- {
- echo "In " . __METHOD__ . "\n";
- }
- }
-
- class B extends A
- {
- }
-
- class C extends B
- {
- }
-
-
- echo "About to construct new B: \n";
- $b = new B;
-
- echo "Is B::B() callable?\n";
- var_dump(is_callable(array($b, "B")));
-
- echo "Is B::A() callable?\n";
- var_dump(is_callable(array($b, "A")));
-
- echo "About to construct new C: \n";
- $c = new C;
-
- echo "Is C::A() callable?\n";
- var_dump(is_callable(array($c, "A")));
-
- echo "Is C::B() callable?\n";
- var_dump(is_callable(array($c, "B")));
-
- echo "Is C::C() callable?\n";
- var_dump(is_callable(array($c, "C")));
-?>
---EXPECTF--
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in %s on line %d
-About to construct new B:
-In A::A
-Is B::B() callable?
-bool(false)
-Is B::A() callable?
-bool(true)
-About to construct new C:
-In A::A
-Is C::A() callable?
-bool(true)
-Is C::B() callable?
-bool(false)
-Is C::C() callable?
-bool(false)
diff --git a/tests/classes/inheritance_007.phpt b/tests/classes/inheritance_007.phpt
deleted file mode 100644
index c87fbde344..0000000000
--- a/tests/classes/inheritance_007.phpt
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-Ensure inherited old-style constructor doesn't block other methods
---FILE--
-<?php
-class A {
- public function B () { echo "In " . __METHOD__ . "\n"; }
- public function A () { echo "In " . __METHOD__ . "\n"; }
-}
-class B extends A { }
-
-$rc = new ReflectionClass('B');
-var_dump($rc->getMethods());
-
-
-$b = new B();
-$b->a();
-$b->b();
-
-?>
---EXPECTF--
-Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in %s on line %d
-array(2) {
- [0]=>
- object(ReflectionMethod)#%d (2) {
- ["name"]=>
- string(1) "B"
- ["class"]=>
- string(1) "A"
- }
- [1]=>
- object(ReflectionMethod)#%d (2) {
- ["name"]=>
- string(1) "A"
- ["class"]=>
- string(1) "A"
- }
-}
-In A::A
-In A::A
-In A::B
diff --git a/tests/classes/method_override_optional_arg_001.phpt b/tests/classes/method_override_optional_arg_001.phpt
index 897a2c2b93..ac1a689238 100644
--- a/tests/classes/method_override_optional_arg_001.phpt
+++ b/tests/classes/method_override_optional_arg_001.phpt
@@ -26,6 +26,4 @@ $b->foo(1);
?>
--EXPECTF--
-Warning: Declaration of C::foo() should be compatible with A::foo($arg1 = 1) in %s on line %d
-int(1)
-int(3)
+Fatal error: Declaration of C::foo() must be compatible with A::foo($arg1 = 1) in %s on line %d
diff --git a/tests/classes/method_override_optional_arg_002.phpt b/tests/classes/method_override_optional_arg_002.phpt
index 254392718b..df12251e6c 100644
--- a/tests/classes/method_override_optional_arg_002.phpt
+++ b/tests/classes/method_override_optional_arg_002.phpt
@@ -18,5 +18,4 @@ $b->foo();
?>
--EXPECTF--
-Warning: Declaration of B::foo() should be compatible with A::foo($arg = 1) in %s on line %d
-foo
+Fatal error: Declaration of B::foo() must be compatible with A::foo($arg = 1) in %s on line %d
diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt
index 907f7bc306..6029938f32 100644
--- a/tests/classes/tostring_004.phpt
+++ b/tests/classes/tostring_004.phpt
@@ -2,7 +2,7 @@
Object to string conversion: error cases and behaviour variations.
--FILE--
<?php
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
echo "Error: $err_no - $err_msg\n";
}
set_error_handler('test_error_handler');
diff --git a/tests/classes/type_hinting_005a.phpt b/tests/classes/type_hinting_005a.phpt
index 54af0e8c96..065ba70e8a 100644
--- a/tests/classes/type_hinting_005a.phpt
+++ b/tests/classes/type_hinting_005a.phpt
@@ -4,15 +4,11 @@ Check type hint compatibility in overrides with array hints.
<?php
Class C { function f(array $a) {} }
-echo "Compatible hint.\n";
+// Compatible hint.
Class D1 extends C { function f(array $a) {} }
-echo "Class hint, should be array.\n";
+// Class hint, should be array.
Class D2 extends C { function f(SomeClass $a) {} }
?>
-==DONE==
--EXPECTF--
-Warning: Declaration of D2::f(SomeClass $a) should be compatible with C::f(array $a) in %s on line 8
-Compatible hint.
-Class hint, should be array.
-==DONE==
+Fatal error: Declaration of D2::f(SomeClass $a) must be compatible with C::f(array $a) in %s on line 8
diff --git a/tests/classes/type_hinting_005c.phpt b/tests/classes/type_hinting_005c.phpt
index 00048c3ef9..6cc3e3e369 100644
--- a/tests/classes/type_hinting_005c.phpt
+++ b/tests/classes/type_hinting_005c.phpt
@@ -4,11 +4,8 @@ Check type hint compatibility in overrides with array hints.
<?php
Class C { function f(SomeClass $a) {} }
-echo "Array hint, should be class.\n";
+// Array hint, should be class.
Class D extends C { function f(array $a) {} }
?>
-==DONE==
--EXPECTF--
-Warning: Declaration of D::f(array $a) should be compatible with C::f(SomeClass $a) in %s on line 5
-Array hint, should be class.
-==DONE==
+Fatal error: Declaration of D::f(array $a) must be compatible with C::f(SomeClass $a) in %s on line 5
diff --git a/tests/classes/type_hinting_005d.phpt b/tests/classes/type_hinting_005d.phpt
index a1ce30950c..51c2a5a995 100644
--- a/tests/classes/type_hinting_005d.phpt
+++ b/tests/classes/type_hinting_005d.phpt
@@ -4,11 +4,8 @@ Check type hint compatibility in overrides with array hints.
<?php
Class C { function f($a) {} }
-echo "Array hint, should be nothing.\n";
+// Array hint, should be nothing.
Class D extends C { function f(array $a) {} }
?>
-==DONE==
--EXPECTF--
-Warning: Declaration of D::f(array $a) should be compatible with C::f($a) in %s on line 5
-Array hint, should be nothing.
-==DONE==
+Fatal error: Declaration of D::f(array $a) must be compatible with C::f($a) in %s on line 5
diff --git a/tests/lang/031.phpt b/tests/lang/031.phpt
deleted file mode 100644
index 134df03684..0000000000
--- a/tests/lang/031.phpt
+++ /dev/null
@@ -1,72 +0,0 @@
---TEST--
-Bug #16227 (Internal hash position bug on assignment)
---FILE--
-<?php
-// reported by php.net@alienbill.com
-$arrayOuter = array("key1","key2");
-$arrayInner = array("0","1");
-
-print "Correct - with inner loop reset.\n";
-
-while(list(,$o) = each($arrayOuter)){
- reset($arrayInner);
- while(list(,$i) = each($arrayInner)){
- print "inloop $i for $o\n";
- }
-}
-reset($arrayOuter);
-reset($arrayInner);
-
-print "What happens without inner loop reset.\n";
-
-while(list(,$o) = each($arrayOuter)){
- while(list(,$i) = each($arrayInner)){
- print "inloop $i for $o\n";
- }
-}
-reset($arrayOuter);
-reset($arrayInner);
-
-print "What happens without inner loop reset but copy.\n";
-
-while(list(,$o) = each($arrayOuter)){
- $placeholder = $arrayInner;
- while(list(,$i) = each($arrayInner)){
- print "inloop $i for $o\n";
- }
-}
-reset($arrayOuter);
-reset($arrayInner);
-
-print "What happens with inner loop reset over copy.\n";
-
-while(list(,$o) = each($arrayOuter)){
- $placeholder = $arrayInner;
- while(list(,$i) = each($placeholder)){
- print "inloop $i for $o\n";
- }
-}
-reset($arrayOuter);
-reset($arrayInner);
-?>
---EXPECTF--
-Correct - with inner loop reset.
-
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-inloop 0 for key1
-inloop 1 for key1
-inloop 0 for key2
-inloop 1 for key2
-What happens without inner loop reset.
-inloop 0 for key1
-inloop 1 for key1
-What happens without inner loop reset but copy.
-inloop 0 for key1
-inloop 1 for key1
-inloop 0 for key2
-inloop 1 for key2
-What happens with inner loop reset over copy.
-inloop 0 for key1
-inloop 1 for key1
-inloop 0 for key2
-inloop 1 for key2
diff --git a/tests/lang/bug17115.phpt b/tests/lang/bug17115.phpt
deleted file mode 100644
index 9500352799..0000000000
--- a/tests/lang/bug17115.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-Bug #17115 (lambda functions produce segfault with static vars)
---FILE--
-<?php
-$func = create_function('','
- static $foo = 0;
- return $foo++;
-');
-var_dump($func());
-var_dump($func());
-var_dump($func());
-?>
---EXPECTF--
-Deprecated: Function create_function() is deprecated in %s on line %d
-int(0)
-int(1)
-int(2)
diff --git a/tests/lang/bug22510.phpt b/tests/lang/bug22510.phpt
index dbf7756daa..842373c6c6 100644
--- a/tests/lang/bug22510.phpt
+++ b/tests/lang/bug22510.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #22510 (segfault among complex references)
---INI--
-error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
class foo
diff --git a/tests/lang/bug22690.phpt b/tests/lang/bug22690.phpt
deleted file mode 100644
index 85ddcd3487..0000000000
--- a/tests/lang/bug22690.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Bug #22690 (ob_start() is broken with create_function() callbacks)
---FILE--
-<?php
- $foo = create_function('$s', 'return strtoupper($s);');
- ob_start($foo);
- echo $foo("bar\n");
-?>
-bar
---EXPECTF--
-Deprecated: Function create_function() is deprecated in %s on line %d
-BAR
-BAR
diff --git a/tests/lang/bug23384.phpt b/tests/lang/bug23384.phpt
index 2dc3f2308b..220cf9f654 100644
--- a/tests/lang/bug23384.phpt
+++ b/tests/lang/bug23384.phpt
@@ -5,7 +5,7 @@ Bug #23384 (use of class constants in statics)
define('TEN', 10);
class Foo {
const HUN = 100;
- function test($x = Foo::HUN) {
+ static function test($x = Foo::HUN) {
static $arr2 = array(TEN => 'ten');
static $arr = array(Foo::HUN => 'ten');
@@ -18,8 +18,7 @@ class Foo {
Foo::test();
echo Foo::HUN."\n";
?>
---EXPECTF--
-Deprecated: Non-static method Foo::test() should not be called statically in %sbug23384.php on line %d
+--EXPECT--
Array
(
[100] => ten
diff --git a/tests/lang/bug23922.phpt b/tests/lang/bug23922.phpt
deleted file mode 100644
index 22c4aaa7d4..0000000000
--- a/tests/lang/bug23922.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-Bug #23922 (scope doesn't properly propagate into internal functions)
---FILE--
-<?php
- class foo
- {
- public $foo = 1;
-
- function as_string()
- { assert('$this->foo == 1'); }
-
- function as_expr()
- { assert($this->foo == 1); }
- }
-
- $foo = new foo();
- $foo->as_expr();
- $foo->as_string();
-?>
---EXPECTF--
-Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
diff --git a/tests/lang/bug24926.phpt b/tests/lang/bug24926.phpt
deleted file mode 100644
index f73d265f38..0000000000
--- a/tests/lang/bug24926.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-Bug #24926 (lambda function (create_function()) cannot be stored in a class property)
---FILE--
-<?php
-
-error_reporting (E_ALL);
-
-class foo {
-
- public $functions = array();
-
- function __construct()
- {
- $function = create_function('', 'return "FOO\n";');
- print($function());
-
- $this->functions['test'] = $function;
- print($this->functions['test']()); // werkt al niet meer
-
- }
-}
-
-$a = new foo ();
-
-?>
---EXPECTF--
-Deprecated: Function create_function() is deprecated in %s on line %d
-FOO
-FOO
diff --git a/tests/lang/bug25547.phpt b/tests/lang/bug25547.phpt
index b54f467ea8..eae32e7223 100644
--- a/tests/lang/bug25547.phpt
+++ b/tests/lang/bug25547.phpt
@@ -3,7 +3,7 @@ Bug #25547 (error_handler and array index with function call)
--FILE--
<?php
-function handler($errno, $errstr, $errfile, $errline, $context)
+function handler($errno, $errstr, $errfile, $errline)
{
echo __FUNCTION__ . "($errstr)\n";
}
diff --git a/tests/lang/each_binary_safety.phpt b/tests/lang/each_binary_safety.phpt
deleted file mode 100644
index ce175495aa..0000000000
--- a/tests/lang/each_binary_safety.phpt
+++ /dev/null
@@ -1,14 +0,0 @@
---TEST--
-Binary safety of each() for both keys and values
---FILE--
-<?php
-error_reporting(E_ALL);
-$arr = array ("foo\0bar" => "foo\0bar");
-while (list($key, $val) = each($arr)) {
- echo strlen($key), ': ';
- echo urlencode($key), ' => ', urlencode($val), "\n";
-}
-?>
---EXPECTF--
-Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
-7: foo%00bar => foo%00bar
diff --git a/tests/lang/func_get_arg_variation.phpt b/tests/lang/func_get_arg_variation.phpt
index 741b6604c0..bd1fa5b4c5 100644
--- a/tests/lang/func_get_arg_variation.phpt
+++ b/tests/lang/func_get_arg_variation.phpt
@@ -6,9 +6,6 @@ func_get_arg test
function foo($a)
{
$a=5;
- echo func_get_arg();
- echo func_get_arg(2,2);
- echo func_get_arg("hello");
echo func_get_arg(-1);
echo func_get_arg(2);
}
@@ -16,12 +13,6 @@ foo(2);
echo "\n";
?>
--EXPECTF--
-Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: func_get_arg() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: func_get_arg() expects parameter 1 to be int, string given in %s on line %d
-
Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d
Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d
diff --git a/tests/lang/passByReference_005.phpt b/tests/lang/passByReference_005.phpt
index dc32962d67..ffa5de589f 100644
--- a/tests/lang/passByReference_005.phpt
+++ b/tests/lang/passByReference_005.phpt
@@ -4,70 +4,95 @@ Pass uninitialised variables by reference and by value to test implicit initiali
<?php
function v($val) {
- $val = "Val changed";
+ $val = "Val changed";
}
function r(&$ref) {
- $ref = "Ref changed";
+ $ref = "Ref changed";
}
-
function vv($val1, $val2) {
- $val1 = "Val1 changed";
- $val2 = "Val2 changed";
+ $val1 = "Val1 changed";
+ $val2 = "Val2 changed";
}
function vr($val, &$ref) {
- $val = "Val changed";
- $ref = "Ref changed";
+ $val = "Val changed";
+ $ref = "Ref changed";
}
function rv(&$ref, $val) {
- $val = "Val changed";
- $ref = "Ref changed";
+ $val = "Val changed";
+ $ref = "Ref changed";
}
function rr(&$ref1, &$ref2) {
- $ref1 = "Ref1 changed";
- $ref2 = "Ref2 changed";
+ $ref1 = "Ref1 changed";
+ $ref2 = "Ref2 changed";
}
class C {
-
- function __construct($val, &$ref) {
- $val = "Val changed";
- $ref = "Ref changed";
- }
-
- function v($val) {
- $val = "Val changed";
- }
-
- function r(&$ref) {
- $ref = "Ref changed";
- }
-
- function vv($val1, $val2) {
- $val1 = "Val1 changed";
- $val2 = "Val2 changed";
- }
-
- function vr($val, &$ref) {
- $val = "Val changed";
- $ref = "Ref changed";
- }
-
- function rv(&$ref, $val) {
- $val = "Val changed";
- $ref = "Ref changed";
- }
-
- function rr(&$ref1, &$ref2) {
- $ref1 = "Ref1 changed";
- $ref2 = "Ref2 changed";
- }
-
+ function __construct($val, &$ref) {
+ $val = "Val changed";
+ $ref = "Ref changed";
+ }
+
+ function v($val) {
+ $val = "Val changed";
+ }
+
+ function r(&$ref) {
+ $ref = "Ref changed";
+ }
+
+ function vv($val1, $val2) {
+ $val1 = "Val1 changed";
+ $val2 = "Val2 changed";
+ }
+
+ function vr($val, &$ref) {
+ $val = "Val changed";
+ $ref = "Ref changed";
+ }
+
+ function rv(&$ref, $val) {
+ $val = "Val changed";
+ $ref = "Ref changed";
+ }
+
+ function rr(&$ref1, &$ref2) {
+ $ref1 = "Ref1 changed";
+ $ref2 = "Ref2 changed";
+ }
+
+ static function static_v($val) {
+ $val = "Val changed";
+ }
+
+ static function static_r(&$ref) {
+ $ref = "Ref changed";
+ }
+
+ static function static_vv($val1, $val2) {
+ $val1 = "Val1 changed";
+ $val2 = "Val2 changed";
+ }
+
+ static function static_vr($val, &$ref) {
+ $val = "Val changed";
+ $ref = "Ref changed";
+ }
+
+ static function static_rv(&$ref, $val) {
+ $val = "Val changed";
+ $ref = "Ref changed";
+ }
+
+ static function static_rr(&$ref1, &$ref2) {
+ $ref1 = "Ref1 changed";
+ $ref2 = "Ref2 changed";
+ }
}
echo "\n ---- Pass by ref / pass by val: functions ----\n";
@@ -95,24 +120,24 @@ var_dump($u1, $u2);
echo "\n\n ---- Pass by ref / pass by val: static method calls ----\n";
unset($u1, $u2);
-C::v($u1);
-C::r($u2);
+C::static_v($u1);
+C::static_r($u2);
var_dump($u1, $u2);
unset($u1, $u2);
-C::vv($u1, $u2);
+C::static_vv($u1, $u2);
var_dump($u1, $u2);
unset($u1, $u2);
-C::vr($u1, $u2);
+C::static_vr($u1, $u2);
var_dump($u1, $u2);
unset($u1, $u2);
-C::rv($u1, $u2);
+C::static_rv($u1, $u2);
var_dump($u1, $u2);
unset($u1, $u2);
-C::rr($u1, $u2);
+C::static_rr($u1, $u2);
var_dump($u1, $u2);
echo "\n\n ---- Pass by ref / pass by val: instance method calls ----\n";
@@ -145,31 +170,31 @@ var_dump($u1, $u2);
--EXPECTF--
---- Pass by ref / pass by val: functions ----
-Notice: Undefined variable: u1 in %s on line 72
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 74
+Notice: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u1 in %s on line 77
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 77
+Notice: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 78
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 78
+Notice: Undefined variable: u2 in %s on line %d
NULL
NULL
-Notice: Undefined variable: u1 in %s on line 81
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 82
+Notice: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u2 in %s on line 85
+Notice: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 86
+Notice: Undefined variable: u2 in %s on line %d
string(11) "Ref changed"
NULL
string(12) "Ref1 changed"
@@ -178,82 +203,70 @@ string(12) "Ref2 changed"
---- Pass by ref / pass by val: static method calls ----
-Deprecated: Non-static method C::v() should not be called statically in %s on line 95
-
-Notice: Undefined variable: u1 in %s on line 95
+Notice: Undefined variable: u1 in %s on line %d
-Deprecated: Non-static method C::r() should not be called statically in %s on line 96
-
-Notice: Undefined variable: u1 in %s on line 97
+Notice: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Deprecated: Non-static method C::vv() should not be called statically in %s on line 100
-
-Notice: Undefined variable: u1 in %s on line 100
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 100
+Notice: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 101
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 101
+Notice: Undefined variable: u2 in %s on line %d
NULL
NULL
-Deprecated: Non-static method C::vr() should not be called statically in %s on line 104
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 104
-
-Notice: Undefined variable: u1 in %s on line 105
+Notice: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Deprecated: Non-static method C::rv() should not be called statically in %s on line 108
-
-Notice: Undefined variable: u2 in %s on line 108
+Notice: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 109
+Notice: Undefined variable: u2 in %s on line %d
string(11) "Ref changed"
NULL
-
-Deprecated: Non-static method C::rr() should not be called statically in %s on line 112
string(12) "Ref1 changed"
string(12) "Ref2 changed"
---- Pass by ref / pass by val: instance method calls ----
-Notice: Undefined variable: u1 in %s on line 117
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 118
+Notice: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u1 in %s on line 121
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 123
+Notice: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u1 in %s on line 126
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 126
+Notice: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 127
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 127
+Notice: Undefined variable: u2 in %s on line %d
NULL
NULL
-Notice: Undefined variable: u1 in %s on line 130
+Notice: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 131
+Notice: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u2 in %s on line 134
+Notice: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 135
+Notice: Undefined variable: u2 in %s on line %d
string(11) "Ref changed"
NULL
string(12) "Ref1 changed"
diff --git a/tests/lang/passByReference_006.phpt b/tests/lang/passByReference_006.phpt
index c1478663ca..25107b47c8 100644
--- a/tests/lang/passByReference_006.phpt
+++ b/tests/lang/passByReference_006.phpt
@@ -30,6 +30,14 @@ class C {
$ref5 = "Ref5 changed";
}
+ static function static_refs(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) {
+ $ref1 = "Ref1 changed";
+ $ref2 = "Ref2 changed";
+ $ref3 = "Ref3 changed";
+ $ref4 = "Ref4 changed";
+ $ref5 = "Ref5 changed";
+ }
+
}
echo "\n ---- Pass uninitialised array & object by ref: function call ---\n";
@@ -39,7 +47,7 @@ var_dump($u1, $u2, $u3, $u4, $u5);
echo "\n ---- Pass uninitialised arrays & objects by ref: static method call ---\n";
unset($u1, $u2, $u3, $u4, $u5);
-C::refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c);
+C::static_refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c);
var_dump($u1, $u2, $u3, $u4, $u5);
echo "\n\n---- Pass uninitialised arrays & objects by ref: constructor ---\n";
@@ -102,8 +110,6 @@ object(stdClass)#%d (1) {
---- Pass uninitialised arrays & objects by ref: static method call ---
-Deprecated: Non-static method C::refs() should not be called statically in %s on line 39
-
Warning: Creating default object from empty value in %spassByReference_006.php on line %d
Warning: Creating default object from empty value in %spassByReference_006.php on line %d
diff --git a/tests/output/bug74815.phpt b/tests/output/bug74815.phpt
deleted file mode 100644
index 1d9c825999..0000000000
--- a/tests/output/bug74815.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-Bug #74815 crash with a combination of INI entries at startup
---FILE--
-<?php
-
-$php = getenv("TEST_PHP_EXECUTABLE");
-
-echo shell_exec("$php -n -d error_log=".__DIR__."/error_log.tmp -d error_reporting=E_ALL -d log_errors=On -d track_errors=On -v");
-
-?>
-==DONE==
---CLEAN--
-<?php
-unlink(__DIR__.'/error_log.tmp');
-?>
---EXPECTF--
-Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
-%A
-==DONE==
diff --git a/tests/output/ob_014.phpt b/tests/output/ob_014.phpt
index 09534270f3..bc46f2ae58 100644
--- a/tests/output/ob_014.phpt
+++ b/tests/output/ob_014.phpt
@@ -4,19 +4,12 @@ output buffering - failure
<?php
ob_start("str_rot13");
echo "foo\n";
-// str_rot13 expects 1 param and returns NULL when passed 2 params.
-// It is invoked with 2 params when used as an OB callback.
-// Therefore, there will be no data in the buffer. This is expected: see bug 46900.
-ob_end_flush();
-
-// Show the error.
-print_r(error_get_last());
+try {
+ ob_end_flush();
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
-Array
-(
- [type] => 2
- [message] => str_rot13() expects exactly 1 parameter, 2 given
- [file] => %s
- [line] => 7
-)
+--EXPECT--
+foo
+str_rot13() expects exactly 1 parameter, 2 given
diff --git a/tests/output/ob_015.phpt b/tests/output/ob_015.phpt
index 2acdb40d0a..2bc08687d7 100644
--- a/tests/output/ob_015.phpt
+++ b/tests/output/ob_015.phpt
@@ -3,20 +3,13 @@ output buffering - failure
--FILE--
<?php
ob_start("str_rot13", 1);
-echo "foo\n";
-// str_rot13 expects 1 param and returns NULL when passed 2 params.
-// It is invoked with 2 params when used as an OB callback.
-// Therefore, there will be no data in the buffer. This is expected: see bug 46900.
+try {
+ echo "foo\n";
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
ob_end_flush();
-
-// Show the error.
-print_r(error_get_last());
?>
---EXPECTF--
-Array
-(
- [type] => 2
- [message] => str_rot13() expects exactly 1 parameter, 2 given
- [file] => %s
- [line] => 7
-)
+--EXPECT--
+foo
+str_rot13() expects exactly 1 parameter, 2 given
diff --git a/tests/output/ob_start_basic_005.phpt b/tests/output/ob_start_basic_005.phpt
index 7cab6ed35f..dda6587614 100644
--- a/tests/output/ob_start_basic_005.phpt
+++ b/tests/output/ob_start_basic_005.phpt
@@ -25,9 +25,10 @@ checkAndClean();
?>
--EXPECTF--
-Warning: ob_start(): non-static method C::h() should not be called statically in %s on line 20
-bool(true)
+Warning: ob_start(): non-static method C::h() cannot be called statically in %s on line %d
+
+Notice: ob_start(): failed to create buffer in %s on line %d
+bool(false)
Array
(
- [0] => C::h
)
diff --git a/tests/output/ob_start_error_001.phpt b/tests/output/ob_start_error_001.phpt
index 29288e2028..83b3a4186d 100644
--- a/tests/output/ob_start_error_001.phpt
+++ b/tests/output/ob_start_error_001.phpt
@@ -16,38 +16,14 @@ $arg_2 = 0;
$arg_3 = false;
$extra_arg = 1;
-echo "\n- Too many arguments\n";
-var_dump(ob_start($arg_1, $arg_2, $arg_3, $extra_arg));
-
-echo "\n- Arg 1 wrong type\n";
+echo "\nArg 1 wrong type\n";
var_dump(ob_start(1.5));
-echo "\n- Arg 2 wrong type\n";
-var_dump(ob_start("justPrint", "this should be an int"));
-
-echo "\n- Arg 3 wrong type\n";
-var_dump(ob_start("justPrint", 0, "this should be a bool"));
-
?>
--EXPECTF--
-- Too many arguments
-
-Warning: ob_start() expects at most 3 parameters, 4 given in %s on line 17
-NULL
-
-- Arg 1 wrong type
+Arg 1 wrong type
-Warning: ob_start(): no array or string given in %s on line 20
+Warning: ob_start(): no array or string given in %s on line 17
-Notice: ob_start(): failed to create buffer in %s on line 20
+Notice: ob_start(): failed to create buffer in %s on line 17
bool(false)
-
-- Arg 2 wrong type
-
-Warning: ob_start() expects parameter 2 to be int, string given in %s on line 23
-NULL
-
-- Arg 3 wrong type
-
-Warning: ob_start() expects parameter 3 to be int, string given in %s on line 26
-NULL
diff --git a/tests/output/stream_isatty.inc b/tests/output/stream_isatty.inc
index 4b7f39986f..9700fd98f1 100644
--- a/tests/output/stream_isatty.inc
+++ b/tests/output/stream_isatty.inc
@@ -12,7 +12,6 @@ function testToStdOut()
'STDERR (constant)' => STDERR,
'STDERR (fopen)' => fopen('php://stderr', 'wb'),
'STDERR (php://fd/2)' => fopen('php://fd/2', 'wb'),
- 'Not a stream' => 'foo',
'Invalid stream (php://temp)' => fopen('php://temp', 'wb'),
'Invalid stream (php://input)' => fopen('php://input', 'wb'),
'Invalid stream (php://memory)' => fopen('php://memory', 'wb'),
diff --git a/tests/output/stream_isatty_err.phpt b/tests/output/stream_isatty_err.phpt
index 5513781a09..55a25f1c9f 100644
--- a/tests/output/stream_isatty_err.phpt
+++ b/tests/output/stream_isatty_err.phpt
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(true)
STDERR (constant): bool(false)
STDERR (fopen): bool(false)
STDERR (php://fd/2): bool(false)
-Not a stream:
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
Invalid stream (php://temp): bool(false)
Invalid stream (php://input): bool(false)
Invalid stream (php://memory): bool(false)
diff --git a/tests/output/stream_isatty_in-err.phpt b/tests/output/stream_isatty_in-err.phpt
index de2348a5b5..2554eb4689 100644
--- a/tests/output/stream_isatty_in-err.phpt
+++ b/tests/output/stream_isatty_in-err.phpt
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(true)
STDERR (constant): bool(false)
STDERR (fopen): bool(false)
STDERR (php://fd/2): bool(false)
-Not a stream:
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
Invalid stream (php://temp): bool(false)
Invalid stream (php://input): bool(false)
Invalid stream (php://memory): bool(false)
diff --git a/tests/output/stream_isatty_in-out-err.phpt b/tests/output/stream_isatty_in-out-err.phpt
index fea7bc64d7..496bdd100e 100644
--- a/tests/output/stream_isatty_in-out-err.phpt
+++ b/tests/output/stream_isatty_in-out-err.phpt
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
STDERR (constant): bool(false)
STDERR (fopen): bool(false)
STDERR (php://fd/2): bool(false)
-Not a stream:
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
Invalid stream (php://temp): bool(false)
Invalid stream (php://input): bool(false)
Invalid stream (php://memory): bool(false)
diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt
index 6ad7a03fc3..d58e9aa05c 100644
--- a/tests/output/stream_isatty_in-out.phpt
+++ b/tests/output/stream_isatty_in-out.phpt
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
STDERR (constant): bool(true)
STDERR (fopen): bool(true)
STDERR (php://fd/2): bool(true)
-Not a stream:
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
Invalid stream (php://temp): bool(false)
Invalid stream (php://input): bool(false)
Invalid stream (php://memory): bool(false)
diff --git a/tests/output/stream_isatty_out-err.phpt b/tests/output/stream_isatty_out-err.phpt
index ae3af3a300..e3ec1237bc 100644
--- a/tests/output/stream_isatty_out-err.phpt
+++ b/tests/output/stream_isatty_out-err.phpt
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
STDERR (constant): bool(false)
STDERR (fopen): bool(false)
STDERR (php://fd/2): bool(false)
-Not a stream:
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
Invalid stream (php://temp): bool(false)
Invalid stream (php://input): bool(false)
Invalid stream (php://memory): bool(false)
diff --git a/tests/output/stream_isatty_out.phpt b/tests/output/stream_isatty_out.phpt
index dc81577446..3ea4996ac4 100644
--- a/tests/output/stream_isatty_out.phpt
+++ b/tests/output/stream_isatty_out.phpt
@@ -23,9 +23,6 @@ STDOUT (php://fd/1): bool(false)
STDERR (constant): bool(true)
STDERR (fopen): bool(true)
STDERR (php://fd/2): bool(true)
-Not a stream:
-Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
-bool(false)
Invalid stream (php://temp): bool(false)
Invalid stream (php://input): bool(false)
Invalid stream (php://memory): bool(false)
diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt
deleted file mode 100644
index a95281fc13..0000000000
--- a/tests/run-test/test005.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-Error message handling (with ZendOpcache)
---SKIPIF--
-<?php
-extension_loaded("Zend Opcache") or die("skip Zend Opcache is not loaded");
-?>
---INI--
-track_errors=1
---FILE--
-<?php
-// If this test fails ask the developers of run-test.php
-//
-// We check the general ini settings which affect error handling
-// and than verify if a message is given by a division by zero.
-// EXPECTF is used here since the error format may change but ut
-// should always contain 'Division by zero'.
-var_dump(ini_get('display_errors'));
-var_dump(ini_get('error_reporting'));
-var_dump(ini_get('log_errors'));
-var_dump(ini_get('track_errors'));
-ini_set('display_errors', 0);
-var_dump(ini_get('display_errors'));
-var_dump($php_errormsg);
-$zero = 0;
-$error = 1 / $zero;
-var_dump($php_errormsg);
-?>
---EXPECTF--
-Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
-string(1) "1"
-string(5) "32767"
-string(1) "0"
-string(1) "1"
-string(1) "0"
-NULL
-string(%d) "%sivision by zer%s"
diff --git a/tests/run-test/test008.phpt b/tests/run-test/test008.phpt
deleted file mode 100644
index c289e7a696..0000000000
--- a/tests/run-test/test008.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-Error message handling (without ZendOpcache)
---SKIPIF--
-<?php
-!extension_loaded("Zend Opcache") or die("skip Zend Opcache is loaded");
-?>
---INI--
-track_errors=1
---FILE--
-<?php
-// If this test fails ask the developers of run-test.php
-//
-// We check the general ini settings which affect error handling
-// and than verify if a message is given by a division by zero.
-// EXPECTF is used here since the error format may change but ut
-// should always contain 'Division by zero'.
-var_dump(ini_get('display_errors'));
-var_dump(ini_get('error_reporting'));
-var_dump(ini_get('log_errors'));
-var_dump(ini_get('track_errors'));
-ini_set('display_errors', "0");
-var_dump(ini_get('display_errors'));
-$error = 1 / 0;
-var_dump($php_errormsg);
-?>
---EXPECTF--
-Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
-string(1) "1"
-string(5) "32767"
-string(1) "0"
-string(1) "1"
-string(1) "0"
-string(%d) "%sivision by zer%s"
diff --git a/tests/run-test/test008a.phpt b/tests/run-test/test008a.phpt
deleted file mode 100644
index d247eb36c2..0000000000
--- a/tests/run-test/test008a.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-Error message handling (with ZendOpcache)
---SKIPIF--
-<?php
-if (!extension_loaded("Zend Opcache")) die("skip Zend Opcache is not loaded");
-?>
---INI--
-track_errors=1
---FILE--
-<?php
-// If this test fails ask the developers of run-test.php
-//
-// We check the general ini settings which affect error handling
-// and than verify if a message is given by a division by zero.
-// EXPECTF is used here since the error format may change but ut
-// should always contain 'Division by zero'.
-var_dump(ini_get('display_errors'));
-var_dump(ini_get('error_reporting'));
-var_dump(ini_get('log_errors'));
-var_dump(ini_get('track_errors'));
-ini_set('display_errors', 0);
-var_dump(ini_get('display_errors'));
-var_dump($php_errormsg);
-$zero = 0;
-$error = 1 / $zero;
-var_dump($php_errormsg);
-?>
---EXPECTF--
-Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
-string(1) "1"
-string(5) "32767"
-string(1) "0"
-string(1) "1"
-string(1) "0"
-NULL
-string(%d) "%sivision by zer%s"
diff --git a/tests/strings/001.phpt b/tests/strings/001.phpt
index bf1fb67711..6d0a9d12b9 100644
--- a/tests/strings/001.phpt
+++ b/tests/strings/001.phpt
@@ -3,8 +3,6 @@ String functions
--FILE--
<?php
-error_reporting(0);
-
echo "Testing strtok: ";
$str = "testing 1/2\\3";
@@ -26,7 +24,7 @@ if ($tok1 != "testing") {
echo "Testing strstr: ";
$test = "This is a test";
-$found1 = strstr($test, 32);
+$found1 = strstr($test, chr(32));
$found2 = strstr($test, "a ");
if ($found1 != " is a test") {
echo("failed 1\n");
@@ -39,7 +37,7 @@ if ($found1 != " is a test") {
echo "Testing strrchr: ";
$test = "fola fola blakken";
$found1 = strrchr($test, "b");
-$found2 = strrchr($test, 102);
+$found2 = strrchr($test, chr(102));
if ($found1 != "blakken") {
echo("failed 1\n");
} elseif ($found2 != "fola blakken") {
diff --git a/tests/strings/offsets_chaining_1.phpt b/tests/strings/offsets_chaining_1.phpt
index 0c3c0074b1..18b6fa2f9d 100644
--- a/tests/strings/offsets_chaining_1.phpt
+++ b/tests/strings/offsets_chaining_1.phpt
@@ -1,7 +1,5 @@
--TEST--
testing the behavior of string offset chaining
---INI--
-error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
$string = "foobar";
diff --git a/tests/strings/offsets_chaining_2.phpt b/tests/strings/offsets_chaining_2.phpt
index bbc170a6e6..7953184cd2 100644
--- a/tests/strings/offsets_chaining_2.phpt
+++ b/tests/strings/offsets_chaining_2.phpt
@@ -1,7 +1,5 @@
--TEST--
testing the behavior of string offset chaining
---INI--
-error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
$string = "foobar";
diff --git a/tests/strings/offsets_chaining_3.phpt b/tests/strings/offsets_chaining_3.phpt
index fc11b8d797..12cac5917f 100644
--- a/tests/strings/offsets_chaining_3.phpt
+++ b/tests/strings/offsets_chaining_3.phpt
@@ -1,7 +1,5 @@
--TEST--
testing the behavior of string offset chaining
---INI--
-error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
$string = "foobar";
diff --git a/tests/strings/offsets_chaining_4.phpt b/tests/strings/offsets_chaining_4.phpt
index d1f3de26af..2b38bf1337 100644
--- a/tests/strings/offsets_chaining_4.phpt
+++ b/tests/strings/offsets_chaining_4.phpt
@@ -1,7 +1,5 @@
--TEST--
testing the behavior of string offset chaining
---INI--
-error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
$string = "foobar";
diff --git a/tests/strings/offsets_chaining_5.phpt b/tests/strings/offsets_chaining_5.phpt
index efcf2f3074..1c9da47af3 100644
--- a/tests/strings/offsets_chaining_5.phpt
+++ b/tests/strings/offsets_chaining_5.phpt
@@ -1,7 +1,5 @@
--TEST--
testing the behavior of string offset chaining
---INI--
-error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
$array = array('expected_array' => "foobar");
diff --git a/tests/strings/offsets_general.phpt b/tests/strings/offsets_general.phpt
index 4ec6aa5b86..f3db53a2f3 100644
--- a/tests/strings/offsets_general.phpt
+++ b/tests/strings/offsets_general.phpt
@@ -1,7 +1,5 @@
--TEST--
testing the behavior of string offsets
---INI--
-error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
$string = "foobar";