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/025.phpt2
-rw-r--r--tests/basic/027.phpt33
-rw-r--r--tests/basic/bug71273.phpt6
-rw-r--r--tests/basic/enable_post_data_reading_01.phpt2
-rw-r--r--tests/basic/enable_post_data_reading_03.phpt2
-rw-r--r--tests/basic/enable_post_data_reading_04.phpt2
-rw-r--r--tests/classes/abstract_user_call.phpt11
-rw-r--r--tests/classes/autoload_012.phpt15
-rw-r--r--tests/classes/bug27468.phpt2
-rw-r--r--tests/classes/bug27504.phpt41
-rw-r--r--tests/classes/constants_basic_001.phpt14
-rw-r--r--tests/classes/constants_basic_002.phpt2
-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/implicit_instantiation_001.phpt156
-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/static_properties_003.phpt2
-rw-r--r--tests/classes/tostring_001.phpt13
-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/bison1.phpt4
-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/bug23584.phpt4
-rw-r--r--tests/lang/bug23922.phpt21
-rw-r--r--tests/lang/bug24499.phpt3
-rw-r--r--tests/lang/bug24926.phpt29
-rw-r--r--tests/lang/bug25547.phpt2
-rw-r--r--tests/lang/bug27439.phpt2
-rw-r--r--tests/lang/bug29893.phpt12
-rw-r--r--tests/lang/bug71897.phpt4
-rw-r--r--tests/lang/bug7515.phpt8
-rw-r--r--tests/lang/each_binary_safety.phpt14
-rw-r--r--tests/lang/engine_assignExecutionOrder_002.phpt9
-rw-r--r--tests/lang/engine_assignExecutionOrder_008.phpt28
-rw-r--r--tests/lang/foreachLoop.016.phpt26
-rw-r--r--tests/lang/foreachLoopObjects.004.phpt6
-rw-r--r--tests/lang/func_get_arg_variation.phpt9
-rw-r--r--tests/lang/passByReference_003.phpt6
-rw-r--r--tests/lang/passByReference_005.phpt203
-rw-r--r--tests/lang/passByReference_006.phpt182
-rw-r--r--tests/lang/short_tags.004.phpt4
-rw-r--r--tests/lang/type_hints_003.phpt2
-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
79 files changed, 285 insertions, 1247 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/025.phpt b/tests/basic/025.phpt
index 37561a2a2e..30d50c805d 100644
--- a/tests/basic/025.phpt
+++ b/tests/basic/025.phpt
@@ -15,7 +15,7 @@ Warning: Unknown: POST Content-Length of 2050 bytes exceeds the limit of 1024 by
Warning: Cannot modify header information - headers already sent in Unknown on line 0
-Notice: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
+Warning: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
array(0) {
}
NULL
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/basic/enable_post_data_reading_01.phpt b/tests/basic/enable_post_data_reading_01.phpt
index 19ee5d583f..d717b2b0b0 100644
--- a/tests/basic/enable_post_data_reading_01.phpt
+++ b/tests/basic/enable_post_data_reading_01.phpt
@@ -18,7 +18,7 @@ array(0) {
array(0) {
}
-Notice: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
+Warning: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
NULL
string(9) "a=1&b=ZYX"
string(9) "a=1&b=ZYX"
diff --git a/tests/basic/enable_post_data_reading_03.phpt b/tests/basic/enable_post_data_reading_03.phpt
index 6a62282ea2..5982f61c91 100644
--- a/tests/basic/enable_post_data_reading_03.phpt
+++ b/tests/basic/enable_post_data_reading_03.phpt
@@ -19,7 +19,7 @@ array(0) {
array(0) {
}
-Notice: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
+Warning: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
NULL
string(9) "a=1&b=ZYX"
string(9) "a=1&b=ZYX"
diff --git a/tests/basic/enable_post_data_reading_04.phpt b/tests/basic/enable_post_data_reading_04.phpt
index a7c7e496d8..17432e9298 100644
--- a/tests/basic/enable_post_data_reading_04.phpt
+++ b/tests/basic/enable_post_data_reading_04.phpt
@@ -19,7 +19,7 @@ array(0) {
array(0) {
}
-Notice: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
+Warning: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
NULL
string(9) "a=1&b=ZYX"
string(9) "a=1&b=ZYX"
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/bug27468.phpt b/tests/classes/bug27468.phpt
index 58a7b6cb16..1c54fa61ce 100644
--- a/tests/classes/bug27468.phpt
+++ b/tests/classes/bug27468.phpt
@@ -11,7 +11,7 @@ new foo();
echo 'OK';
?>
--EXPECTF--
-Notice: Undefined property: foo::$x in %sbug27468.php on line 4
+Warning: Undefined property: foo::$x in %s on line %d
Warning: Invalid argument supplied for foreach() in %sbug27468.php on line 4
OK
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..af9915c277 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);
@@ -58,19 +55,16 @@ Class constant declarations
echo "\nYou should not see this.";
?>
--EXPECTF--
-Notice: Undefined variable: undef in %s on line 5
+Warning: Undefined variable: undef in %s on line %d
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_basic_002.phpt b/tests/classes/constants_basic_002.phpt
index def661ec45..88c66aaee8 100644
--- a/tests/classes/constants_basic_002.phpt
+++ b/tests/classes/constants_basic_002.phpt
@@ -23,7 +23,7 @@ string(5) "hello"
Fail to read class constant from instance.
-Notice: Undefined property: aclass::$myConst in %s on line 12
+Warning: Undefined property: aclass::$myConst in %s on line %d
NULL
Class constant not visible in object var_dump.
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/implicit_instantiation_001.phpt b/tests/classes/implicit_instantiation_001.phpt
deleted file mode 100644
index 495a8a1e35..0000000000
--- a/tests/classes/implicit_instantiation_001.phpt
+++ /dev/null
@@ -1,156 +0,0 @@
---TEST--
-Implicit object instantiation when accessing properties of non-object.
---FILE--
-<?php
-class C {
- // These values get implicitly converted to objects
- public $boolFalse = false;
- public $emptyString = '';
- public $null = null;
-
- // These values do not get implicitly converted to objects
- public $boolTrue = true;
- public $nonEmptyString = 'hello';
- public $intZero = 0;
-}
-
-$c = new C;
-foreach($c as $name => $value) {
- echo "\n\n---( \$c->$name )---";
- echo "\n --> Attempting implicit conversion to object using increment...\n";
- $c->$name->prop++;
- $c->$name = $value; // reset value in case implicit conversion was successful
-
- echo "\n --> Attempting implicit conversion to object using assignment...\n";
- $c->$name->prop = "Implicit instantiation!";
- $c->$name = $value; // reset value in case implicit conversion was successful
-
- echo "\n --> Attempting implicit conversion to object using combined assignment...\n";
- $c->$name->prop .= " Implicit instantiation!";
-}
-
-echo "\n\n\n --> Resulting object:";
-var_dump($c);
-
-?>
---EXPECTF--
----( $c->boolFalse )---
- --> Attempting implicit conversion to object using increment...
-
-Warning: Creating default object from empty value in %s on line 18
-
-Notice: Undefined property: stdClass::$prop in %s on line 18
-
- --> Attempting implicit conversion to object using assignment...
-
-Warning: Creating default object from empty value in %s on line 22
-
- --> Attempting implicit conversion to object using combined assignment...
-
-Warning: Creating default object from empty value in %s on line 26
-
-Notice: Undefined property: stdClass::$prop in %s on line 26
-
-
----( $c->emptyString )---
- --> Attempting implicit conversion to object using increment...
-
-Warning: Creating default object from empty value in %s on line 18
-
-Notice: Undefined property: stdClass::$prop in %s on line 18
-
- --> Attempting implicit conversion to object using assignment...
-
-Warning: Creating default object from empty value in %s on line 22
-
- --> Attempting implicit conversion to object using combined assignment...
-
-Warning: Creating default object from empty value in %s on line 26
-
-Notice: Undefined property: stdClass::$prop in %s on line 26
-
-
----( $c->null )---
- --> Attempting implicit conversion to object using increment...
-
-Warning: Creating default object from empty value in %s on line 18
-
-Notice: Undefined property: stdClass::$prop in %s on line 18
-
- --> Attempting implicit conversion to object using assignment...
-
-Warning: Creating default object from empty value in %s on line 22
-
- --> Attempting implicit conversion to object using combined assignment...
-
-Warning: Creating default object from empty value in %s on line 26
-
-Notice: Undefined property: stdClass::$prop in %s on line 26
-
-
----( $c->boolTrue )---
- --> Attempting implicit conversion to object using increment...
-
-Warning: Attempt to %s property 'prop' of non-object in %s on line 18
-
- --> Attempting implicit conversion to object using assignment...
-
-Warning: Attempt to assign property 'prop' of non-object in %s on line 22
-
- --> Attempting implicit conversion to object using combined assignment...
-
-Warning: Attempt to assign property 'prop' of non-object in %s on line 26
-
-
----( $c->nonEmptyString )---
- --> Attempting implicit conversion to object using increment...
-
-Warning: Attempt to %s property 'prop' of non-object in %s on line 18
-
- --> Attempting implicit conversion to object using assignment...
-
-Warning: Attempt to assign property 'prop' of non-object in %s on line 22
-
- --> Attempting implicit conversion to object using combined assignment...
-
-Warning: Attempt to assign property 'prop' of non-object in %s on line 26
-
-
----( $c->intZero )---
- --> Attempting implicit conversion to object using increment...
-
-Warning: Attempt to %s property 'prop' of non-object in %s on line 18
-
- --> Attempting implicit conversion to object using assignment...
-
-Warning: Attempt to assign property 'prop' of non-object in %s on line 22
-
- --> Attempting implicit conversion to object using combined assignment...
-
-Warning: Attempt to assign property 'prop' of non-object in %s on line 26
-
-
-
- --> Resulting object:object(C)#%d (6) {
- ["boolFalse"]=>
- object(stdClass)#%d (1) {
- ["prop"]=>
- string(24) " Implicit instantiation!"
- }
- ["emptyString"]=>
- object(stdClass)#%d (1) {
- ["prop"]=>
- string(24) " Implicit instantiation!"
- }
- ["null"]=>
- object(stdClass)#%d (1) {
- ["prop"]=>
- string(24) " Implicit instantiation!"
- }
- ["boolTrue"]=>
- bool(true)
- ["nonEmptyString"]=>
- string(5) "hello"
- ["intZero"]=>
- int(0)
-}
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/static_properties_003.phpt b/tests/classes/static_properties_003.phpt
index 89c26d3dd3..64641c47c5 100644
--- a/tests/classes/static_properties_003.phpt
+++ b/tests/classes/static_properties_003.phpt
@@ -34,7 +34,7 @@ Notice: Accessing static property C::$x as non static in %s on line 11
Notice: Accessing static property C::$x as non static in %s on line 12
-Notice: Undefined property: C::$x in %s on line 12
+Warning: Undefined property: C::$x in %s on line %d
Notice: Accessing static property C::$x as non static in %s on line 13
diff --git a/tests/classes/tostring_001.phpt b/tests/classes/tostring_001.phpt
index 418aa1fc25..ba2bc3eb53 100644
--- a/tests/classes/tostring_001.phpt
+++ b/tests/classes/tostring_001.phpt
@@ -56,7 +56,11 @@ echo $o , $o;
echo "====test7====\n";
$ar = array();
$ar[$o->__toString()] = "ERROR";
-echo $ar[$o];
+try {
+ echo $ar[$o];
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
echo "====test8====\n";
var_dump(trim($o));
@@ -76,7 +80,7 @@ try {
?>
====DONE====
---EXPECTF--
+--EXPECT--
====test1====
test1 Object
(
@@ -114,8 +118,7 @@ test2::__toString()
Converted
====test7====
test2::__toString()
-
-Warning: Illegal offset type in %s on line %d
+Illegal offset type
====test8====
test2::__toString()
string(9) "Converted"
@@ -125,7 +128,7 @@ string(9) "Converted"
test2::__toString()
Converted
====test10====
-object(test3)#1 (0) {
+object(test3)#2 (0) {
}
test3::__toString()
Method test3::__toString() must return a string value
diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt
index 4134c702b6..997f2e2e7f 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/bison1.phpt b/tests/lang/bison1.phpt
index 3571576fb8..f77cce0055 100644
--- a/tests/lang/bison1.phpt
+++ b/tests/lang/bison1.phpt
@@ -2,8 +2,8 @@
Bison weirdness
--FILE--
<?php
-error_reporting(E_ALL & ~E_NOTICE);
echo "blah-$foo\n";
?>
---EXPECT--
+--EXPECTF--
+Warning: Undefined variable: foo in %s on line %d
blah-
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/bug23584.phpt b/tests/lang/bug23584.phpt
index 417cfb0856..b9dc10ac67 100644
--- a/tests/lang/bug23584.phpt
+++ b/tests/lang/bug23584.phpt
@@ -9,5 +9,5 @@ error_reporting(E_ALL);
echo $foo;
?>
---EXPECTREGEX--
-Notice: Undefined variable:.*foo in .* on line 6
+--EXPECTF--
+Warning: Undefined variable: foo in %s on line 6
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/bug24499.phpt b/tests/lang/bug24499.phpt
index 6ce56dbad7..263293391f 100644
--- a/tests/lang/bug24499.phpt
+++ b/tests/lang/bug24499.phpt
@@ -12,7 +12,8 @@ class Id {
}
$id = new Id();
-@$obj->foo = "bar";
+$obj = new stdClass;
+$obj->foo = "bar";
$id->tester($obj);
print_r($obj);
?>
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/bug27439.phpt b/tests/lang/bug27439.phpt
index 4bcadb78fd..de4bcd05a7 100644
--- a/tests/lang/bug27439.phpt
+++ b/tests/lang/bug27439.phpt
@@ -65,7 +65,7 @@ echo "===DONE===";
?>
--EXPECTF--
123
-Notice: Undefined property: test::$foobar in %s on line %d
+Warning: Undefined property: test::$foobar in %s on line %d
Warning: Invalid argument supplied for foreach() in %s on line %d
diff --git a/tests/lang/bug29893.phpt b/tests/lang/bug29893.phpt
index 25679893d2..d9af914191 100644
--- a/tests/lang/bug29893.phpt
+++ b/tests/lang/bug29893.phpt
@@ -3,9 +3,11 @@ Bug #29893 (segfault when using array as index)
--FILE--
<?php
$base = 50;
-$base[$base] -= 0;
+try {
+ $base[$base] -= 0;
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
?>
-===DONE===
---EXPECTF--
-Warning: Cannot use a scalar value as an array in %sbug29893.php on line %d
-===DONE===
+--EXPECT--
+Cannot use a scalar value as an array
diff --git a/tests/lang/bug71897.phpt b/tests/lang/bug71897.phpt
index 5864b1dece..b2c41a359f 100644
--- a/tests/lang/bug71897.phpt
+++ b/tests/lang/bug71897.phpt
@@ -10,6 +10,4 @@ eval("
?>
--EXPECTF--
-Warning: Unexpected character in input: '%s' (ASCII=127) state=0 in %s(%d) : eval()'d code on line %d
-
-Parse error: syntax error, unexpected 'b' (T_STRING) in %s(%d) : eval()'d code on line %d
+Parse error: syntax error, unexpected '%s' (T_BAD_CHARACTER) in %s on line %d
diff --git a/tests/lang/bug7515.phpt b/tests/lang/bug7515.phpt
index 5c7756c6a1..8927c5df94 100644
--- a/tests/lang/bug7515.phpt
+++ b/tests/lang/bug7515.phpt
@@ -1,14 +1,13 @@
--TEST--
Bug #7515 (weird & invisible referencing of objects)
---INI--
-error_reporting=2039
--FILE--
<?php
class obj {
function method() {}
}
-$o->root=new obj();
+$o = new stdClass;
+$o->root = new obj();
ob_start();
var_dump($o);
@@ -30,6 +29,5 @@ y=$y
";
}
?>
---EXPECTF--
-Warning: Creating default object from empty value in %s on line %d
+--EXPECT--
success
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/engine_assignExecutionOrder_002.phpt b/tests/lang/engine_assignExecutionOrder_002.phpt
index dbb0c0aba4..a8ab0beb10 100644
--- a/tests/lang/engine_assignExecutionOrder_002.phpt
+++ b/tests/lang/engine_assignExecutionOrder_002.phpt
@@ -10,7 +10,11 @@ echo "A=$a B=$b\n";
// Warning: Cannot use a scalar value as an array in %s on line %d
-$c[$c=1] = 1;
+try {
+ $c[$c=1] = 1;
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
// i++ evaluated first, so $d[0] is 10
$d = array(0,10);
@@ -90,8 +94,7 @@ print_r($ee);
?>
--EXPECTF--
A=hello B=bye
-
-Warning: Cannot use a scalar value as an array in %s on line %d
+Cannot use a scalar value as an array
array(2) {
[0]=>
int(10)
diff --git a/tests/lang/engine_assignExecutionOrder_008.phpt b/tests/lang/engine_assignExecutionOrder_008.phpt
index 310e0d9964..76b0cb1a7c 100644
--- a/tests/lang/engine_assignExecutionOrder_008.phpt
+++ b/tests/lang/engine_assignExecutionOrder_008.phpt
@@ -29,18 +29,24 @@ echo $a[$i[0][0]=f()][++$i[0][0]];
unset($i);
echo "\n" . '$i->p=f(): ';
+$i = new stdClass;
echo $a[$i->p=f()][++$i->p];
unset($i);
echo "\n" . '$i->p->q=f(): ';
+$i = new stdClass;
+$i->p = new stdClass;
echo $a[$i->p->q=f()][++$i->p->q];
unset($i);
echo "\n" . '$i->p[0]=f(): ';
+$i = new stdClass;
echo $a[$i->p[0]=f()][++$i->p[0]];
unset($i);
echo "\n" . '$i->p[0]->p=f(): ';
+$i = new stdClass;
+$i->p[0] = new stdClass;
echo $a[$i->p[0]->p=f()][++$i->p[0]->p];
unset($i);
@@ -59,28 +65,16 @@ echo "\n" . 'C::$p->q=f(): ';
C::$p = new stdclass;
echo $a[C::$p->q=f()][++C::$p->q];
?>
---EXPECTF--
+--EXPECT--
$i=f(): good
$$x=f(): good
${'i'}=f(): good
$i[0]=f(): good
$i[0][0]=f(): good
-$i->p=f():
-Warning: Creating default object from empty value in %s on line %d
-good
-$i->p->q=f():
-Warning: Creating default object from empty value in %s on line %d
-
-Warning: Creating default object from empty value in %s on line %d
-good
-$i->p[0]=f():
-Warning: Creating default object from empty value in %s on line %d
-good
-$i->p[0]->p=f():
-Warning: Creating default object from empty value in %s on line %d
-
-Warning: Creating default object from empty value in %s on line %d
-good
+$i->p=f(): good
+$i->p->q=f(): good
+$i->p[0]=f(): good
+$i->p[0]->p=f(): good
C::$p=f(): good
C::$p[0]=f(): good
C::$p->q=f(): good
diff --git a/tests/lang/foreachLoop.016.phpt b/tests/lang/foreachLoop.016.phpt
index fa1267fa8d..0fc57147d9 100644
--- a/tests/lang/foreachLoop.016.phpt
+++ b/tests/lang/foreachLoop.016.phpt
@@ -46,6 +46,7 @@ Ensure foreach splits the iterated entity from its cow reference set, for all so
unset($a, $b);
echo "\n" . '$a->b' . "\n";
+ $a = new stdClass;
$b = $a->b = array('original');
foreach($a->b as $k=>&$v) {
$v = 'changed';
@@ -54,6 +55,8 @@ Ensure foreach splits the iterated entity from its cow reference set, for all so
unset($a, $b);
echo "\n" . '$a->b->c' . "\n";
+ $a = new stdClass;
+ $a->b = new stdClass;
$b = $a->b->c = array('original');
foreach($a->b as $k=>&$v) {
$v = 'changed';
@@ -62,6 +65,7 @@ Ensure foreach splits the iterated entity from its cow reference set, for all so
unset($a, $b);
echo "\n" . '$a->b[0]' . "\n";
+ $a = new stdClass;
$b = $a->b[0] = array('original');
foreach($a->b[0] as $k=>&$v) {
$v = 'changed';
@@ -70,6 +74,7 @@ Ensure foreach splits the iterated entity from its cow reference set, for all so
unset($a, $b);
echo "\n" . '$a->b[0][0]' . "\n";
+ $a = new stdClass;
$b = $a->b[0][0] = array('original');
foreach($a->b[0][0] as $k=>&$v) {
$v = 'changed';
@@ -78,6 +83,8 @@ Ensure foreach splits the iterated entity from its cow reference set, for all so
unset($a, $b);
echo "\n" . '$a->b[0]->c' . "\n";
+ $a = new stdClass;
+ $a->b[0] = new stdClass;
$b = $a->b[0]->c = array('original');
foreach($a->b[0]->c as $k=>&$v) {
$v = 'changed';
@@ -108,6 +115,7 @@ Ensure foreach splits the iterated entity from its cow reference set, for all so
unset(C::$a[0], $b);
echo "\n" . 'C::$a[0]->b' . "\n";
+ C::$a[0] = new stdClass;
C::$a[0]->b = array('original');
$b = C::$a[0]->b;
foreach(C::$a[0]->b as $k=>&$v) {
@@ -116,7 +124,7 @@ Ensure foreach splits the iterated entity from its cow reference set, for all so
var_dump($b);
unset(C::$a[0]->b, $b);
?>
---EXPECTF--
+--EXPECT--
$a
array(1) {
[0]=>
@@ -148,44 +156,30 @@ array(1) {
}
$a->b
-
-Warning: Creating default object from empty value in %s on line %d
array(1) {
[0]=>
string(8) "original"
}
$a->b->c
-
-Warning: Creating default object from empty value in %s on line %d
-
-Warning: Creating default object from empty value in %s on line %d
array(1) {
[0]=>
string(8) "original"
}
$a->b[0]
-
-Warning: Creating default object from empty value in %s on line %d
array(1) {
[0]=>
string(8) "original"
}
$a->b[0][0]
-
-Warning: Creating default object from empty value in %s on line %d
array(1) {
[0]=>
string(8) "original"
}
$a->b[0]->c
-
-Warning: Creating default object from empty value in %s on line %d
-
-Warning: Creating default object from empty value in %s on line %d
array(1) {
[0]=>
string(8) "original"
@@ -204,8 +198,6 @@ array(1) {
}
C::$a[0]->b
-
-Warning: Creating default object from empty value in %s on line %d
array(1) {
[0]=>
string(8) "original"
diff --git a/tests/lang/foreachLoopObjects.004.phpt b/tests/lang/foreachLoopObjects.004.phpt
index 01e4e9fd9a..283e6be90c 100644
--- a/tests/lang/foreachLoopObjects.004.phpt
+++ b/tests/lang/foreachLoopObjects.004.phpt
@@ -34,13 +34,13 @@ Removing the current element from an iterated object.
string(10) "Original a"
string(10) "Original b"
-Notice: Undefined property: C::$b in %s on line %d
+Warning: Undefined property: C::$b in %s on line %d
string(10) "Original c"
-Notice: Undefined property: C::$b in %s on line %d
+Warning: Undefined property: C::$b in %s on line %d
string(10) "Original d"
-Notice: Undefined property: C::$b in %s on line %d
+Warning: Undefined property: C::$b in %s on line %d
string(10) "Original e"
object(C)#%d (4) {
["a"]=>
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_003.phpt b/tests/lang/passByReference_003.phpt
index ad9e1e39de..de9ac09d8d 100644
--- a/tests/lang/passByReference_003.phpt
+++ b/tests/lang/passByReference_003.phpt
@@ -25,16 +25,16 @@ var_dump($undef2)
--EXPECTF--
Passing undefined by value
-Notice: Undefined variable: undef1 in %s on line %d
+Warning: Undefined variable: undef1 in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
+Warning: Trying to access array offset on value of type null in %s on line %d
Inside passbyVal call:
NULL
After call
-Notice: Undefined variable: undef1 in %s on line %d
+Warning: Undefined variable: undef1 in %s on line %d
NULL
Passing undefined by reference
diff --git a/tests/lang/passByReference_005.phpt b/tests/lang/passByReference_005.phpt
index dc32962d67..82b79b684f 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
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 74
+Warning: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u1 in %s on line 77
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 77
+Warning: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 78
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 78
+Warning: Undefined variable: u2 in %s on line %d
NULL
NULL
-Notice: Undefined variable: u1 in %s on line 81
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 82
+Warning: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u2 in %s on line 85
+Warning: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 86
+Warning: 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
+Warning: 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
+Warning: 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
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 100
+Warning: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 101
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 101
+Warning: 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
+Warning: 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
+Warning: 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
+Warning: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 109
+Warning: 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
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 118
+Warning: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u1 in %s on line 121
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 123
+Warning: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u1 in %s on line 126
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 126
+Warning: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 127
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 127
+Warning: Undefined variable: u2 in %s on line %d
NULL
NULL
-Notice: Undefined variable: u1 in %s on line 130
+Warning: Undefined variable: u1 in %s on line %d
-Notice: Undefined variable: u1 in %s on line 131
+Warning: Undefined variable: u1 in %s on line %d
NULL
string(11) "Ref changed"
-Notice: Undefined variable: u2 in %s on line 134
+Warning: Undefined variable: u2 in %s on line %d
-Notice: Undefined variable: u2 in %s on line 135
+Warning: 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..ce5d5ca2af 100644
--- a/tests/lang/passByReference_006.phpt
+++ b/tests/lang/passByReference_006.phpt
@@ -3,70 +3,54 @@ Pass uninitialised objects and arrays by reference to test implicit initialisati
--FILE--
<?php
-function refs(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) {
+function refs(&$ref1, &$ref2) {
$ref1 = "Ref1 changed";
$ref2 = "Ref2 changed";
- $ref3 = "Ref3 changed";
- $ref4 = "Ref4 changed";
- $ref5 = "Ref5 changed";
}
class C {
- function __construct(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) {
+ function __construct(&$ref1, &$ref2) {
$ref1 = "Ref1 changed";
$ref2 = "Ref2 changed";
- $ref3 = "Ref3 changed";
- $ref4 = "Ref4 changed";
- $ref5 = "Ref5 changed";
}
- function refs(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) {
+ function refs(&$ref1, &$ref2) {
+ $ref1 = "Ref1 changed";
+ $ref2 = "Ref2 changed";
+ }
+
+ static function static_refs(&$ref1, &$ref2) {
$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";
-unset($u1, $u2, $u3, $u4, $u5);
-refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c);
-var_dump($u1, $u2, $u3, $u4, $u5);
+unset($u1, $u2);
+refs($u1[0], $u2[0][1]);
+var_dump($u1, $u2);
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);
-var_dump($u1, $u2, $u3, $u4, $u5);
+unset($u1, $u2);
+C::static_refs($u1[0], $u2[0][1]);
+var_dump($u1, $u2);
echo "\n\n---- Pass uninitialised arrays & objects by ref: constructor ---\n";
-unset($u1, $u2, $u3, $u4, $u5);
-$c = new C($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c);
-var_dump($u1, $u2, $u3, $u4, $u5);
+unset($u1, $u2);
+$c = new C($u1[0], $u2[0][1]);
+var_dump($u1, $u2);
echo "\n ---- Pass uninitialised arrays & objects by ref: instance 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);
-var_dump($u1, $u2, $u3, $u4, $u5);
+unset($u1, $u2);
+$c->refs($u1[0], $u2[0][1]);
+var_dump($u1, $u2);
?>
---EXPECTF--
- ---- Pass uninitialised array & object by ref: function call ---
-
-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
-
-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
-
-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
+--EXPECT--
+---- Pass uninitialised array & object by ref: function call ---
array(1) {
[0]=>
string(12) "Ref1 changed"
@@ -78,43 +62,8 @@ array(1) {
string(12) "Ref2 changed"
}
}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(12) "Ref3 changed"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- string(12) "Ref4 changed"
- }
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- object(stdClass)#%d (1) {
- ["c"]=>
- string(12) "Ref5 changed"
- }
- }
-}
---- 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
-
-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
-
-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
array(1) {
[0]=>
string(12) "Ref1 changed"
@@ -126,42 +75,9 @@ array(1) {
string(12) "Ref2 changed"
}
}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(12) "Ref3 changed"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- string(12) "Ref4 changed"
- }
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- object(stdClass)#%d (1) {
- ["c"]=>
- string(12) "Ref5 changed"
- }
- }
-}
---- Pass uninitialised arrays & objects by ref: constructor ---
-
-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
-
-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
-
-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
array(1) {
[0]=>
string(12) "Ref1 changed"
@@ -173,41 +89,8 @@ array(1) {
string(12) "Ref2 changed"
}
}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(12) "Ref3 changed"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- string(12) "Ref4 changed"
- }
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- object(stdClass)#%d (1) {
- ["c"]=>
- string(12) "Ref5 changed"
- }
- }
-}
---- Pass uninitialised arrays & objects by ref: instance method call ---
-
-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
-
-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
-
-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
array(1) {
[0]=>
string(12) "Ref1 changed"
@@ -219,24 +102,3 @@ array(1) {
string(12) "Ref2 changed"
}
}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(12) "Ref3 changed"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- string(12) "Ref4 changed"
- }
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- object(stdClass)#%d (1) {
- ["b"]=>
- object(stdClass)#%d (1) {
- ["c"]=>
- string(12) "Ref5 changed"
- }
- }
-}
diff --git a/tests/lang/short_tags.004.phpt b/tests/lang/short_tags.004.phpt
index 6df8af1c2a..9bf73b064b 100644
--- a/tests/lang/short_tags.004.phpt
+++ b/tests/lang/short_tags.004.phpt
@@ -29,6 +29,6 @@ This gets echoed twice
<? $b=3; ?>
-Notice: Undefined variable: b in %s on line %d
+Warning: Undefined variable: b in %s on line %d
-Notice: Undefined variable: b in %s on line %d
+Warning: Undefined variable: b in %s on line %d
diff --git a/tests/lang/type_hints_003.phpt b/tests/lang/type_hints_003.phpt
index f6b04dabff..00471b9448 100644
--- a/tests/lang/type_hints_003.phpt
+++ b/tests/lang/type_hints_003.phpt
@@ -8,4 +8,4 @@ class T {
}
?>
--EXPECTF--
-Fatal error: Default value for parameters with a class type can only be NULL in %stype_hints_003.php on line 3
+Fatal error: Cannot use int as default value for parameter $p of type P in %s 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 0c3c0074b1..18b6fa2f9d 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 fc11b8d797..12cac5917f 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");