Commit eaac14a17a3 for php.net
commit eaac14a17a3d64c52ef1a0778bb65828cfce4eda
Author: NickSdot <32384907+NickSdot@users.noreply.github.com>
Date: Thu Aug 6 23:31:33 2026 +0700
tests: applied fixers to improve test robustness (#22988)
diff --git a/tests/basic/GHSA-9pqp-7h25-4f32.phpt b/tests/basic/GHSA-9pqp-7h25-4f32.phpt
index 29bcb6557d5..17a145ad9d0 100644
--- a/tests/basic/GHSA-9pqp-7h25-4f32.phpt
+++ b/tests/basic/GHSA-9pqp-7h25-4f32.phpt
@@ -100,4 +100,3 @@ function test($boundaryLen) {
Hello world
array(0) {
}
-
diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt
index a3e91967dff..335cabceaf6 100644
--- a/tests/classes/abstract_user_call.phpt
+++ b/tests/classes/abstract_user_call.phpt
@@ -23,7 +23,7 @@ function func()
try {
call_user_func(array($o, 'test_base::func'));
} catch (TypeError $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
@@ -31,4 +31,4 @@ function func()
test::func()
Deprecated: Callables of the form ["test", "test_base::func"] are deprecated in %s on line %d
-call_user_func(): Argument #1 ($callback) must be a valid callback, cannot call abstract method test_base::func()
+TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, cannot call abstract method test_base::func()
diff --git a/tests/classes/array_access_013.phpt b/tests/classes/array_access_013.phpt
index 22e1cb2d3fa..6cdeed4ec8c 100644
--- a/tests/classes/array_access_013.phpt
+++ b/tests/classes/array_access_013.phpt
@@ -19,7 +19,7 @@ public function offsetUnset($offset): void { throw new Exception(__METHOD_
}
catch(Exception $e)
{
- echo "Caught in " . $e->getMessage() . "()\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
try
@@ -28,7 +28,7 @@ public function offsetUnset($offset): void { throw new Exception(__METHOD_
}
catch(Exception $e)
{
- echo "Caught in " . $e->getMessage() . "()\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
try
@@ -37,7 +37,7 @@ public function offsetUnset($offset): void { throw new Exception(__METHOD_
}
catch(Exception $e)
{
- echo "Caught in " . $e->getMessage() . "()\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
try
@@ -46,11 +46,11 @@ public function offsetUnset($offset): void { throw new Exception(__METHOD_
}
catch(Exception $e)
{
- echo "Caught in " . $e->getMessage() . "()\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
-Caught in Test::offsetExists()
-Caught in Test::offsetGet()
-Caught in Test::offsetSet()
-Caught in Test::offsetUnset()
+Exception: Test::offsetExists
+Exception: Test::offsetGet
+Exception: Test::offsetSet
+Exception: Test::offsetUnset
diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt
index 0f00ebf562f..4524a7be222 100644
--- a/tests/classes/autoload_012.phpt
+++ b/tests/classes/autoload_012.phpt
@@ -9,9 +9,9 @@
try {
call_user_func("UndefC::test");
} catch (TypeError $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
In autoload: string(6) "UndefC"
-call_user_func(): Argument #1 ($callback) must be a valid callback, class "UndefC" not found
+TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, class "UndefC" not found
diff --git a/tests/classes/autoload_013.phpt b/tests/classes/autoload_013.phpt
index 1b9302747ef..5499b9aaeb2 100644
--- a/tests/classes/autoload_013.phpt
+++ b/tests/classes/autoload_013.phpt
@@ -11,9 +11,9 @@
new ReflectionClass("UndefC");
}
catch (ReflectionException $e) {
- echo $e->getMessage();
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
In autoload: string(6) "UndefC"
-Class "UndefC" does not exist
+ReflectionException: Class "UndefC" does not exist
diff --git a/tests/classes/autoload_014.phpt b/tests/classes/autoload_014.phpt
index eaba7f05c12..517d6a69074 100644
--- a/tests/classes/autoload_014.phpt
+++ b/tests/classes/autoload_014.phpt
@@ -11,9 +11,9 @@
new ReflectionMethod("UndefC", "test");
}
catch (ReflectionException $e) {
- echo $e->getMessage();
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
In autoload: string(6) "UndefC"
-Class "UndefC" does not exist
+ReflectionException: Class "UndefC" does not exist
diff --git a/tests/classes/autoload_015.phpt b/tests/classes/autoload_015.phpt
index 9aa862a7834..9a85ee540d1 100644
--- a/tests/classes/autoload_015.phpt
+++ b/tests/classes/autoload_015.phpt
@@ -11,9 +11,9 @@
new ReflectionProperty('UndefC', 'p');
}
catch (ReflectionException $e) {
- echo $e->getMessage();
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
In autoload: string(6) "UndefC"
-Class "UndefC" does not exist
+ReflectionException: Class "UndefC" does not exist
diff --git a/tests/classes/autoload_016.phpt b/tests/classes/autoload_016.phpt
index c6e7a2b3768..857bebc7ba0 100644
--- a/tests/classes/autoload_016.phpt
+++ b/tests/classes/autoload_016.phpt
@@ -12,9 +12,9 @@
try {
$rc->getProperty("UndefC::p");
} catch (ReflectionException $e) {
- echo $e->getMessage();
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
In autoload: string(6) "UndefC"
-Class "UndefC" does not exist
+ReflectionException: Class "UndefC" does not exist
diff --git a/tests/classes/autoload_017.phpt b/tests/classes/autoload_017.phpt
index ef327ed3762..c92f0c1bf20 100644
--- a/tests/classes/autoload_017.phpt
+++ b/tests/classes/autoload_017.phpt
@@ -12,9 +12,9 @@
try {
$rc->implementsInterface("UndefI");
} catch (ReflectionException $e) {
- echo $e->getMessage();
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
In autoload: string(6) "UndefI"
-Interface "UndefI" does not exist
+ReflectionException: Interface "UndefI" does not exist
diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt
index d32a0c8b3f2..aac9eb977e6 100644
--- a/tests/classes/bug27504.phpt
+++ b/tests/classes/bug27504.phpt
@@ -16,16 +16,16 @@ private function bar ( $param ) {
try {
call_user_func_array( array( $foo , 'bar' ) , array( '2' ) );
} catch (TypeError $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
try {
$foo->bar('3');
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
Called function foo:bar(1)
-call_user_func_array(): Argument #1 ($callback) must be a valid callback, cannot access private method foo::bar()
-Call to private method foo::bar() from global scope
+TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, cannot access private method foo::bar()
+Error: Call to private method foo::bar() from global scope
diff --git a/tests/classes/constants_visibility_002.phpt b/tests/classes/constants_visibility_002.phpt
index 38fa8d614e7..cfeb5260edf 100644
--- a/tests/classes/constants_visibility_002.phpt
+++ b/tests/classes/constants_visibility_002.phpt
@@ -17,11 +17,11 @@ function constDump() {
try {
constant('A::protectedConst');
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
string(14) "protectedConst"
string(14) "protectedConst"
-Cannot access protected constant A::protectedConst
+Error: Cannot access protected constant A::protectedConst
diff --git a/tests/classes/constants_visibility_003.phpt b/tests/classes/constants_visibility_003.phpt
index 7650ca80c89..509daf900b9 100644
--- a/tests/classes/constants_visibility_003.phpt
+++ b/tests/classes/constants_visibility_003.phpt
@@ -17,11 +17,11 @@ function constDump() {
try {
constant('A::privateConst');
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
string(12) "privateConst"
string(12) "privateConst"
-Cannot access private constant A::privateConst
+Error: Cannot access private constant A::privateConst
diff --git a/tests/classes/ctor_failure.phpt b/tests/classes/ctor_failure.phpt
index 94974828923..d747ba294eb 100644
--- a/tests/classes/ctor_failure.phpt
+++ b/tests/classes/ctor_failure.phpt
@@ -22,10 +22,10 @@ function __destruct() {
}
catch (Exception $e)
{
- echo 'Caught ' . get_class($e) . '(' . $e->getMessage() . ")\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
Test::__construct(Hello)
-Caught Exception(Hello)
+Exception: Hello
diff --git a/tests/classes/destructor_and_exceptions.phpt b/tests/classes/destructor_and_exceptions.phpt
index 0f51a21a09d..b4a0923056f 100644
--- a/tests/classes/destructor_and_exceptions.phpt
+++ b/tests/classes/destructor_and_exceptions.phpt
@@ -22,7 +22,7 @@ function __destruct()
}
catch(Exception $e)
{
- echo "Caught: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
class FatalException extends Exception
@@ -42,17 +42,17 @@ function __construct($what)
}
catch(Exception $e)
{
- echo "Caught Exception: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
catch(FatalException $e)
{
- echo "Caught FatalException: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
FailClass::__destruct
-Caught: FailClass
+Exception: FailClass
FatalException::__construct
FailClass::__destruct
-Caught Exception: FailClass
+Exception: FailClass
diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt
index 6cf120e18be..a89d3bdead0 100644
--- a/tests/classes/factory_and_singleton_007.phpt
+++ b/tests/classes/factory_and_singleton_007.phpt
@@ -12,7 +12,7 @@ protected function __clone() {
$obj = new test;
$clone = clone $obj;
} catch (Throwable $e) {
- echo $e::class, ": ", $e->getMessage(), PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt
index a23af647592..e070c3be17d 100644
--- a/tests/classes/factory_and_singleton_008.phpt
+++ b/tests/classes/factory_and_singleton_008.phpt
@@ -12,7 +12,7 @@ private function __clone() {
$obj = new test;
$clone = clone $obj;
} catch (Throwable $e) {
- echo $e::class, ": ", $e->getMessage(), PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
diff --git a/tests/classes/iterators_007.phpt b/tests/classes/iterators_007.phpt
index 808fc58636d..0a606895249 100644
--- a/tests/classes/iterators_007.phpt
+++ b/tests/classes/iterators_007.phpt
@@ -27,15 +27,15 @@ public function valid(): bool { if ($this->x == 4) throw new Exception(__MET
}
catch(Exception $e)
{
- echo "Caught in " . $e->getMessage() . "()\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
$t->x++;
}
?>
--EXPECT--
-Caught in Test::rewind()
-Caught in Test::current()
-Caught in Test::key()
+Exception: Test::rewind
+Exception: Test::current
+Exception: Test::key
Current
-Caught in Test::next()
-Caught in Test::valid()
+Exception: Test::next
+Exception: Test::valid
diff --git a/tests/classes/serialize_001.phpt b/tests/classes/serialize_001.phpt
index 0e1cc18b997..23db3096c36 100644
--- a/tests/classes/serialize_001.phpt
+++ b/tests/classes/serialize_001.phpt
@@ -40,7 +40,7 @@ function unserialize($serialized)
}
catch(Exception $e)
{
- echo 'Exception: ' . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
diff --git a/tests/classes/tostring_001.phpt b/tests/classes/tostring_001.phpt
index e9ef7b41758..174ceec15d2 100644
--- a/tests/classes/tostring_001.phpt
+++ b/tests/classes/tostring_001.phpt
@@ -30,7 +30,7 @@ function __toString()
try {
var_dump((string)$o);
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
var_dump($o);
@@ -59,7 +59,7 @@ function __toString()
try {
echo $ar[$o];
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "====test8====\n";
@@ -75,7 +75,7 @@ function __toString()
try {
echo $o;
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
@@ -85,7 +85,7 @@ function __toString()
test1 Object
(
)
-Object of class test1 could not be converted to string
+Error: Object of class test1 could not be converted to string
object(test1)#1 (0) {
}
====test2====
@@ -118,7 +118,7 @@ function __toString()
Converted
====test7====
test2::__toString()
-Cannot access offset of type test2 on array
+TypeError: Cannot access offset of type test2 on array
====test8====
test2::__toString()
string(9) "Converted"
@@ -131,5 +131,5 @@ function __toString()
object(test3)#2 (0) {
}
test3::__toString()
-test3::__toString(): Return value must be of type string, array returned
+TypeError: test3::__toString(): Return value must be of type string, array returned
====DONE====
diff --git a/tests/classes/tostring_003.phpt b/tests/classes/tostring_003.phpt
index 87a5fe42e1b..e0bbcd2e635 100644
--- a/tests/classes/tostring_003.phpt
+++ b/tests/classes/tostring_003.phpt
@@ -24,11 +24,11 @@ function __destruct()
}
catch(Exception $e)
{
- var_dump($e->getMessage());
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
====DONE====
--EXPECT--
-string(5) "Damn!"
+Exception: Damn!
====DONE====
diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt
index 48ac2770ddf..bdbca528d6a 100644
--- a/tests/classes/tostring_004.phpt
+++ b/tests/classes/tostring_004.phpt
@@ -15,7 +15,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum) {
try {
printf($obj);
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
printf("\n");
@@ -23,7 +23,7 @@ function test_error_handler($err_no, $err_msg, $filename, $linenum) {
try {
printf($obj . "\n");
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "\n\nObject with bad __toString():\n";
@@ -38,7 +38,7 @@ function __toString() {
try {
printf($obj);
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
printf("\n");
@@ -46,24 +46,24 @@ function __toString() {
try {
printf($obj . "\n");
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
Object with no __toString():
Try 1:
-printf(): Argument #1 ($format) must be of type string, stdClass given
+TypeError: printf(): Argument #1 ($format) must be of type string, stdClass given
Try 2:
-Object of class stdClass could not be converted to string
+Error: Object of class stdClass could not be converted to string
Object with bad __toString():
Try 1:
-badToString::__toString(): Return value must be of type string, array returned
+TypeError: badToString::__toString(): Return value must be of type string, array returned
Try 2:
-badToString::__toString(): Return value must be of type string, array returned
+TypeError: badToString::__toString(): Return value must be of type string, array returned
diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt
index 8d2297ab93a..99c11ebbade 100644
--- a/tests/classes/type_hinting_004.phpt
+++ b/tests/classes/type_hinting_004.phpt
@@ -14,32 +14,32 @@ function f2(A $a = null) {
try {
call_user_func('f1', 1);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func('f1', new A);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func('f2', 1);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func('f2');
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func('f2', new A);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func('f2', null);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
echo "\n\n---> Type hints with callback static method:\n";
@@ -63,32 +63,32 @@ static function f2(A $a = null) {
try {
call_user_func(array('C', 'f1'), 1);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array('C', 'f1'), new A);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array('C', 'f2'), 1);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array('C', 'f2'));
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array('C', 'f2'), new A);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array('C', 'f2'), null);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
echo "\n\n---> Type hints with callback instance method:\n";
@@ -113,32 +113,32 @@ function f2(A $a = null) {
try {
call_user_func(array($d, 'f1'), 1);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array($d, 'f1'), new A);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array($d, 'f2'), 1);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array($d, 'f2'));
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array($d, 'f2'), new A);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
try {
call_user_func(array($d, 'f2'), null);
} catch (Error $ex) {
- echo "{$ex->getCode()}: {$ex->getMessage()} - {$ex->getFile()}({$ex->getLine()})\n\n";
+ echo $ex::class, ': ', $ex->getCode(), ': ', $ex->getMessage(), ' in ', $ex->getFile(), ' on line ', $ex->getLine(), "\n";
}
?>
@@ -149,33 +149,27 @@ function f2(A $a = null) {
Deprecated: D::f2(): Implicitly marking parameter $a as nullable is deprecated, the explicit nullable type must be used instead in %s on line %d
---> Type hints with callback function:
-0: f1(): Argument #1 ($a) must be of type A, int given%s(%d)
-
+TypeError: 0: f1(): Argument #1 ($a) must be of type A, int given%s in %s on line %d
in f1;
-0: f2(): Argument #1 ($a) must be of type ?A, int given%s(%d)
-
+TypeError: 0: f2(): Argument #1 ($a) must be of type ?A, int given%s in %s on line %d
in f2;
in f2;
in f2;
---> Type hints with callback static method:
-0: C::f1(): Argument #1 ($a) must be of type A, int given%s(%d)
-
+TypeError: 0: C::f1(): Argument #1 ($a) must be of type A, int given%s in %s on line %d
in C::f1 (static);
-0: C::f2(): Argument #1 ($a) must be of type ?A, int given%s(%d)
-
+TypeError: 0: C::f2(): Argument #1 ($a) must be of type ?A, int given%s in %s on line %d
in C::f2 (static);
in C::f2 (static);
in C::f2 (static);
---> Type hints with callback instance method:
-0: D::f1(): Argument #1 ($a) must be of type A, int given%s(%d)
-
+TypeError: 0: D::f1(): Argument #1 ($a) must be of type A, int given%s in %s on line %d
in C::f1 (instance);
-0: D::f2(): Argument #1 ($a) must be of type ?A, int given%s(%d)
-
+TypeError: 0: D::f2(): Argument #1 ($a) must be of type ?A, int given%s in %s on line %d
in C::f2 (instance);
in C::f2 (instance);
in C::f2 (instance);
diff --git a/tests/lang/bug28800.phpt b/tests/lang/bug28800.phpt
index 487c57d24e4..66e65e79c76 100644
--- a/tests/lang/bug28800.phpt
+++ b/tests/lang/bug28800.phpt
@@ -7,15 +7,14 @@
try {
echo ($v+0)."\n";
} catch (\TypeError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
?>
--EXPECT--
-Unsupported operand types: string + int
-Unsupported operand types: string + int
-Unsupported operand types: string + int
-Unsupported operand types: string + int
-Unsupported operand types: string + int
-Unsupported operand types: string + int
-
+TypeError: Unsupported operand types: string + int
+TypeError: Unsupported operand types: string + int
+TypeError: Unsupported operand types: string + int
+TypeError: Unsupported operand types: string + int
+TypeError: Unsupported operand types: string + int
+TypeError: Unsupported operand types: string + int
diff --git a/tests/lang/bug29893.phpt b/tests/lang/bug29893.phpt
index d9af9141914..928318770d1 100644
--- a/tests/lang/bug29893.phpt
+++ b/tests/lang/bug29893.phpt
@@ -6,8 +6,8 @@
try {
$base[$base] -= 0;
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
-Cannot use a scalar value as an array
+Error: Cannot use a scalar value as an array
diff --git a/tests/lang/bug44827.phpt b/tests/lang/bug44827.phpt
index 997a1a633f8..c8c02044502 100644
--- a/tests/lang/bug44827.phpt
+++ b/tests/lang/bug44827.phpt
@@ -9,16 +9,16 @@
try {
define('::', true);
} catch (ValueError $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
try {
constant('::');
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECTF--
-define(): Argument #1 ($constant_name) cannot be a class constant
-Class "" not found
+ValueError: define(): Argument #1 ($constant_name) cannot be a class constant
+Error: Class "" not found
diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt
index 50f06051e30..68cb2c54506 100644
--- a/tests/lang/catchable_error_002.phpt
+++ b/tests/lang/catchable_error_002.phpt
@@ -20,10 +20,10 @@ function error()
try {
blah (new StdClass);
} catch (Error $ex) {
- echo $ex->getMessage(), "\n";
+ echo $ex::class, ': ', $ex->getMessage(), "\n";
}
echo "ALIVE!\n";
?>
--EXPECTF--
-blah(): Argument #1 ($a) must be of type Foo, stdClass given, called in %scatchable_error_002.php on line %d
+TypeError: blah(): Argument #1 ($a) must be of type Foo, stdClass given, called in %scatchable_error_002.php on line %d
ALIVE!
diff --git a/tests/lang/engine_assignExecutionOrder_002.phpt b/tests/lang/engine_assignExecutionOrder_002.phpt
index a70cd5bafc8..9b0ca7ba58a 100644
--- a/tests/lang/engine_assignExecutionOrder_002.phpt
+++ b/tests/lang/engine_assignExecutionOrder_002.phpt
@@ -13,7 +13,7 @@
try {
$c[$c=1] = 1;
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
// i++ evaluated first, so $d[0] is 10
@@ -94,7 +94,7 @@ function f() {
?>
--EXPECTF--
A=hello B=bye
-Cannot use a scalar value as an array
+Error: Cannot use a scalar value as an array
array(2) {
[0]=>
int(10)
diff --git a/tests/lang/foreachLoopIteratorAggregate.002.phpt b/tests/lang/foreachLoopIteratorAggregate.002.phpt
index bb5089e74b9..27e8e7458ce 100644
--- a/tests/lang/foreachLoopIteratorAggregate.002.phpt
+++ b/tests/lang/foreachLoopIteratorAggregate.002.phpt
@@ -38,7 +38,7 @@ function f($className) {
echo "$k => $v\n";
}
} catch (Exception $e) {
- echo $e->getLine() . ": " . $e->getMessage() ."\n";
+ echo $e::class, ': ', $e->getMessage(), ' on line ', $e->getLine(), "\n";
}
}
@@ -49,7 +49,7 @@ function f($className) {
?>
--EXPECT--
-34: Objects returned by bad1::getIterator() must be traversable or implement interface Iterator
-34: Objects returned by bad2::getIterator() must be traversable or implement interface Iterator
-34: Objects returned by bad3::getIterator() must be traversable or implement interface Iterator
-34: Objects returned by bad4::getIterator() must be traversable or implement interface Iterator
+Exception: Objects returned by bad1::getIterator() must be traversable or implement interface Iterator on line 34
+Exception: Objects returned by bad2::getIterator() must be traversable or implement interface Iterator on line 34
+Exception: Objects returned by bad3::getIterator() must be traversable or implement interface Iterator on line 34
+Exception: Objects returned by bad4::getIterator() must be traversable or implement interface Iterator on line 34
diff --git a/tests/lang/func_get_arg.003.phpt b/tests/lang/func_get_arg.003.phpt
index 7021f314507..27726fa13a7 100644
--- a/tests/lang/func_get_arg.003.phpt
+++ b/tests/lang/func_get_arg.003.phpt
@@ -6,9 +6,9 @@
try {
var_dump(func_get_arg(0));
} catch (\Error $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
-func_get_arg() cannot be called from the global scope
+Error: func_get_arg() cannot be called from the global scope
diff --git a/tests/lang/func_get_arg.004.phpt b/tests/lang/func_get_arg.004.phpt
index 91e0025ee41..bd969e17fa6 100644
--- a/tests/lang/func_get_arg.004.phpt
+++ b/tests/lang/func_get_arg.004.phpt
@@ -8,11 +8,11 @@ function foo($a)
try {
var_dump(func_get_arg(2));
} catch (\Error $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
foo(2, 3);
?>
--EXPECT--
-func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
+ValueError: func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
diff --git a/tests/lang/func_get_arg_variation.phpt b/tests/lang/func_get_arg_variation.phpt
index 1c4f243fbf7..6ba2a61cf6c 100644
--- a/tests/lang/func_get_arg_variation.phpt
+++ b/tests/lang/func_get_arg_variation.phpt
@@ -9,18 +9,18 @@ function foo($a)
try {
echo func_get_arg(-1);
} catch (\Error $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
try {
echo func_get_arg(2);
} catch (\Error $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
foo(2);
?>
--EXPECT--
-func_get_arg(): Argument #1 ($position) must be greater than or equal to 0
-func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
+ValueError: func_get_arg(): Argument #1 ($position) must be greater than or equal to 0
+ValueError: func_get_arg(): Argument #1 ($position) must be less than the number of the arguments passed to the currently executed function
diff --git a/tests/lang/func_get_args.003.phpt b/tests/lang/func_get_args.003.phpt
index d56de663c5f..404f3c92f6b 100644
--- a/tests/lang/func_get_args.003.phpt
+++ b/tests/lang/func_get_args.003.phpt
@@ -6,9 +6,9 @@
try {
var_dump(func_get_args());
} catch (\Error $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
-func_get_args() cannot be called from the global scope
+Error: func_get_args() cannot be called from the global scope
diff --git a/tests/lang/func_num_args.003.phpt b/tests/lang/func_num_args.003.phpt
index 0d97109dcc5..4d89191e060 100644
--- a/tests/lang/func_num_args.003.phpt
+++ b/tests/lang/func_num_args.003.phpt
@@ -6,9 +6,9 @@
try {
func_num_args();
} catch (Error $exception) {
- echo $exception->getMessage() . "\n";
+ echo $exception::class, ': ', $exception->getMessage(), "\n";
}
?>
--EXPECT--
-func_num_args() must be called from a function context
+Error: func_num_args() must be called from a function context
diff --git a/tests/lang/operators/add_variationStr.phpt b/tests/lang/operators/add_variationStr.phpt
index 9f8f19dadbd..ebf7c875f60 100644
--- a/tests/lang/operators/add_variationStr.phpt
+++ b/tests/lang/operators/add_variationStr.phpt
@@ -16,7 +16,7 @@
try {
var_dump($strVal+$otherVal);
} catch (\TypeError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
}
@@ -34,7 +34,7 @@
--- testing: '0' + '-7.7' ---
float(-7.7)
--- testing: '0' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '0' + '123abc' ---
int(123)
--- testing: '0' + '123e5' ---
@@ -50,7 +50,7 @@
--- testing: '0' + '3.4a' ---
float(3.4)
--- testing: '0' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '65' + '0' ---
int(65)
--- testing: '65' + '65' ---
@@ -62,7 +62,7 @@
--- testing: '65' + '-7.7' ---
float(57.3)
--- testing: '65' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '65' + '123abc' ---
int(188)
--- testing: '65' + '123e5' ---
@@ -78,7 +78,7 @@
--- testing: '65' + '3.4a' ---
float(68.4)
--- testing: '65' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '-44' + '0' ---
int(-44)
--- testing: '-44' + '65' ---
@@ -90,7 +90,7 @@
--- testing: '-44' + '-7.7' ---
float(-51.7)
--- testing: '-44' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '-44' + '123abc' ---
int(79)
--- testing: '-44' + '123e5' ---
@@ -106,7 +106,7 @@
--- testing: '-44' + '3.4a' ---
float(-40.6)
--- testing: '-44' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '1.2' + '0' ---
float(1.2)
--- testing: '1.2' + '65' ---
@@ -118,7 +118,7 @@
--- testing: '1.2' + '-7.7' ---
float(-6.5)
--- testing: '1.2' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '1.2' + '123abc' ---
float(124.2)
--- testing: '1.2' + '123e5' ---
@@ -134,7 +134,7 @@
--- testing: '1.2' + '3.4a' ---
float(4.6)
--- testing: '1.2' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '-7.7' + '0' ---
float(-7.7)
--- testing: '-7.7' + '65' ---
@@ -146,7 +146,7 @@
--- testing: '-7.7' + '-7.7' ---
float(-15.4)
--- testing: '-7.7' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '-7.7' + '123abc' ---
float(115.3)
--- testing: '-7.7' + '123e5' ---
@@ -162,35 +162,35 @@
--- testing: '-7.7' + '3.4a' ---
float(-4.300000000000001)
--- testing: '-7.7' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '0' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '65' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '-44' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '1.2' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '-7.7' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '123abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '123e5' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '123e5xyz' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + ' 123abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '123 abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '123abc ' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + '3.4a' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'abc' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123abc' + '0' ---
int(123)
--- testing: '123abc' + '65' ---
@@ -202,7 +202,7 @@
--- testing: '123abc' + '-7.7' ---
float(115.3)
--- testing: '123abc' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123abc' + '123abc' ---
int(246)
--- testing: '123abc' + '123e5' ---
@@ -218,7 +218,7 @@
--- testing: '123abc' + '3.4a' ---
float(126.4)
--- testing: '123abc' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123e5' + '0' ---
float(12300000)
--- testing: '123e5' + '65' ---
@@ -230,7 +230,7 @@
--- testing: '123e5' + '-7.7' ---
float(12299992.3)
--- testing: '123e5' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123e5' + '123abc' ---
float(12300123)
--- testing: '123e5' + '123e5' ---
@@ -246,7 +246,7 @@
--- testing: '123e5' + '3.4a' ---
float(12300003.4)
--- testing: '123e5' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123e5xyz' + '0' ---
float(12300000)
--- testing: '123e5xyz' + '65' ---
@@ -258,7 +258,7 @@
--- testing: '123e5xyz' + '-7.7' ---
float(12299992.3)
--- testing: '123e5xyz' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123e5xyz' + '123abc' ---
float(12300123)
--- testing: '123e5xyz' + '123e5' ---
@@ -274,7 +274,7 @@
--- testing: '123e5xyz' + '3.4a' ---
float(12300003.4)
--- testing: '123e5xyz' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: ' 123abc' + '0' ---
int(123)
--- testing: ' 123abc' + '65' ---
@@ -286,7 +286,7 @@
--- testing: ' 123abc' + '-7.7' ---
float(115.3)
--- testing: ' 123abc' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: ' 123abc' + '123abc' ---
int(246)
--- testing: ' 123abc' + '123e5' ---
@@ -302,7 +302,7 @@
--- testing: ' 123abc' + '3.4a' ---
float(126.4)
--- testing: ' 123abc' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123 abc' + '0' ---
int(123)
--- testing: '123 abc' + '65' ---
@@ -314,7 +314,7 @@
--- testing: '123 abc' + '-7.7' ---
float(115.3)
--- testing: '123 abc' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123 abc' + '123abc' ---
int(246)
--- testing: '123 abc' + '123e5' ---
@@ -330,7 +330,7 @@
--- testing: '123 abc' + '3.4a' ---
float(126.4)
--- testing: '123 abc' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123abc ' + '0' ---
int(123)
--- testing: '123abc ' + '65' ---
@@ -342,7 +342,7 @@
--- testing: '123abc ' + '-7.7' ---
float(115.3)
--- testing: '123abc ' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '123abc ' + '123abc' ---
int(246)
--- testing: '123abc ' + '123e5' ---
@@ -358,7 +358,7 @@
--- testing: '123abc ' + '3.4a' ---
float(126.4)
--- testing: '123abc ' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '3.4a' + '0' ---
float(3.4)
--- testing: '3.4a' + '65' ---
@@ -370,7 +370,7 @@
--- testing: '3.4a' + '-7.7' ---
float(-4.300000000000001)
--- testing: '3.4a' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: '3.4a' + '123abc' ---
float(126.4)
--- testing: '3.4a' + '123e5' ---
@@ -386,32 +386,32 @@
--- testing: '3.4a' + '3.4a' ---
float(6.8)
--- testing: '3.4a' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '0' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '65' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '-44' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '1.2' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '-7.7' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + 'abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '123abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '123e5' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '123e5xyz' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + ' 123abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '123 abc' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '123abc ' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + '3.4a' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
--- testing: 'a5.9' + 'a5.9' ---
-Unsupported operand types: string + string
+TypeError: Unsupported operand types: string + string
diff --git a/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt
index 250813fca35..7563ae66eac 100644
--- a/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt
@@ -28,7 +28,7 @@
try {
var_dump($longVal<<$otherVal);
} catch (ArithmeticError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
@@ -39,7 +39,7 @@
try {
var_dump($otherVal<<$longVal);
} catch (ArithmeticError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
@@ -51,7 +51,7 @@
--- testing: 9223372036854775807 << 1 ---
int(-2)
--- testing: 9223372036854775807 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << 7 ---
int(-128)
--- testing: 9223372036854775807 << 9 ---
@@ -59,7 +59,7 @@
--- testing: 9223372036854775807 << 65 ---
int(0)
--- testing: 9223372036854775807 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << 2147483647 ---
int(0)
--- testing: 9223372036854775807 << 9223372036854775807 ---
@@ -69,7 +69,7 @@
--- testing: -9223372036854775808 << 1 ---
int(0)
--- testing: -9223372036854775808 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775808 << 7 ---
int(0)
--- testing: -9223372036854775808 << 9 ---
@@ -77,7 +77,7 @@
--- testing: -9223372036854775808 << 65 ---
int(0)
--- testing: -9223372036854775808 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775808 << 2147483647 ---
int(0)
--- testing: -9223372036854775808 << 9223372036854775807 ---
@@ -87,7 +87,7 @@
--- testing: 2147483647 << 1 ---
int(4294967294)
--- testing: 2147483647 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << 7 ---
int(274877906816)
--- testing: 2147483647 << 9 ---
@@ -95,7 +95,7 @@
--- testing: 2147483647 << 65 ---
int(0)
--- testing: 2147483647 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << 2147483647 ---
int(0)
--- testing: 2147483647 << 9223372036854775807 ---
@@ -105,7 +105,7 @@
--- testing: -2147483648 << 1 ---
int(-4294967296)
--- testing: -2147483648 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483648 << 7 ---
int(-274877906944)
--- testing: -2147483648 << 9 ---
@@ -113,7 +113,7 @@
--- testing: -2147483648 << 65 ---
int(0)
--- testing: -2147483648 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483648 << 2147483647 ---
int(0)
--- testing: -2147483648 << 9223372036854775807 ---
@@ -123,7 +123,7 @@
--- testing: 9223372034707292160 << 1 ---
int(-4294967296)
--- testing: 9223372034707292160 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372034707292160 << 7 ---
int(-274877906944)
--- testing: 9223372034707292160 << 9 ---
@@ -131,7 +131,7 @@
--- testing: 9223372034707292160 << 65 ---
int(0)
--- testing: 9223372034707292160 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372034707292160 << 2147483647 ---
int(0)
--- testing: 9223372034707292160 << 9223372036854775807 ---
@@ -141,7 +141,7 @@
--- testing: -9223372034707292160 << 1 ---
int(4294967296)
--- testing: -9223372034707292160 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372034707292160 << 7 ---
int(274877906944)
--- testing: -9223372034707292160 << 9 ---
@@ -149,7 +149,7 @@
--- testing: -9223372034707292160 << 65 ---
int(0)
--- testing: -9223372034707292160 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372034707292160 << 2147483647 ---
int(0)
--- testing: -9223372034707292160 << 9223372036854775807 ---
@@ -159,7 +159,7 @@
--- testing: 2147483648 << 1 ---
int(4294967296)
--- testing: 2147483648 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483648 << 7 ---
int(274877906944)
--- testing: 2147483648 << 9 ---
@@ -167,7 +167,7 @@
--- testing: 2147483648 << 65 ---
int(0)
--- testing: 2147483648 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483648 << 2147483647 ---
int(0)
--- testing: 2147483648 << 9223372036854775807 ---
@@ -177,7 +177,7 @@
--- testing: -2147483649 << 1 ---
int(-4294967298)
--- testing: -2147483649 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483649 << 7 ---
int(-274877907072)
--- testing: -2147483649 << 9 ---
@@ -185,7 +185,7 @@
--- testing: -2147483649 << 65 ---
int(0)
--- testing: -2147483649 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483649 << 2147483647 ---
int(0)
--- testing: -2147483649 << 9223372036854775807 ---
@@ -195,7 +195,7 @@
--- testing: 4294967294 << 1 ---
int(8589934588)
--- testing: 4294967294 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967294 << 7 ---
int(549755813632)
--- testing: 4294967294 << 9 ---
@@ -203,7 +203,7 @@
--- testing: 4294967294 << 65 ---
int(0)
--- testing: 4294967294 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967294 << 2147483647 ---
int(0)
--- testing: 4294967294 << 9223372036854775807 ---
@@ -213,7 +213,7 @@
--- testing: 4294967295 << 1 ---
int(8589934590)
--- testing: 4294967295 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967295 << 7 ---
int(549755813760)
--- testing: 4294967295 << 9 ---
@@ -221,7 +221,7 @@
--- testing: 4294967295 << 65 ---
int(0)
--- testing: 4294967295 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967295 << 2147483647 ---
int(0)
--- testing: 4294967295 << 9223372036854775807 ---
@@ -231,7 +231,7 @@
--- testing: 4294967293 << 1 ---
int(8589934586)
--- testing: 4294967293 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967293 << 7 ---
int(549755813504)
--- testing: 4294967293 << 9 ---
@@ -239,7 +239,7 @@
--- testing: 4294967293 << 65 ---
int(0)
--- testing: 4294967293 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967293 << 2147483647 ---
int(0)
--- testing: 4294967293 << 9223372036854775807 ---
@@ -249,7 +249,7 @@
--- testing: 9223372036854775806 << 1 ---
int(-4)
--- testing: 9223372036854775806 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775806 << 7 ---
int(-256)
--- testing: 9223372036854775806 << 9 ---
@@ -257,7 +257,7 @@
--- testing: 9223372036854775806 << 65 ---
int(0)
--- testing: 9223372036854775806 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775806 << 2147483647 ---
int(0)
--- testing: 9223372036854775806 << 9223372036854775807 ---
@@ -267,7 +267,7 @@
--- testing: 9.2233720368548E+18 << 1 ---
int(0)
--- testing: 9.2233720368548E+18 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9.2233720368548E+18 << 7 ---
int(0)
--- testing: 9.2233720368548E+18 << 9 ---
@@ -275,7 +275,7 @@
--- testing: 9.2233720368548E+18 << 65 ---
int(0)
--- testing: 9.2233720368548E+18 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9.2233720368548E+18 << 2147483647 ---
int(0)
--- testing: 9.2233720368548E+18 << 9223372036854775807 ---
@@ -285,7 +285,7 @@
--- testing: -9223372036854775807 << 1 ---
int(2)
--- testing: -9223372036854775807 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775807 << 7 ---
int(128)
--- testing: -9223372036854775807 << 9 ---
@@ -293,7 +293,7 @@
--- testing: -9223372036854775807 << 65 ---
int(0)
--- testing: -9223372036854775807 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775807 << 2147483647 ---
int(0)
--- testing: -9223372036854775807 << 9223372036854775807 ---
@@ -303,7 +303,7 @@
--- testing: -9.2233720368548E+18 << 1 ---
int(0)
--- testing: -9.2233720368548E+18 << -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9.2233720368548E+18 << 7 ---
int(0)
--- testing: -9.2233720368548E+18 << 9 ---
@@ -311,7 +311,7 @@
--- testing: -9.2233720368548E+18 << 65 ---
int(0)
--- testing: -9.2233720368548E+18 << -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9.2233720368548E+18 << 2147483647 ---
int(0)
--- testing: -9.2233720368548E+18 << 9223372036854775807 ---
@@ -319,19 +319,19 @@
--- testing: 0 << 9223372036854775807 ---
int(0)
--- testing: 0 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 << 2147483647 ---
int(0)
--- testing: 0 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 << 9223372034707292160 ---
int(0)
--- testing: 0 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 << 2147483648 ---
int(0)
--- testing: 0 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 << 4294967294 ---
int(0)
--- testing: 0 << 4294967295 ---
@@ -341,27 +341,27 @@
--- testing: 0 << 9223372036854775806 ---
int(0)
--- testing: 0 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 << 9223372036854775807 ---
int(0)
--- testing: 1 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 << 2147483647 ---
int(0)
--- testing: 1 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 << 9223372034707292160 ---
int(0)
--- testing: 1 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 << 2147483648 ---
int(0)
--- testing: 1 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 << 4294967294 ---
int(0)
--- testing: 1 << 4294967295 ---
@@ -371,27 +371,27 @@
--- testing: 1 << 9223372036854775806 ---
int(0)
--- testing: 1 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 << 9223372036854775807 ---
int(0)
--- testing: -1 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 << 2147483647 ---
int(0)
--- testing: -1 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 << 9223372034707292160 ---
int(0)
--- testing: -1 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 << 2147483648 ---
int(0)
--- testing: -1 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 << 4294967294 ---
int(0)
--- testing: -1 << 4294967295 ---
@@ -401,27 +401,27 @@
--- testing: -1 << 9223372036854775806 ---
int(0)
--- testing: -1 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 << 9223372036854775807 ---
int(0)
--- testing: 7 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 << 2147483647 ---
int(0)
--- testing: 7 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 << 9223372034707292160 ---
int(0)
--- testing: 7 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 << 2147483648 ---
int(0)
--- testing: 7 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 << 4294967294 ---
int(0)
--- testing: 7 << 4294967295 ---
@@ -431,27 +431,27 @@
--- testing: 7 << 9223372036854775806 ---
int(0)
--- testing: 7 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 << 9223372036854775807 ---
int(0)
--- testing: 9 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 << 2147483647 ---
int(0)
--- testing: 9 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 << 9223372034707292160 ---
int(0)
--- testing: 9 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 << 2147483648 ---
int(0)
--- testing: 9 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 << 4294967294 ---
int(0)
--- testing: 9 << 4294967295 ---
@@ -461,27 +461,27 @@
--- testing: 9 << 9223372036854775806 ---
int(0)
--- testing: 9 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 << 9223372036854775807 ---
int(0)
--- testing: 65 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 << 2147483647 ---
int(0)
--- testing: 65 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 << 9223372034707292160 ---
int(0)
--- testing: 65 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 << 2147483648 ---
int(0)
--- testing: 65 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 << 4294967294 ---
int(0)
--- testing: 65 << 4294967295 ---
@@ -491,27 +491,27 @@
--- testing: 65 << 9223372036854775806 ---
int(0)
--- testing: 65 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 << 9223372036854775807 ---
int(0)
--- testing: -44 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 << 2147483647 ---
int(0)
--- testing: -44 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 << 9223372034707292160 ---
int(0)
--- testing: -44 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 << 2147483648 ---
int(0)
--- testing: -44 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 << 4294967294 ---
int(0)
--- testing: -44 << 4294967295 ---
@@ -521,27 +521,27 @@
--- testing: -44 << 9223372036854775806 ---
int(0)
--- testing: -44 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << 9223372036854775807 ---
int(0)
--- testing: 2147483647 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << 2147483647 ---
int(0)
--- testing: 2147483647 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << 9223372034707292160 ---
int(0)
--- testing: 2147483647 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << 2147483648 ---
int(0)
--- testing: 2147483647 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << 4294967294 ---
int(0)
--- testing: 2147483647 << 4294967295 ---
@@ -551,27 +551,27 @@
--- testing: 2147483647 << 9223372036854775806 ---
int(0)
--- testing: 2147483647 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << 9223372036854775807 ---
int(0)
--- testing: 9223372036854775807 << -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << 2147483647 ---
int(0)
--- testing: 9223372036854775807 << -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << 9223372034707292160 ---
int(0)
--- testing: 9223372036854775807 << -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << 2147483648 ---
int(0)
--- testing: 9223372036854775807 << -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << 4294967294 ---
int(0)
--- testing: 9223372036854775807 << 4294967295 ---
@@ -581,8 +581,8 @@
--- testing: 9223372036854775807 << 9223372036854775806 ---
int(0)
--- testing: 9223372036854775807 << 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 << -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
index cf227ddf8f8..34d7f8519d2 100644
--- a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
@@ -16,7 +16,7 @@
try {
var_dump($strVal<<$otherVal);
} catch (Throwable $e) {
- echo get_class($e) . ': ' . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
index c3e7af98928..5576da911de 100644
--- a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
@@ -20,7 +20,7 @@
try {
var_dump($strVal<<$otherVal);
} catch (\Throwable $e) {
- echo get_class($e) . ': ' . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
diff --git a/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt b/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt
index 75be6afae23..dfe56b4db38 100644
--- a/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt
@@ -28,7 +28,7 @@
try {
var_dump($longVal>>$otherVal);
} catch (ArithmeticError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
@@ -39,7 +39,7 @@
try {
var_dump($otherVal>>$longVal);
} catch (ArithmeticError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
@@ -51,7 +51,7 @@
--- testing: 9223372036854775807 >> 1 ---
int(4611686018427387903)
--- testing: 9223372036854775807 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> 7 ---
int(72057594037927935)
--- testing: 9223372036854775807 >> 9 ---
@@ -59,7 +59,7 @@
--- testing: 9223372036854775807 >> 65 ---
int(0)
--- testing: 9223372036854775807 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> 2147483647 ---
int(0)
--- testing: 9223372036854775807 >> 9223372036854775807 ---
@@ -69,7 +69,7 @@
--- testing: -9223372036854775808 >> 1 ---
int(-4611686018427387904)
--- testing: -9223372036854775808 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775808 >> 7 ---
int(-72057594037927936)
--- testing: -9223372036854775808 >> 9 ---
@@ -77,7 +77,7 @@
--- testing: -9223372036854775808 >> 65 ---
int(-1)
--- testing: -9223372036854775808 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775808 >> 2147483647 ---
int(-1)
--- testing: -9223372036854775808 >> 9223372036854775807 ---
@@ -87,7 +87,7 @@
--- testing: 2147483647 >> 1 ---
int(1073741823)
--- testing: 2147483647 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> 7 ---
int(16777215)
--- testing: 2147483647 >> 9 ---
@@ -95,7 +95,7 @@
--- testing: 2147483647 >> 65 ---
int(0)
--- testing: 2147483647 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> 2147483647 ---
int(0)
--- testing: 2147483647 >> 9223372036854775807 ---
@@ -105,7 +105,7 @@
--- testing: -2147483648 >> 1 ---
int(-1073741824)
--- testing: -2147483648 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483648 >> 7 ---
int(-16777216)
--- testing: -2147483648 >> 9 ---
@@ -113,7 +113,7 @@
--- testing: -2147483648 >> 65 ---
int(-1)
--- testing: -2147483648 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483648 >> 2147483647 ---
int(-1)
--- testing: -2147483648 >> 9223372036854775807 ---
@@ -123,7 +123,7 @@
--- testing: 9223372034707292160 >> 1 ---
int(4611686017353646080)
--- testing: 9223372034707292160 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372034707292160 >> 7 ---
int(72057594021150720)
--- testing: 9223372034707292160 >> 9 ---
@@ -131,7 +131,7 @@
--- testing: 9223372034707292160 >> 65 ---
int(0)
--- testing: 9223372034707292160 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372034707292160 >> 2147483647 ---
int(0)
--- testing: 9223372034707292160 >> 9223372036854775807 ---
@@ -141,7 +141,7 @@
--- testing: -9223372034707292160 >> 1 ---
int(-4611686017353646080)
--- testing: -9223372034707292160 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372034707292160 >> 7 ---
int(-72057594021150720)
--- testing: -9223372034707292160 >> 9 ---
@@ -149,7 +149,7 @@
--- testing: -9223372034707292160 >> 65 ---
int(-1)
--- testing: -9223372034707292160 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372034707292160 >> 2147483647 ---
int(-1)
--- testing: -9223372034707292160 >> 9223372036854775807 ---
@@ -159,7 +159,7 @@
--- testing: 2147483648 >> 1 ---
int(1073741824)
--- testing: 2147483648 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483648 >> 7 ---
int(16777216)
--- testing: 2147483648 >> 9 ---
@@ -167,7 +167,7 @@
--- testing: 2147483648 >> 65 ---
int(0)
--- testing: 2147483648 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483648 >> 2147483647 ---
int(0)
--- testing: 2147483648 >> 9223372036854775807 ---
@@ -177,7 +177,7 @@
--- testing: -2147483649 >> 1 ---
int(-1073741825)
--- testing: -2147483649 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483649 >> 7 ---
int(-16777217)
--- testing: -2147483649 >> 9 ---
@@ -185,7 +185,7 @@
--- testing: -2147483649 >> 65 ---
int(-1)
--- testing: -2147483649 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -2147483649 >> 2147483647 ---
int(-1)
--- testing: -2147483649 >> 9223372036854775807 ---
@@ -195,7 +195,7 @@
--- testing: 4294967294 >> 1 ---
int(2147483647)
--- testing: 4294967294 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967294 >> 7 ---
int(33554431)
--- testing: 4294967294 >> 9 ---
@@ -203,7 +203,7 @@
--- testing: 4294967294 >> 65 ---
int(0)
--- testing: 4294967294 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967294 >> 2147483647 ---
int(0)
--- testing: 4294967294 >> 9223372036854775807 ---
@@ -213,7 +213,7 @@
--- testing: 4294967295 >> 1 ---
int(2147483647)
--- testing: 4294967295 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967295 >> 7 ---
int(33554431)
--- testing: 4294967295 >> 9 ---
@@ -221,7 +221,7 @@
--- testing: 4294967295 >> 65 ---
int(0)
--- testing: 4294967295 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967295 >> 2147483647 ---
int(0)
--- testing: 4294967295 >> 9223372036854775807 ---
@@ -231,7 +231,7 @@
--- testing: 4294967293 >> 1 ---
int(2147483646)
--- testing: 4294967293 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967293 >> 7 ---
int(33554431)
--- testing: 4294967293 >> 9 ---
@@ -239,7 +239,7 @@
--- testing: 4294967293 >> 65 ---
int(0)
--- testing: 4294967293 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 4294967293 >> 2147483647 ---
int(0)
--- testing: 4294967293 >> 9223372036854775807 ---
@@ -249,7 +249,7 @@
--- testing: 9223372036854775806 >> 1 ---
int(4611686018427387903)
--- testing: 9223372036854775806 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775806 >> 7 ---
int(72057594037927935)
--- testing: 9223372036854775806 >> 9 ---
@@ -257,7 +257,7 @@
--- testing: 9223372036854775806 >> 65 ---
int(0)
--- testing: 9223372036854775806 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775806 >> 2147483647 ---
int(0)
--- testing: 9223372036854775806 >> 9223372036854775807 ---
@@ -267,7 +267,7 @@
--- testing: 9.2233720368548E+18 >> 1 ---
int(-4611686018427387904)
--- testing: 9.2233720368548E+18 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9.2233720368548E+18 >> 7 ---
int(-72057594037927936)
--- testing: 9.2233720368548E+18 >> 9 ---
@@ -275,7 +275,7 @@
--- testing: 9.2233720368548E+18 >> 65 ---
int(-1)
--- testing: 9.2233720368548E+18 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9.2233720368548E+18 >> 2147483647 ---
int(-1)
--- testing: 9.2233720368548E+18 >> 9223372036854775807 ---
@@ -285,7 +285,7 @@
--- testing: -9223372036854775807 >> 1 ---
int(-4611686018427387904)
--- testing: -9223372036854775807 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775807 >> 7 ---
int(-72057594037927936)
--- testing: -9223372036854775807 >> 9 ---
@@ -293,7 +293,7 @@
--- testing: -9223372036854775807 >> 65 ---
int(-1)
--- testing: -9223372036854775807 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9223372036854775807 >> 2147483647 ---
int(-1)
--- testing: -9223372036854775807 >> 9223372036854775807 ---
@@ -303,7 +303,7 @@
--- testing: -9.2233720368548E+18 >> 1 ---
int(-4611686018427387904)
--- testing: -9.2233720368548E+18 >> -1 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9.2233720368548E+18 >> 7 ---
int(-72057594037927936)
--- testing: -9.2233720368548E+18 >> 9 ---
@@ -311,7 +311,7 @@
--- testing: -9.2233720368548E+18 >> 65 ---
int(-1)
--- testing: -9.2233720368548E+18 >> -44 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -9.2233720368548E+18 >> 2147483647 ---
int(-1)
--- testing: -9.2233720368548E+18 >> 9223372036854775807 ---
@@ -319,19 +319,19 @@
--- testing: 0 >> 9223372036854775807 ---
int(0)
--- testing: 0 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 >> 2147483647 ---
int(0)
--- testing: 0 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 >> 9223372034707292160 ---
int(0)
--- testing: 0 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 >> 2147483648 ---
int(0)
--- testing: 0 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 >> 4294967294 ---
int(0)
--- testing: 0 >> 4294967295 ---
@@ -341,27 +341,27 @@
--- testing: 0 >> 9223372036854775806 ---
int(0)
--- testing: 0 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 0 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 >> 9223372036854775807 ---
int(0)
--- testing: 1 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 >> 2147483647 ---
int(0)
--- testing: 1 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 >> 9223372034707292160 ---
int(0)
--- testing: 1 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 >> 2147483648 ---
int(0)
--- testing: 1 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 >> 4294967294 ---
int(0)
--- testing: 1 >> 4294967295 ---
@@ -371,27 +371,27 @@
--- testing: 1 >> 9223372036854775806 ---
int(0)
--- testing: 1 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 1 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 >> 9223372036854775807 ---
int(-1)
--- testing: -1 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 >> 2147483647 ---
int(-1)
--- testing: -1 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 >> 9223372034707292160 ---
int(-1)
--- testing: -1 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 >> 2147483648 ---
int(-1)
--- testing: -1 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 >> 4294967294 ---
int(-1)
--- testing: -1 >> 4294967295 ---
@@ -401,27 +401,27 @@
--- testing: -1 >> 9223372036854775806 ---
int(-1)
--- testing: -1 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -1 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 >> 9223372036854775807 ---
int(0)
--- testing: 7 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 >> 2147483647 ---
int(0)
--- testing: 7 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 >> 9223372034707292160 ---
int(0)
--- testing: 7 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 >> 2147483648 ---
int(0)
--- testing: 7 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 >> 4294967294 ---
int(0)
--- testing: 7 >> 4294967295 ---
@@ -431,27 +431,27 @@
--- testing: 7 >> 9223372036854775806 ---
int(0)
--- testing: 7 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 7 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 >> 9223372036854775807 ---
int(0)
--- testing: 9 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 >> 2147483647 ---
int(0)
--- testing: 9 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 >> 9223372034707292160 ---
int(0)
--- testing: 9 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 >> 2147483648 ---
int(0)
--- testing: 9 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 >> 4294967294 ---
int(0)
--- testing: 9 >> 4294967295 ---
@@ -461,27 +461,27 @@
--- testing: 9 >> 9223372036854775806 ---
int(0)
--- testing: 9 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 >> 9223372036854775807 ---
int(0)
--- testing: 65 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 >> 2147483647 ---
int(0)
--- testing: 65 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 >> 9223372034707292160 ---
int(0)
--- testing: 65 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 >> 2147483648 ---
int(0)
--- testing: 65 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 >> 4294967294 ---
int(0)
--- testing: 65 >> 4294967295 ---
@@ -491,27 +491,27 @@
--- testing: 65 >> 9223372036854775806 ---
int(0)
--- testing: 65 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 65 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 >> 9223372036854775807 ---
int(-1)
--- testing: -44 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 >> 2147483647 ---
int(-1)
--- testing: -44 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 >> 9223372034707292160 ---
int(-1)
--- testing: -44 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 >> 2147483648 ---
int(-1)
--- testing: -44 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 >> 4294967294 ---
int(-1)
--- testing: -44 >> 4294967295 ---
@@ -521,27 +521,27 @@
--- testing: -44 >> 9223372036854775806 ---
int(-1)
--- testing: -44 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: -44 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> 9223372036854775807 ---
int(0)
--- testing: 2147483647 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> 2147483647 ---
int(0)
--- testing: 2147483647 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> 9223372034707292160 ---
int(0)
--- testing: 2147483647 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> 2147483648 ---
int(0)
--- testing: 2147483647 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> 4294967294 ---
int(0)
--- testing: 2147483647 >> 4294967295 ---
@@ -551,27 +551,27 @@
--- testing: 2147483647 >> 9223372036854775806 ---
int(0)
--- testing: 2147483647 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 2147483647 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> 9223372036854775807 ---
int(0)
--- testing: 9223372036854775807 >> -9223372036854775808 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> 2147483647 ---
int(0)
--- testing: 9223372036854775807 >> -2147483648 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> 9223372034707292160 ---
int(0)
--- testing: 9223372036854775807 >> -9223372034707292160 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> 2147483648 ---
int(0)
--- testing: 9223372036854775807 >> -2147483649 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> 4294967294 ---
int(0)
--- testing: 9223372036854775807 >> 4294967295 ---
@@ -581,8 +581,8 @@
--- testing: 9223372036854775807 >> 9223372036854775806 ---
int(0)
--- testing: 9223372036854775807 >> 9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> -9223372036854775807 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
--- testing: 9223372036854775807 >> -9.2233720368548E+18 ---
-Exception: Bit shift by negative number
+ArithmeticError: Bit shift by negative number
diff --git a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
index d1f124933c8..4ad78f247f1 100644
--- a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
+++ b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
@@ -16,7 +16,7 @@
try {
var_dump($strVal>>$otherVal);
} catch (\Throwable $e) {
- echo get_class($e) . ': ' . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
diff --git a/tests/lang/operators/divide_basiclong_64bit.phpt b/tests/lang/operators/divide_basiclong_64bit.phpt
index 65ab5b69a22..8dd90793fe9 100644
--- a/tests/lang/operators/divide_basiclong_64bit.phpt
+++ b/tests/lang/operators/divide_basiclong_64bit.phpt
@@ -28,7 +28,7 @@
try {
var_dump($longVal/$otherVal);
} catch (\Throwable $e) {
- echo get_class($e) . ': ' . $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
}
diff --git a/tests/lang/operators/divide_variationStr.phpt b/tests/lang/operators/divide_variationStr.phpt
index 6c62972ffd3..4b16f2d3150 100644
--- a/tests/lang/operators/divide_variationStr.phpt
+++ b/tests/lang/operators/divide_variationStr.phpt
@@ -16,9 +16,9 @@
try {
var_dump($strVal/$otherVal);
} catch (\TypeError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
} catch (\DivisionByZeroError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
}
@@ -27,7 +27,7 @@
?>
--EXPECT--
--- testing: '0'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '0'/'65' ---
int(0)
--- testing: '0'/'-44' ---
@@ -37,7 +37,7 @@
--- testing: '0'/'-7.7' ---
float(-0)
--- testing: '0'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '0'/'123abc' ---
int(0)
--- testing: '0'/'123e5' ---
@@ -53,9 +53,9 @@
--- testing: '0'/'3.4a' ---
float(0)
--- testing: '0'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '65'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '65'/'65' ---
int(1)
--- testing: '65'/'-44' ---
@@ -65,7 +65,7 @@
--- testing: '65'/'-7.7' ---
float(-8.441558441558442)
--- testing: '65'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '65'/'123abc' ---
float(0.5284552845528455)
--- testing: '65'/'123e5' ---
@@ -81,9 +81,9 @@
--- testing: '65'/'3.4a' ---
float(19.11764705882353)
--- testing: '65'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '-44'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '-44'/'65' ---
float(-0.676923076923077)
--- testing: '-44'/'-44' ---
@@ -93,7 +93,7 @@
--- testing: '-44'/'-7.7' ---
float(5.714285714285714)
--- testing: '-44'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '-44'/'123abc' ---
float(-0.35772357723577236)
--- testing: '-44'/'123e5' ---
@@ -109,9 +109,9 @@
--- testing: '-44'/'3.4a' ---
float(-12.941176470588236)
--- testing: '-44'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '1.2'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '1.2'/'65' ---
float(0.01846153846153846)
--- testing: '1.2'/'-44' ---
@@ -121,7 +121,7 @@
--- testing: '1.2'/'-7.7' ---
float(-0.15584415584415584)
--- testing: '1.2'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '1.2'/'123abc' ---
float(0.00975609756097561)
--- testing: '1.2'/'123e5' ---
@@ -137,9 +137,9 @@
--- testing: '1.2'/'3.4a' ---
float(0.35294117647058826)
--- testing: '1.2'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '-7.7'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '-7.7'/'65' ---
float(-0.11846153846153847)
--- testing: '-7.7'/'-44' ---
@@ -149,7 +149,7 @@
--- testing: '-7.7'/'-7.7' ---
float(1)
--- testing: '-7.7'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '-7.7'/'123abc' ---
float(-0.06260162601626017)
--- testing: '-7.7'/'123e5' ---
@@ -165,37 +165,37 @@
--- testing: '-7.7'/'3.4a' ---
float(-2.264705882352941)
--- testing: '-7.7'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'0' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'65' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'-44' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'1.2' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'-7.7' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'123abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'123e5' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'123e5xyz' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/' 123abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'123 abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'123abc ' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'3.4a' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'abc'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123abc'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '123abc'/'65' ---
float(1.8923076923076922)
--- testing: '123abc'/'-44' ---
@@ -205,7 +205,7 @@
--- testing: '123abc'/'-7.7' ---
float(-15.974025974025974)
--- testing: '123abc'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123abc'/'123abc' ---
int(1)
--- testing: '123abc'/'123e5' ---
@@ -221,9 +221,9 @@
--- testing: '123abc'/'3.4a' ---
float(36.1764705882353)
--- testing: '123abc'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123e5'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '123e5'/'65' ---
float(189230.76923076922)
--- testing: '123e5'/'-44' ---
@@ -233,7 +233,7 @@
--- testing: '123e5'/'-7.7' ---
float(-1597402.5974025973)
--- testing: '123e5'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123e5'/'123abc' ---
float(100000)
--- testing: '123e5'/'123e5' ---
@@ -249,9 +249,9 @@
--- testing: '123e5'/'3.4a' ---
float(3617647.0588235296)
--- testing: '123e5'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123e5xyz'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '123e5xyz'/'65' ---
float(189230.76923076922)
--- testing: '123e5xyz'/'-44' ---
@@ -261,7 +261,7 @@
--- testing: '123e5xyz'/'-7.7' ---
float(-1597402.5974025973)
--- testing: '123e5xyz'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123e5xyz'/'123abc' ---
float(100000)
--- testing: '123e5xyz'/'123e5' ---
@@ -277,9 +277,9 @@
--- testing: '123e5xyz'/'3.4a' ---
float(3617647.0588235296)
--- testing: '123e5xyz'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: ' 123abc'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: ' 123abc'/'65' ---
float(1.8923076923076922)
--- testing: ' 123abc'/'-44' ---
@@ -289,7 +289,7 @@
--- testing: ' 123abc'/'-7.7' ---
float(-15.974025974025974)
--- testing: ' 123abc'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: ' 123abc'/'123abc' ---
int(1)
--- testing: ' 123abc'/'123e5' ---
@@ -305,9 +305,9 @@
--- testing: ' 123abc'/'3.4a' ---
float(36.1764705882353)
--- testing: ' 123abc'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123 abc'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '123 abc'/'65' ---
float(1.8923076923076922)
--- testing: '123 abc'/'-44' ---
@@ -317,7 +317,7 @@
--- testing: '123 abc'/'-7.7' ---
float(-15.974025974025974)
--- testing: '123 abc'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123 abc'/'123abc' ---
int(1)
--- testing: '123 abc'/'123e5' ---
@@ -333,9 +333,9 @@
--- testing: '123 abc'/'3.4a' ---
float(36.1764705882353)
--- testing: '123 abc'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123abc '/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '123abc '/'65' ---
float(1.8923076923076922)
--- testing: '123abc '/'-44' ---
@@ -345,7 +345,7 @@
--- testing: '123abc '/'-7.7' ---
float(-15.974025974025974)
--- testing: '123abc '/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '123abc '/'123abc' ---
int(1)
--- testing: '123abc '/'123e5' ---
@@ -361,9 +361,9 @@
--- testing: '123abc '/'3.4a' ---
float(36.1764705882353)
--- testing: '123abc '/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '3.4a'/'0' ---
-Division by zero
+DivisionByZeroError: Division by zero
--- testing: '3.4a'/'65' ---
float(0.052307692307692305)
--- testing: '3.4a'/'-44' ---
@@ -373,7 +373,7 @@
--- testing: '3.4a'/'-7.7' ---
float(-0.44155844155844154)
--- testing: '3.4a'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: '3.4a'/'123abc' ---
float(0.027642276422764227)
--- testing: '3.4a'/'123e5' ---
@@ -389,32 +389,32 @@
--- testing: '3.4a'/'3.4a' ---
float(1)
--- testing: '3.4a'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'0' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'65' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'-44' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'1.2' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'-7.7' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'123abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'123e5' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'123e5xyz' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/' 123abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'123 abc' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'123abc ' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'3.4a' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
--- testing: 'a5.9'/'a5.9' ---
-Unsupported operand types: string / string
+TypeError: Unsupported operand types: string / string
diff --git a/tests/lang/operators/modulus_basiclong_64bit.phpt b/tests/lang/operators/modulus_basiclong_64bit.phpt
index 34792c2b54d..379ccc2dd63 100644
--- a/tests/lang/operators/modulus_basiclong_64bit.phpt
+++ b/tests/lang/operators/modulus_basiclong_64bit.phpt
@@ -28,7 +28,7 @@
try {
var_dump($longVal%$otherVal);
} catch (DivisionByZeroError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
@@ -39,7 +39,7 @@
try {
var_dump($otherVal%$longVal);
} catch (DivisionByZeroError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
@@ -47,7 +47,7 @@
?>
--EXPECT--
--- testing: 9223372036854775807 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 9223372036854775807 % 1 ---
int(0)
--- testing: 9223372036854775807 % -1 ---
@@ -65,7 +65,7 @@
--- testing: 9223372036854775807 % 9223372036854775807 ---
int(0)
--- testing: -9223372036854775808 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: -9223372036854775808 % 1 ---
int(0)
--- testing: -9223372036854775808 % -1 ---
@@ -83,7 +83,7 @@
--- testing: -9223372036854775808 % 9223372036854775807 ---
int(-1)
--- testing: 2147483647 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 2147483647 % 1 ---
int(0)
--- testing: 2147483647 % -1 ---
@@ -101,7 +101,7 @@
--- testing: 2147483647 % 9223372036854775807 ---
int(2147483647)
--- testing: -2147483648 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: -2147483648 % 1 ---
int(0)
--- testing: -2147483648 % -1 ---
@@ -119,7 +119,7 @@
--- testing: -2147483648 % 9223372036854775807 ---
int(-2147483648)
--- testing: 9223372034707292160 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 9223372034707292160 % 1 ---
int(0)
--- testing: 9223372034707292160 % -1 ---
@@ -137,7 +137,7 @@
--- testing: 9223372034707292160 % 9223372036854775807 ---
int(9223372034707292160)
--- testing: -9223372034707292160 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: -9223372034707292160 % 1 ---
int(0)
--- testing: -9223372034707292160 % -1 ---
@@ -155,7 +155,7 @@
--- testing: -9223372034707292160 % 9223372036854775807 ---
int(-9223372034707292160)
--- testing: 2147483648 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 2147483648 % 1 ---
int(0)
--- testing: 2147483648 % -1 ---
@@ -173,7 +173,7 @@
--- testing: 2147483648 % 9223372036854775807 ---
int(2147483648)
--- testing: -2147483649 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: -2147483649 % 1 ---
int(0)
--- testing: -2147483649 % -1 ---
@@ -191,7 +191,7 @@
--- testing: -2147483649 % 9223372036854775807 ---
int(-2147483649)
--- testing: 4294967294 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 4294967294 % 1 ---
int(0)
--- testing: 4294967294 % -1 ---
@@ -209,7 +209,7 @@
--- testing: 4294967294 % 9223372036854775807 ---
int(4294967294)
--- testing: 4294967295 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 4294967295 % 1 ---
int(0)
--- testing: 4294967295 % -1 ---
@@ -227,7 +227,7 @@
--- testing: 4294967295 % 9223372036854775807 ---
int(4294967295)
--- testing: 4294967293 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 4294967293 % 1 ---
int(0)
--- testing: 4294967293 % -1 ---
@@ -245,7 +245,7 @@
--- testing: 4294967293 % 9223372036854775807 ---
int(4294967293)
--- testing: 9223372036854775806 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 9223372036854775806 % 1 ---
int(0)
--- testing: 9223372036854775806 % -1 ---
@@ -263,7 +263,7 @@
--- testing: 9223372036854775806 % 9223372036854775807 ---
int(9223372036854775806)
--- testing: 9.2233720368548E+18 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: 9.2233720368548E+18 % 1 ---
int(0)
--- testing: 9.2233720368548E+18 % -1 ---
@@ -281,7 +281,7 @@
--- testing: 9.2233720368548E+18 % 9223372036854775807 ---
int(-1)
--- testing: -9223372036854775807 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: -9223372036854775807 % 1 ---
int(0)
--- testing: -9223372036854775807 % -1 ---
@@ -299,7 +299,7 @@
--- testing: -9223372036854775807 % 9223372036854775807 ---
int(0)
--- testing: -9.2233720368548E+18 % 0 ---
-Exception: Modulo by zero
+DivisionByZeroError: Modulo by zero
--- testing: -9.2233720368548E+18 % 1 ---
int(0)
--- testing: -9.2233720368548E+18 % -1 ---
diff --git a/tests/lang/operators/modulus_variationStr.phpt b/tests/lang/operators/modulus_variationStr.phpt
index 1f9aae88a4d..941345fe404 100644
--- a/tests/lang/operators/modulus_variationStr.phpt
+++ b/tests/lang/operators/modulus_variationStr.phpt
@@ -16,7 +16,7 @@
try {
var_dump($strVal%$otherVal);
} catch (\Throwable $e) {
- echo get_class($e) . ': ' . $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
}
diff --git a/tests/lang/operators/multiply_variationStr.phpt b/tests/lang/operators/multiply_variationStr.phpt
index af650ae9935..622243617a2 100644
--- a/tests/lang/operators/multiply_variationStr.phpt
+++ b/tests/lang/operators/multiply_variationStr.phpt
@@ -16,7 +16,7 @@
try {
var_dump($strVal*$otherVal);
} catch (\TypeError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
}
@@ -34,7 +34,7 @@
--- testing: '0' * '-7.7' ---
float(-0)
--- testing: '0' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '0' * '123abc' ---
int(0)
--- testing: '0' * '123e5' ---
@@ -50,7 +50,7 @@
--- testing: '0' * '3.4a' ---
float(0)
--- testing: '0' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '65' * '0' ---
int(0)
--- testing: '65' * '65' ---
@@ -62,7 +62,7 @@
--- testing: '65' * '-7.7' ---
float(-500.5)
--- testing: '65' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '65' * '123abc' ---
int(7995)
--- testing: '65' * '123e5' ---
@@ -78,7 +78,7 @@
--- testing: '65' * '3.4a' ---
float(221)
--- testing: '65' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '-44' * '0' ---
int(0)
--- testing: '-44' * '65' ---
@@ -90,7 +90,7 @@
--- testing: '-44' * '-7.7' ---
float(338.8)
--- testing: '-44' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '-44' * '123abc' ---
int(-5412)
--- testing: '-44' * '123e5' ---
@@ -106,7 +106,7 @@
--- testing: '-44' * '3.4a' ---
float(-149.6)
--- testing: '-44' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '1.2' * '0' ---
float(0)
--- testing: '1.2' * '65' ---
@@ -118,7 +118,7 @@
--- testing: '1.2' * '-7.7' ---
float(-9.24)
--- testing: '1.2' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '1.2' * '123abc' ---
float(147.6)
--- testing: '1.2' * '123e5' ---
@@ -134,7 +134,7 @@
--- testing: '1.2' * '3.4a' ---
float(4.08)
--- testing: '1.2' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '-7.7' * '0' ---
float(-0)
--- testing: '-7.7' * '65' ---
@@ -146,7 +146,7 @@
--- testing: '-7.7' * '-7.7' ---
float(59.290000000000006)
--- testing: '-7.7' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '-7.7' * '123abc' ---
float(-947.1)
--- testing: '-7.7' * '123e5' ---
@@ -162,35 +162,35 @@
--- testing: '-7.7' * '3.4a' ---
float(-26.18)
--- testing: '-7.7' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '0' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '65' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '-44' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '1.2' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '-7.7' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '123abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '123e5' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '123e5xyz' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * ' 123abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '123 abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '123abc ' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * '3.4a' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'abc' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123abc' * '0' ---
int(0)
--- testing: '123abc' * '65' ---
@@ -202,7 +202,7 @@
--- testing: '123abc' * '-7.7' ---
float(-947.1)
--- testing: '123abc' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123abc' * '123abc' ---
int(15129)
--- testing: '123abc' * '123e5' ---
@@ -218,7 +218,7 @@
--- testing: '123abc' * '3.4a' ---
float(418.2)
--- testing: '123abc' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123e5' * '0' ---
float(0)
--- testing: '123e5' * '65' ---
@@ -230,7 +230,7 @@
--- testing: '123e5' * '-7.7' ---
float(-94710000)
--- testing: '123e5' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123e5' * '123abc' ---
float(1512900000)
--- testing: '123e5' * '123e5' ---
@@ -246,7 +246,7 @@
--- testing: '123e5' * '3.4a' ---
float(41820000)
--- testing: '123e5' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123e5xyz' * '0' ---
float(0)
--- testing: '123e5xyz' * '65' ---
@@ -258,7 +258,7 @@
--- testing: '123e5xyz' * '-7.7' ---
float(-94710000)
--- testing: '123e5xyz' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123e5xyz' * '123abc' ---
float(1512900000)
--- testing: '123e5xyz' * '123e5' ---
@@ -274,7 +274,7 @@
--- testing: '123e5xyz' * '3.4a' ---
float(41820000)
--- testing: '123e5xyz' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: ' 123abc' * '0' ---
int(0)
--- testing: ' 123abc' * '65' ---
@@ -286,7 +286,7 @@
--- testing: ' 123abc' * '-7.7' ---
float(-947.1)
--- testing: ' 123abc' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: ' 123abc' * '123abc' ---
int(15129)
--- testing: ' 123abc' * '123e5' ---
@@ -302,7 +302,7 @@
--- testing: ' 123abc' * '3.4a' ---
float(418.2)
--- testing: ' 123abc' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123 abc' * '0' ---
int(0)
--- testing: '123 abc' * '65' ---
@@ -314,7 +314,7 @@
--- testing: '123 abc' * '-7.7' ---
float(-947.1)
--- testing: '123 abc' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123 abc' * '123abc' ---
int(15129)
--- testing: '123 abc' * '123e5' ---
@@ -330,7 +330,7 @@
--- testing: '123 abc' * '3.4a' ---
float(418.2)
--- testing: '123 abc' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123abc ' * '0' ---
int(0)
--- testing: '123abc ' * '65' ---
@@ -342,7 +342,7 @@
--- testing: '123abc ' * '-7.7' ---
float(-947.1)
--- testing: '123abc ' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '123abc ' * '123abc' ---
int(15129)
--- testing: '123abc ' * '123e5' ---
@@ -358,7 +358,7 @@
--- testing: '123abc ' * '3.4a' ---
float(418.2)
--- testing: '123abc ' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '3.4a' * '0' ---
float(0)
--- testing: '3.4a' * '65' ---
@@ -370,7 +370,7 @@
--- testing: '3.4a' * '-7.7' ---
float(-26.18)
--- testing: '3.4a' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: '3.4a' * '123abc' ---
float(418.2)
--- testing: '3.4a' * '123e5' ---
@@ -386,32 +386,32 @@
--- testing: '3.4a' * '3.4a' ---
float(11.559999999999999)
--- testing: '3.4a' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '0' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '65' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '-44' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '1.2' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '-7.7' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * 'abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '123abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '123e5' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '123e5xyz' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * ' 123abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '123 abc' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '123abc ' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * '3.4a' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
--- testing: 'a5.9' * 'a5.9' ---
-Unsupported operand types: string * string
+TypeError: Unsupported operand types: string * string
diff --git a/tests/lang/operators/negate_variationStr.phpt b/tests/lang/operators/negate_variationStr.phpt
index 43b2f6a52a6..785192ed692 100644
--- a/tests/lang/operators/negate_variationStr.phpt
+++ b/tests/lang/operators/negate_variationStr.phpt
@@ -13,7 +13,7 @@
try {
var_dump(-$strVal);
} catch (\TypeError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
@@ -30,7 +30,7 @@
--- testing: '-7.7' ---
float(7.7)
--- testing: 'abc' ---
-Unsupported operand types: string * int
+TypeError: Unsupported operand types: string * int
--- testing: '123abc' ---
Warning: A non-numeric value encountered in %s on line %d
@@ -58,4 +58,4 @@
Warning: A non-numeric value encountered in %s on line %d
float(-3.4)
--- testing: 'a5.9' ---
-Unsupported operand types: string * int
+TypeError: Unsupported operand types: string * int
diff --git a/tests/lang/operators/subtract_variationStr.phpt b/tests/lang/operators/subtract_variationStr.phpt
index 6df852498df..9eea2027cb5 100644
--- a/tests/lang/operators/subtract_variationStr.phpt
+++ b/tests/lang/operators/subtract_variationStr.phpt
@@ -16,7 +16,7 @@
try {
var_dump($strVal-$otherVal);
} catch (\TypeError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
}
}
@@ -34,7 +34,7 @@
--- testing: '0' - '-7.7' ---
float(7.7)
--- testing: '0' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '0' - '123abc' ---
int(-123)
--- testing: '0' - '123e5' ---
@@ -50,7 +50,7 @@
--- testing: '0' - '3.4a' ---
float(-3.4)
--- testing: '0' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '65' - '0' ---
int(65)
--- testing: '65' - '65' ---
@@ -62,7 +62,7 @@
--- testing: '65' - '-7.7' ---
float(72.7)
--- testing: '65' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '65' - '123abc' ---
int(-58)
--- testing: '65' - '123e5' ---
@@ -78,7 +78,7 @@
--- testing: '65' - '3.4a' ---
float(61.6)
--- testing: '65' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '-44' - '0' ---
int(-44)
--- testing: '-44' - '65' ---
@@ -90,7 +90,7 @@
--- testing: '-44' - '-7.7' ---
float(-36.3)
--- testing: '-44' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '-44' - '123abc' ---
int(-167)
--- testing: '-44' - '123e5' ---
@@ -106,7 +106,7 @@
--- testing: '-44' - '3.4a' ---
float(-47.4)
--- testing: '-44' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '1.2' - '0' ---
float(1.2)
--- testing: '1.2' - '65' ---
@@ -118,7 +118,7 @@
--- testing: '1.2' - '-7.7' ---
float(8.9)
--- testing: '1.2' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '1.2' - '123abc' ---
float(-121.8)
--- testing: '1.2' - '123e5' ---
@@ -134,7 +134,7 @@
--- testing: '1.2' - '3.4a' ---
float(-2.2)
--- testing: '1.2' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '-7.7' - '0' ---
float(-7.7)
--- testing: '-7.7' - '65' ---
@@ -146,7 +146,7 @@
--- testing: '-7.7' - '-7.7' ---
float(0)
--- testing: '-7.7' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '-7.7' - '123abc' ---
float(-130.7)
--- testing: '-7.7' - '123e5' ---
@@ -162,35 +162,35 @@
--- testing: '-7.7' - '3.4a' ---
float(-11.1)
--- testing: '-7.7' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '0' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '65' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '-44' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '1.2' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '-7.7' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '123abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '123e5' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '123e5xyz' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - ' 123abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '123 abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '123abc ' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - '3.4a' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'abc' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123abc' - '0' ---
int(123)
--- testing: '123abc' - '65' ---
@@ -202,7 +202,7 @@
--- testing: '123abc' - '-7.7' ---
float(130.7)
--- testing: '123abc' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123abc' - '123abc' ---
int(0)
--- testing: '123abc' - '123e5' ---
@@ -218,7 +218,7 @@
--- testing: '123abc' - '3.4a' ---
float(119.6)
--- testing: '123abc' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123e5' - '0' ---
float(12300000)
--- testing: '123e5' - '65' ---
@@ -230,7 +230,7 @@
--- testing: '123e5' - '-7.7' ---
float(12300007.7)
--- testing: '123e5' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123e5' - '123abc' ---
float(12299877)
--- testing: '123e5' - '123e5' ---
@@ -246,7 +246,7 @@
--- testing: '123e5' - '3.4a' ---
float(12299996.6)
--- testing: '123e5' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123e5xyz' - '0' ---
float(12300000)
--- testing: '123e5xyz' - '65' ---
@@ -258,7 +258,7 @@
--- testing: '123e5xyz' - '-7.7' ---
float(12300007.7)
--- testing: '123e5xyz' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123e5xyz' - '123abc' ---
float(12299877)
--- testing: '123e5xyz' - '123e5' ---
@@ -274,7 +274,7 @@
--- testing: '123e5xyz' - '3.4a' ---
float(12299996.6)
--- testing: '123e5xyz' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: ' 123abc' - '0' ---
int(123)
--- testing: ' 123abc' - '65' ---
@@ -286,7 +286,7 @@
--- testing: ' 123abc' - '-7.7' ---
float(130.7)
--- testing: ' 123abc' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: ' 123abc' - '123abc' ---
int(0)
--- testing: ' 123abc' - '123e5' ---
@@ -302,7 +302,7 @@
--- testing: ' 123abc' - '3.4a' ---
float(119.6)
--- testing: ' 123abc' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123 abc' - '0' ---
int(123)
--- testing: '123 abc' - '65' ---
@@ -314,7 +314,7 @@
--- testing: '123 abc' - '-7.7' ---
float(130.7)
--- testing: '123 abc' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123 abc' - '123abc' ---
int(0)
--- testing: '123 abc' - '123e5' ---
@@ -330,7 +330,7 @@
--- testing: '123 abc' - '3.4a' ---
float(119.6)
--- testing: '123 abc' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123abc ' - '0' ---
int(123)
--- testing: '123abc ' - '65' ---
@@ -342,7 +342,7 @@
--- testing: '123abc ' - '-7.7' ---
float(130.7)
--- testing: '123abc ' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '123abc ' - '123abc' ---
int(0)
--- testing: '123abc ' - '123e5' ---
@@ -358,7 +358,7 @@
--- testing: '123abc ' - '3.4a' ---
float(119.6)
--- testing: '123abc ' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '3.4a' - '0' ---
float(3.4)
--- testing: '3.4a' - '65' ---
@@ -370,7 +370,7 @@
--- testing: '3.4a' - '-7.7' ---
float(11.1)
--- testing: '3.4a' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: '3.4a' - '123abc' ---
float(-119.6)
--- testing: '3.4a' - '123e5' ---
@@ -386,32 +386,32 @@
--- testing: '3.4a' - '3.4a' ---
float(0)
--- testing: '3.4a' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '0' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '65' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '-44' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '1.2' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '-7.7' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - 'abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '123abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '123e5' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '123e5xyz' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - ' 123abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '123 abc' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '123abc ' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - '3.4a' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
--- testing: 'a5.9' - 'a5.9' ---
-Unsupported operand types: string - string
+TypeError: Unsupported operand types: string - string
diff --git a/tests/lang/passByReference_010.phpt b/tests/lang/passByReference_010.phpt
index 0ae8e953e20..f57acf08a3d 100644
--- a/tests/lang/passByReference_010.phpt
+++ b/tests/lang/passByReference_010.phpt
@@ -13,7 +13,7 @@ function f(&$a) {
f($a="a.original");
var_dump($a);
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() ."\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "\n\n---> Pass variable assignment by reference:\n";
@@ -23,7 +23,7 @@ function f(&$a) {
f($b = $a);
var_dump($a);
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() ."\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "\n\n---> Pass reference assignment by reference:\n";
@@ -33,7 +33,7 @@ function f(&$a) {
f($b =& $a);
var_dump($a);
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() ."\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "\n\n---> Pass concat assignment by reference:\n";
@@ -44,17 +44,17 @@ function f(&$a) {
f($b .= $a);
var_dump($a);
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() ."\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
---> Pass constant assignment by reference:
-Exception: f(): Argument #1 ($a) could not be passed by reference
+Error: f(): Argument #1 ($a) could not be passed by reference
---> Pass variable assignment by reference:
-Exception: f(): Argument #1 ($a) could not be passed by reference
+Error: f(): Argument #1 ($a) could not be passed by reference
---> Pass reference assignment by reference:
@@ -63,4 +63,4 @@ function f(&$a) {
---> Pass concat assignment by reference:
-Exception: f(): Argument #1 ($a) could not be passed by reference
+Error: f(): Argument #1 ($a) could not be passed by reference
diff --git a/tests/lang/syntax_errors.phpt b/tests/lang/syntax_errors.phpt
index 1b52c31c6a0..71861316da4 100644
--- a/tests/lang/syntax_errors.phpt
+++ b/tests/lang/syntax_errors.phpt
@@ -29,29 +29,29 @@
try {
eval($code);
} catch (ParseError $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
}
echo "==DONE==\n";
?>
--EXPECT--
-Unclosed '('
-Unclosed '['
-Unclosed '{'
-Unmatched ')'
-Unmatched ']'
-Unmatched '}'
-Unclosed '(' does not match ']'
-Unclosed '[' does not match ')'
-Unclosed '{' does not match ')'
-Unclosed '{' on line 1
-Unclosed '[' on line 1
-Unclosed '{' on line 1
-Unmatched ')'
-Unmatched ']'
-Unmatched '}'
-Unclosed '(' on line 1 does not match ']'
-Unclosed '[' on line 1 does not match ')'
-Unclosed '{' on line 1 does not match ')'
+ParseError: Unclosed '('
+ParseError: Unclosed '['
+ParseError: Unclosed '{'
+ParseError: Unmatched ')'
+ParseError: Unmatched ']'
+ParseError: Unmatched '}'
+ParseError: Unclosed '(' does not match ']'
+ParseError: Unclosed '[' does not match ')'
+ParseError: Unclosed '{' does not match ')'
+ParseError: Unclosed '{' on line 1
+ParseError: Unclosed '[' on line 1
+ParseError: Unclosed '{' on line 1
+ParseError: Unmatched ')'
+ParseError: Unmatched ']'
+ParseError: Unmatched '}'
+ParseError: Unclosed '(' on line 1 does not match ']'
+ParseError: Unclosed '[' on line 1 does not match ')'
+ParseError: Unclosed '{' on line 1 does not match ')'
==DONE==
diff --git a/tests/output/ob_014.phpt b/tests/output/ob_014.phpt
index 0893db5d251..202540696b3 100644
--- a/tests/output/ob_014.phpt
+++ b/tests/output/ob_014.phpt
@@ -7,9 +7,9 @@
try {
ob_end_flush();
} catch (TypeError $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
foo
-str_rot13() expects exactly 1 argument, 2 given
+ArgumentCountError: str_rot13() expects exactly 1 argument, 2 given
diff --git a/tests/output/ob_015.phpt b/tests/output/ob_015.phpt
index 47c9b24be16..10e7beee3fa 100644
--- a/tests/output/ob_015.phpt
+++ b/tests/output/ob_015.phpt
@@ -6,10 +6,10 @@
try {
echo "foo\n";
} catch (TypeError $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
ob_end_flush();
?>
--EXPECT--
foo
-str_rot13() expects exactly 1 argument, 2 given
+ArgumentCountError: str_rot13() expects exactly 1 argument, 2 given
diff --git a/tests/output/ob_start_basic_002.phpt b/tests/output/ob_start_basic_002.phpt
index 700dab5d3c3..6d124c308df 100644
--- a/tests/output/ob_start_basic_002.phpt
+++ b/tests/output/ob_start_basic_002.phpt
@@ -50,4 +50,3 @@ function return_zero($string) {
--> Use callback 'return_zero':
0
-
diff --git a/tests/output/ob_start_callback_output/exception_handler_nested.phpt b/tests/output/ob_start_callback_output/exception_handler_nested.phpt
index 562abd63aa6..6910fb3c134 100644
--- a/tests/output/ob_start_callback_output/exception_handler_nested.phpt
+++ b/tests/output/ob_start_callback_output/exception_handler_nested.phpt
@@ -38,21 +38,21 @@ function third_handler($string) {
try {
ob_end_flush();
} catch (\ErrorException $e) {
- echo $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "Ended third_handler\n\n";
try {
ob_end_flush();
} catch (\ErrorException $e) {
- echo $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "Ended second_handler\n\n";
try {
ob_end_flush();
} catch (\ErrorException $e) {
- echo $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "Ended first_handler handler\n\n";
@@ -62,7 +62,7 @@ function third_handler($string) {
?>
--EXPECT--
FIRST
-ob_end_flush(): Producing output from user output handler first_handler is deprecated
+ErrorException: ob_end_flush(): Producing output from user output handler first_handler is deprecated
Ended first_handler handler
All handlers are over
@@ -71,12 +71,12 @@ function third_handler($string) {
>>>
second_handler: <<<THIRD
-ob_end_flush(): Producing output from user output handler third_handler is deprecated
+ErrorException: ob_end_flush(): Producing output from user output handler third_handler is deprecated
Ended third_handler
>>>
first_handler: <<<SECOND
-ob_end_flush(): Producing output from user output handler second_handler is deprecated
+ErrorException: ob_end_flush(): Producing output from user output handler second_handler is deprecated
Ended second_handler
>>>
diff --git a/tests/output/ob_start_callback_output/functions_that_output_nested.phpt b/tests/output/ob_start_callback_output/functions_that_output_nested.phpt
index 976ec46f880..258b16ad67b 100644
--- a/tests/output/ob_start_callback_output/functions_that_output_nested.phpt
+++ b/tests/output/ob_start_callback_output/functions_that_output_nested.phpt
@@ -66,4 +66,4 @@ function handle_phpcredits($string) {
handle_echo: <<<
Deprecated: ob_end_flush(): Producing output from user output handler handle_var_dump is deprecated in %s on line %d
var_dump
->>>
\ No newline at end of file
+>>>
diff --git a/tests/strings/002.phpt b/tests/strings/002.phpt
index 6284e9bf5d3..09ed12b4a66 100644
--- a/tests/strings/002.phpt
+++ b/tests/strings/002.phpt
@@ -42,7 +42,7 @@
try {
print("printf test 30:"); printf("%0\$s", 1); print("x\n");
} catch(\ValueError $e) {
- print('Error found: '.$e->getMessage()."\n");
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
printf("printf test 31:%.17g\n", INF);
printf("printf test 32:%.17g\n", -INF);
@@ -84,7 +84,7 @@
printf test 27:3 1 2
printf test 28:02 1
printf test 29:2 1
-printf test 30:Error found: Argument number specifier must be greater than zero and less than 2147483647
+printf test 30:ValueError: Argument number specifier must be greater than zero and less than 2147483647
printf test 31:INF
printf test 32:-INF
vprintf test 1:2 1
diff --git a/tests/strings/offsets_general.phpt b/tests/strings/offsets_general.phpt
index 16960eac952..88358051d8c 100644
--- a/tests/strings/offsets_general.phpt
+++ b/tests/strings/offsets_general.phpt
@@ -12,7 +12,7 @@
try {
var_dump($string["foo"]);
} catch (\TypeError $e) {
- echo $e->getMessage() . \PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
var_dump(isset($string["foo"]["bar"]));
@@ -23,5 +23,5 @@
string(1) "o"
bool(true)
bool(true)
-Cannot access offset of type string on string
+TypeError: Cannot access offset of type string on string
bool(false)