diff --git a/tests/basic/GHSA-9pqp-7h25-4f32.phpt b/tests/basic/GHSA-9pqp-7h25-4f32.phpt index 29bcb6557d5a..17a145ad9d0d 100644 --- a/tests/basic/GHSA-9pqp-7h25-4f32.phpt +++ b/tests/basic/GHSA-9pqp-7h25-4f32.phpt @@ -100,4 +100,3 @@ Content-type: text/html; charset=UTF-8 Hello world array(0) { } - diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt index a3e91967dff8..335cabceaf61 100644 --- a/tests/classes/abstract_user_call.phpt +++ b/tests/classes/abstract_user_call.phpt @@ -23,7 +23,7 @@ $o->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 @@ try { 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 22e1cb2d3fa3..6cdeed4ec8c0 100644 --- a/tests/classes/array_access_013.phpt +++ b/tests/classes/array_access_013.phpt @@ -19,7 +19,7 @@ try } catch(Exception $e) { - echo "Caught in " . $e->getMessage() . "()\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try @@ -28,7 +28,7 @@ try } catch(Exception $e) { - echo "Caught in " . $e->getMessage() . "()\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try @@ -37,7 +37,7 @@ try } catch(Exception $e) { - echo "Caught in " . $e->getMessage() . "()\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try @@ -46,11 +46,11 @@ try } 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 0f00ebf562fb..4524a7be2222 100644 --- a/tests/classes/autoload_012.phpt +++ b/tests/classes/autoload_012.phpt @@ -9,9 +9,9 @@ spl_autoload_register(function ($name) { 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 1b9302747eff..5499b9aaeb20 100644 --- a/tests/classes/autoload_013.phpt +++ b/tests/classes/autoload_013.phpt @@ -11,9 +11,9 @@ try { 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 eaba7f05c121..517d6a690742 100644 --- a/tests/classes/autoload_014.phpt +++ b/tests/classes/autoload_014.phpt @@ -11,9 +11,9 @@ try { 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 9aa862a7834d..9a85ee540d1c 100644 --- a/tests/classes/autoload_015.phpt +++ b/tests/classes/autoload_015.phpt @@ -11,9 +11,9 @@ try { 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 c6e7a2b37682..857bebc7ba0c 100644 --- a/tests/classes/autoload_016.phpt +++ b/tests/classes/autoload_016.phpt @@ -12,9 +12,9 @@ $rc = new ReflectionClass("stdClass"); 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 ef327ed37620..c92f0c1bf207 100644 --- a/tests/classes/autoload_017.phpt +++ b/tests/classes/autoload_017.phpt @@ -12,9 +12,9 @@ $rc = new ReflectionClass("stdClass"); 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 d32a0c8b3f24..aac9eb977e67 100644 --- a/tests/classes/bug27504.phpt +++ b/tests/classes/bug27504.phpt @@ -16,16 +16,16 @@ $foo = new foo(); 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 38fa8d614e76..cfeb5260edfe 100644 --- a/tests/classes/constants_visibility_002.phpt +++ b/tests/classes/constants_visibility_002.phpt @@ -17,11 +17,11 @@ A::staticConstDump(); 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 7650ca80c894..509daf900b96 100644 --- a/tests/classes/constants_visibility_003.phpt +++ b/tests/classes/constants_visibility_003.phpt @@ -17,11 +17,11 @@ A::staticConstDump(); 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 949748289232..d747ba294eb9 100644 --- a/tests/classes/ctor_failure.phpt +++ b/tests/classes/ctor_failure.phpt @@ -22,10 +22,10 @@ try } 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 0f51a21a09d0..b4a0923056fd 100644 --- a/tests/classes/destructor_and_exceptions.phpt +++ b/tests/classes/destructor_and_exceptions.phpt @@ -22,7 +22,7 @@ try } catch(Exception $e) { - echo "Caught: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } class FatalException extends Exception @@ -42,17 +42,17 @@ try } 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 6cf120e18bef..a89d3bdead05 100644 --- a/tests/classes/factory_and_singleton_007.phpt +++ b/tests/classes/factory_and_singleton_007.phpt @@ -12,7 +12,7 @@ try { $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 a23af647592f..e070c3be17df 100644 --- a/tests/classes/factory_and_singleton_008.phpt +++ b/tests/classes/factory_and_singleton_008.phpt @@ -12,7 +12,7 @@ try { $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 808fc58636dd..0a6068952496 100644 --- a/tests/classes/iterators_007.phpt +++ b/tests/classes/iterators_007.phpt @@ -27,15 +27,15 @@ while($t->x < 5) } 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 0e1cc18b997f..23db3096c36f 100644 --- a/tests/classes/serialize_001.phpt +++ b/tests/classes/serialize_001.phpt @@ -40,7 +40,7 @@ foreach($tests as $data) } 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 e9ef7b417583..174ceec15d22 100644 --- a/tests/classes/tostring_001.phpt +++ b/tests/classes/tostring_001.phpt @@ -30,7 +30,7 @@ print_r($o); 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 @@ $ar[$o->__toString()] = "ERROR"; try { echo $ar[$o]; } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } echo "====test8====\n"; @@ -75,7 +75,7 @@ var_dump($o); try { echo $o; } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } ?> @@ -85,7 +85,7 @@ try { 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 @@ test2::__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 @@ Converted 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 87a5fe42e1b1..e0bbcd2e635a 100644 --- a/tests/classes/tostring_003.phpt +++ b/tests/classes/tostring_003.phpt @@ -24,11 +24,11 @@ try } 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 48ac2770ddf9..bdbca528d6a0 100644 --- a/tests/classes/tostring_004.phpt +++ b/tests/classes/tostring_004.phpt @@ -15,7 +15,7 @@ echo "Try 1:\n"; try { printf($obj); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } printf("\n"); @@ -23,7 +23,7 @@ echo "\nTry 2:\n"; 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 @@ echo "Try 1:\n"; try { printf($obj); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } printf("\n"); @@ -46,24 +46,24 @@ echo "\nTry 2:\n"; 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 8d2297ab93ae..99c11ebbaded 100644 --- a/tests/classes/type_hinting_004.phpt +++ b/tests/classes/type_hinting_004.phpt @@ -14,32 +14,32 @@ Ensure type hints are enforced for functions invoked as callbacks. 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 @@ Ensure type hints are enforced for functions invoked as callbacks. 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 @@ Ensure type hints are enforced for functions invoked as callbacks. 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 @@ Deprecated: C::f2(): Implicitly marking parameter $a as nullable is deprecated, 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 487c57d24e4a..66e65e79c767 100644 --- a/tests/lang/bug28800.phpt +++ b/tests/lang/bug28800.phpt @@ -7,15 +7,14 @@ Bug #28800 (Incorrect string to number conversion for strings starting with 'inf 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 d9af91419143..928318770d17 100644 --- a/tests/lang/bug29893.phpt +++ b/tests/lang/bug29893.phpt @@ -6,8 +6,8 @@ $base = 50; 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 997a1a633f85..c8c020445025 100644 --- a/tests/lang/bug44827.phpt +++ b/tests/lang/bug44827.phpt @@ -9,16 +9,16 @@ Testfest Munich 2009 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 50f06051e303..68cb2c54506a 100644 --- a/tests/lang/catchable_error_002.phpt +++ b/tests/lang/catchable_error_002.phpt @@ -20,10 +20,10 @@ Catchable fatal error [2] 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 a70cd5bafc8f..9b0ca7ba58a1 100644 --- a/tests/lang/engine_assignExecutionOrder_002.phpt +++ b/tests/lang/engine_assignExecutionOrder_002.phpt @@ -13,7 +13,7 @@ echo "A=$a B=$b\n"; 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 @@ print_r($ee); ?> --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 bb5089e74b94..27e8e7458ce1 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 @@ f("bad4"); ?> --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 7021f3145075..27726fa13a76 100644 --- a/tests/lang/func_get_arg.003.phpt +++ b/tests/lang/func_get_arg.003.phpt @@ -6,9 +6,9 @@ func_get_arg outside of a function declaration 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 91e0025ee417..bd969e17fa64 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 1c4f243fbf72..6ba2a61cf6c9 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 d56de663c5f9..404f3c92f6b4 100644 --- a/tests/lang/func_get_args.003.phpt +++ b/tests/lang/func_get_args.003.phpt @@ -6,9 +6,9 @@ func_get_args() outside of a function declaration 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 0d97109dcc59..4d89191e0601 100644 --- a/tests/lang/func_num_args.003.phpt +++ b/tests/lang/func_num_args.003.phpt @@ -6,9 +6,9 @@ func_num_args() outside of a function declaration 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 9f8f19dadbdd..ebf7c875f60d 100644 --- a/tests/lang/operators/add_variationStr.phpt +++ b/tests/lang/operators/add_variationStr.phpt @@ -16,7 +16,7 @@ foreach ($strVals as $strVal) { try { var_dump($strVal+$otherVal); } catch (\TypeError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } } } @@ -34,7 +34,7 @@ float(1.2) --- 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 @@ int(123) --- 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 @@ float(66.2) --- 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 @@ int(188) --- 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 @@ float(-42.8) --- 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 @@ int(79) --- 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 @@ float(2.4) --- 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 @@ float(124.2) --- 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 @@ float(-6.5) --- 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 @@ float(115.3) --- 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 @@ float(124.2) --- 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 @@ int(246) --- 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 @@ float(12300001.2) --- 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 @@ float(12300123) --- 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 @@ float(12300001.2) --- 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 @@ float(12300123) --- 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 @@ float(124.2) --- 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 @@ int(246) --- 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 @@ float(124.2) --- 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 @@ int(246) --- 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 @@ float(124.2) --- 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 @@ int(246) --- 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 @@ float(4.6) --- 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 @@ float(126.4) --- 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 250813fca357..7563ae66eacd 100644 --- a/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt +++ b/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt @@ -28,7 +28,7 @@ foreach ($longVals as $longVal) { try { var_dump($longVal<<$otherVal); } catch (ArithmeticError $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } } @@ -39,7 +39,7 @@ foreach ($otherVals as $otherVal) { try { var_dump($otherVal<<$longVal); } catch (ArithmeticError $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } } @@ -51,7 +51,7 @@ int(9223372036854775807) --- 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 @@ int(-512) --- 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 @@ int(-9223372036854775808) --- 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 @@ int(0) --- 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 @@ int(2147483647) --- 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 @@ int(1099511627264) --- 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 @@ int(-2147483648) --- 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 @@ int(-1099511627776) --- 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 @@ int(9223372034707292160) --- 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 @@ int(-1099511627776) --- 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 @@ int(-9223372034707292160) --- 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 @@ int(1099511627776) --- 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 @@ int(2147483648) --- 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 @@ int(1099511627776) --- 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 @@ int(-2147483649) --- 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 @@ int(-1099511628288) --- 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 @@ int(4294967294) --- 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 @@ int(2199023254528) --- 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 @@ int(4294967295) --- 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 @@ int(2199023255040) --- 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 @@ int(4294967293) --- 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 @@ int(2199023254016) --- 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 @@ int(9223372036854775806) --- 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 @@ int(-1024) --- 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 @@ int(-9223372036854775808) --- 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 @@ int(0) --- 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 @@ int(-9223372036854775807) --- 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 @@ int(512) --- 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 @@ int(-9223372036854775808) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 cf227ddf8f8f..34d7f8519d2f 100644 --- a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt +++ b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt @@ -16,7 +16,7 @@ foreach ($strVals as $strVal) { 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 c3e7af98928a..5576da911de9 100644 --- a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt +++ b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt @@ -20,7 +20,7 @@ foreach ($strVals as $strVal) { 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 75be6afae23d..dfe56b4db383 100644 --- a/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt +++ b/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt @@ -28,7 +28,7 @@ foreach ($longVals as $longVal) { try { var_dump($longVal>>$otherVal); } catch (ArithmeticError $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } } @@ -39,7 +39,7 @@ foreach ($otherVals as $otherVal) { try { var_dump($otherVal>>$longVal); } catch (ArithmeticError $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } } @@ -51,7 +51,7 @@ int(9223372036854775807) --- 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 @@ int(18014398509481983) --- 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 @@ int(-9223372036854775808) --- 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 @@ int(-18014398509481984) --- 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 @@ int(2147483647) --- 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 @@ int(4194303) --- 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 @@ int(-2147483648) --- 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 @@ int(-4194304) --- 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 @@ int(9223372034707292160) --- 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 @@ int(18014398505287680) --- 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 @@ int(-9223372034707292160) --- 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 @@ int(-18014398505287680) --- 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 @@ int(2147483648) --- 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 @@ int(4194304) --- 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 @@ int(-2147483649) --- 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 @@ int(-4194305) --- 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 @@ int(4294967294) --- 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 @@ int(8388607) --- 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 @@ int(4294967295) --- 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 @@ int(8388607) --- 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 @@ int(4294967293) --- 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 @@ int(8388607) --- 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 @@ int(9223372036854775806) --- 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 @@ int(18014398509481983) --- 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 @@ int(-9223372036854775808) --- 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 @@ int(-18014398509481984) --- 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 @@ int(-9223372036854775807) --- 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 @@ int(-18014398509481984) --- 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 @@ int(-9223372036854775808) --- 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 @@ int(-18014398509481984) --- 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 @@ int(-1) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(-1) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 @@ int(-1) --- 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 @@ int(0) --- 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 @@ int(0) --- 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 d1f124933c85..4ad78f247f1e 100644 --- a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt +++ b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt @@ -16,7 +16,7 @@ foreach ($strVals as $strVal) { 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 65ab5b69a221..8dd90793fe9d 100644 --- a/tests/lang/operators/divide_basiclong_64bit.phpt +++ b/tests/lang/operators/divide_basiclong_64bit.phpt @@ -28,7 +28,7 @@ foreach ($longVals as $longVal) { 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 6c62972ffd38..4b16f2d31506 100644 --- a/tests/lang/operators/divide_variationStr.phpt +++ b/tests/lang/operators/divide_variationStr.phpt @@ -16,9 +16,9 @@ foreach ($strVals as $strVal) { 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 @@ foreach ($strVals as $strVal) { ?> --EXPECT-- --- testing: '0'/'0' --- -Division by zero +DivisionByZeroError: Division by zero --- testing: '0'/'65' --- int(0) --- testing: '0'/'-44' --- @@ -37,7 +37,7 @@ float(0) --- 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 @@ int(0) --- 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 @@ float(54.16666666666667) --- 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 @@ float(0.5284552845528455) --- 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 @@ float(-36.66666666666667) --- 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 @@ float(-0.35772357723577236) --- 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 @@ float(1) --- 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 @@ float(0.00975609756097561) --- 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 @@ float(-6.416666666666667) --- 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 @@ float(-0.06260162601626017) --- 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 @@ float(102.5) --- 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 @@ int(1) --- 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 @@ float(10250000) --- 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 @@ float(100000) --- 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 @@ float(10250000) --- 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 @@ float(100000) --- 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 @@ float(102.5) --- 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 @@ int(1) --- 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 @@ float(102.5) --- 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 @@ int(1) --- 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 @@ float(102.5) --- 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 @@ int(1) --- 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 @@ float(2.8333333333333335) --- 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 @@ float(0.027642276422764227) --- 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 34792c2b54d2..379ccc2dd633 100644 --- a/tests/lang/operators/modulus_basiclong_64bit.phpt +++ b/tests/lang/operators/modulus_basiclong_64bit.phpt @@ -28,7 +28,7 @@ foreach ($longVals as $longVal) { try { var_dump($longVal%$otherVal); } catch (DivisionByZeroError $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } } @@ -39,7 +39,7 @@ foreach ($otherVals as $otherVal) { try { var_dump($otherVal%$longVal); } catch (DivisionByZeroError $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } } } @@ -47,7 +47,7 @@ foreach ($otherVals as $otherVal) { ?> --EXPECT-- --- testing: 9223372036854775807 % 0 --- -Exception: Modulo by zero +DivisionByZeroError: Modulo by zero --- testing: 9223372036854775807 % 1 --- int(0) --- testing: 9223372036854775807 % -1 --- @@ -65,7 +65,7 @@ int(1) --- 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 @@ int(-2) --- 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 @@ int(0) --- 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 @@ int(-1) --- 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 @@ int(1) --- 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 @@ int(-1) --- 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 @@ int(1) --- 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 @@ int(-2) --- 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 @@ int(0) --- 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 @@ int(1) --- 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 @@ int(2147483646) --- 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 @@ int(0) --- 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 @@ int(-2) --- 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 @@ int(-1) --- 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 1f9aae88a4d8..941345fe4045 100644 --- a/tests/lang/operators/modulus_variationStr.phpt +++ b/tests/lang/operators/modulus_variationStr.phpt @@ -16,7 +16,7 @@ foreach ($strVals as $strVal) { 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 af650ae99355..622243617a28 100644 --- a/tests/lang/operators/multiply_variationStr.phpt +++ b/tests/lang/operators/multiply_variationStr.phpt @@ -16,7 +16,7 @@ foreach ($strVals as $strVal) { try { var_dump($strVal*$otherVal); } catch (\TypeError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } } } @@ -34,7 +34,7 @@ float(0) --- 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 @@ int(0) --- 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 @@ float(78) --- 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 @@ int(7995) --- 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 @@ float(-52.8) --- 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 @@ int(-5412) --- 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 @@ float(1.44) --- 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 @@ float(147.6) --- 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 @@ float(-9.24) --- 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 @@ float(-947.1) --- 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 @@ float(147.6) --- 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 @@ int(15129) --- 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 @@ float(14760000) --- 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 @@ float(1512900000) --- 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 @@ float(14760000) --- 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 @@ float(1512900000) --- 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 @@ float(147.6) --- 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 @@ int(15129) --- 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 @@ float(147.6) --- 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 @@ int(15129) --- 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 @@ float(147.6) --- 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 @@ int(15129) --- 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 @@ float(4.08) --- 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 @@ float(418.2) --- 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 43b2f6a52a60..785192ed6922 100644 --- a/tests/lang/operators/negate_variationStr.phpt +++ b/tests/lang/operators/negate_variationStr.phpt @@ -13,7 +13,7 @@ foreach ($strVals as $strVal) { try { var_dump(-$strVal); } catch (\TypeError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } } @@ -30,7 +30,7 @@ float(-1.2) --- 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 @@ int(-123) 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 6df852498df1..9eea2027cb50 100644 --- a/tests/lang/operators/subtract_variationStr.phpt +++ b/tests/lang/operators/subtract_variationStr.phpt @@ -16,7 +16,7 @@ foreach ($strVals as $strVal) { try { var_dump($strVal-$otherVal); } catch (\TypeError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } } } @@ -34,7 +34,7 @@ float(-1.2) --- 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 @@ int(-123) --- 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 @@ float(63.8) --- 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 @@ int(-58) --- 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 @@ float(-45.2) --- 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 @@ int(-167) --- 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 @@ float(0) --- 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 @@ float(-121.8) --- 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 @@ float(-8.9) --- 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 @@ float(-130.7) --- 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 @@ float(121.8) --- 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 @@ int(0) --- 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 @@ float(12299998.8) --- 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 @@ float(12299877) --- 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 @@ float(12299998.8) --- 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 @@ float(12299877) --- 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 @@ float(121.8) --- 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 @@ int(0) --- 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 @@ float(121.8) --- 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 @@ int(0) --- 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 @@ float(121.8) --- 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 @@ int(0) --- 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 @@ float(2.2) --- 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 @@ float(-119.6) --- 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 0ae8e953e204..f57acf08a3d7 100644 --- a/tests/lang/passByReference_010.phpt +++ b/tests/lang/passByReference_010.phpt @@ -13,7 +13,7 @@ try { 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 @@ try { 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 @@ try { 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 @@ try { 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 @@ string(9) "a.changed" ---> 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 1b52c31c6a09..71861316da4a 100644 --- a/tests/lang/syntax_errors.phpt +++ b/tests/lang/syntax_errors.phpt @@ -29,29 +29,29 @@ foreach ($badCode as $code) { 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 0893db5d2518..202540696b3c 100644 --- a/tests/output/ob_014.phpt +++ b/tests/output/ob_014.phpt @@ -7,9 +7,9 @@ echo "foo\n"; 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 47c9b24be164..10e7beee3fa2 100644 --- a/tests/output/ob_015.phpt +++ b/tests/output/ob_015.phpt @@ -6,10 +6,10 @@ ob_start("str_rot13", 1); 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 700dab5d3c38..6d124c308dfa 100644 --- a/tests/output/ob_start_basic_002.phpt +++ b/tests/output/ob_start_basic_002.phpt @@ -50,4 +50,3 @@ I stole your output. --> 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 562abd63aa63..6910fb3c134b 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 @@ echo "In all of them\n\n"; 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 @@ echo implode("\n", $log); ?> --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 @@ third_handler: <<>> second_handler: <<>> first_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 976ec46f880b..258b16ad67bd 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 @@ var_export 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 6284e9bf5d33..09ed12b4a668 100644 --- a/tests/strings/002.phpt +++ b/tests/strings/002.phpt @@ -42,7 +42,7 @@ printf("printf test 29:%2\$-2d %1\$2d\n", 1, 2); 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 26:2 1 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 16960eac9522..88358051d8ce 100644 --- a/tests/strings/offsets_general.phpt +++ b/tests/strings/offsets_general.phpt @@ -12,7 +12,7 @@ var_dump(isset($string[0][0])); 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) "f" 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)