diff --git a/ext/intl/tests/breakiter_getPartsIterator_error.phpt b/ext/intl/tests/breakiter_getPartsIterator_error.phpt index f1a5c18c825a..f14bdadb3e48 100644 --- a/ext/intl/tests/breakiter_getPartsIterator_error.phpt +++ b/ext/intl/tests/breakiter_getPartsIterator_error.phpt @@ -10,9 +10,9 @@ $it = IntlBreakIterator::createWordInstance(NULL); try { var_dump($it->getPartsIterator(-1)); } catch(\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlBreakIterator::getPartsIterator(): Argument #1 ($type) must be one of IntlPartsIterator::KEY_SEQUENTIAL, IntlPartsIterator::KEY_LEFT, or IntlPartsIterator::KEY_RIGHT +ValueError: IntlBreakIterator::getPartsIterator(): Argument #1 ($type) must be one of IntlPartsIterator::KEY_SEQUENTIAL, IntlPartsIterator::KEY_LEFT, or IntlPartsIterator::KEY_RIGHT diff --git a/ext/intl/tests/bug48227.phpt b/ext/intl/tests/bug48227.phpt index 8371a872eaee..b9a9eddc2288 100644 --- a/ext/intl/tests/bug48227.phpt +++ b/ext/intl/tests/bug48227.phpt @@ -10,15 +10,15 @@ foreach (['', 1, NULL, $x] as $value) { try { var_dump($x->format($value)); } catch (TypeError $ex) { - echo $ex->getMessage(), PHP_EOL; + echo $ex::class, ': ', $ex->getMessage(), PHP_EOL; } } ?> --EXPECTF-- -NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given +TypeError: NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given string(1) "1" Deprecated: NumberFormatter::format(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d string(1) "0" -NumberFormatter::format(): Argument #1 ($num) must be of type int|float, NumberFormatter given +TypeError: NumberFormatter::format(): Argument #1 ($num) must be of type int|float, NumberFormatter given diff --git a/ext/intl/tests/bug61487.phpt b/ext/intl/tests/bug61487.phpt index c31738d29b9a..4e05f07fbe42 100644 --- a/ext/intl/tests/bug61487.phpt +++ b/ext/intl/tests/bug61487.phpt @@ -10,15 +10,15 @@ intl try { grapheme_stripos(1,1,2147483648); } catch (ValueError $exception) { - echo $exception->getMessage() . "\n"; + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } try { grapheme_strpos(1,1,2147483648); } catch (ValueError $exception) { - echo $exception->getMessage() . "\n"; + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } ?> --EXPECT-- -grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) diff --git a/ext/intl/tests/bug62083.phpt b/ext/intl/tests/bug62083.phpt index cedab74d43a0..63e79f6865e0 100644 --- a/ext/intl/tests/bug62083.phpt +++ b/ext/intl/tests/bug62083.phpt @@ -8,8 +8,8 @@ $arr1 = array(); try { grapheme_extract(-1, -1, -1,-1, $arr1); } catch (ValueError $exception) { - echo $exception->getMessage() . "\n"; + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } ?> --EXPECT-- -grapheme_extract(): Argument #3 ($type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS +ValueError: grapheme_extract(): Argument #3 ($type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS diff --git a/ext/intl/tests/bug74063.phpt b/ext/intl/tests/bug74063.phpt index b563dea40117..d7fa4e207884 100644 --- a/ext/intl/tests/bug74063.phpt +++ b/ext/intl/tests/bug74063.phpt @@ -8,8 +8,8 @@ $formatter = new NumberFormatter("en_GB", NumberFormatter::CURRENCY); try { serialize($formatter); } catch (Exception $ex) { - echo $ex->getMessage(), PHP_EOL; + echo $ex::class, ': ', $ex->getMessage(), PHP_EOL; } ?> --EXPECT-- -Serialization of 'NumberFormatter' is not allowed +Exception: Serialization of 'NumberFormatter' is not allowed diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt index 8f1695564e94..c1760ce65167 100644 --- a/ext/intl/tests/calendar_clear_error.phpt +++ b/ext/intl/tests/calendar_clear_error.phpt @@ -10,15 +10,15 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->clear(-1)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_clear($c, -1)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::clear(): Argument #1 ($field) must be a valid field -intlcal_clear(): Argument #2 ($field) must be a valid field +ValueError: IntlCalendar::clear(): Argument #1 ($field) must be a valid field +ValueError: intlcal_clear(): Argument #2 ($field) must be a valid field diff --git a/ext/intl/tests/calendar_createInstance_error.phpt b/ext/intl/tests/calendar_createInstance_error.phpt index 28ade19b8fc8..54e8c5afc920 100644 --- a/ext/intl/tests/calendar_createInstance_error.phpt +++ b/ext/intl/tests/calendar_createInstance_error.phpt @@ -12,8 +12,8 @@ function __construct() {} try { intlcal_create_instance(new X, NULL); } catch (IntlException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -intlcal_create_instance(): passed IntlTimeZone is not properly constructed +IntlException: intlcal_create_instance(): passed IntlTimeZone is not properly constructed diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt index fdea44c17fa8..8725ca146be0 100644 --- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt +++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt @@ -9,9 +9,9 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->getDayOfWeekType(0)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::getDayOfWeekType(): Argument #1 ($dayOfWeek) must be a valid day of the week +ValueError: IntlCalendar::getDayOfWeekType(): Argument #1 ($dayOfWeek) must be a valid day of the week diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt index a5e020a6803a..bf15eae336da 100644 --- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt +++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt @@ -10,9 +10,9 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->getWeekendTransition(0)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::getWeekendTransition(): Argument #1 ($dayOfWeek) must be a valid day of the week +ValueError: IntlCalendar::getWeekendTransition(): Argument #1 ($dayOfWeek) must be a valid day of the week diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt index 30365162820c..23634db6bf9c 100644 --- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt +++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt @@ -10,52 +10,52 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->getLeastMaximum(-1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump($c->getMaximum(-1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump($c->getGreatestMinimum(-1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump($c->getMinimum(-1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_get_least_maximum($c, -1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_get_maximum($c, -1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_get_greatest_minimum($c, -1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_get_minimum($c, -1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -ValueError: 0, IntlCalendar::getLeastMaximum(): Argument #1 ($field) must be a valid field -ValueError: 0, IntlCalendar::getMaximum(): Argument #1 ($field) must be a valid field -ValueError: 0, IntlCalendar::getGreatestMinimum(): Argument #1 ($field) must be a valid field -ValueError: 0, IntlCalendar::getMinimum(): Argument #1 ($field) must be a valid field -ValueError: 0, intlcal_get_least_maximum(): Argument #2 ($field) must be a valid field -ValueError: 0, intlcal_get_maximum(): Argument #2 ($field) must be a valid field -ValueError: 0, intlcal_get_greatest_minimum(): Argument #2 ($field) must be a valid field -ValueError: 0, intlcal_get_minimum(): Argument #2 ($field) must be a valid field +ValueError: 0: IntlCalendar::getLeastMaximum(): Argument #1 ($field) must be a valid field +ValueError: 0: IntlCalendar::getMaximum(): Argument #1 ($field) must be a valid field +ValueError: 0: IntlCalendar::getGreatestMinimum(): Argument #1 ($field) must be a valid field +ValueError: 0: IntlCalendar::getMinimum(): Argument #1 ($field) must be a valid field +ValueError: 0: intlcal_get_least_maximum(): Argument #2 ($field) must be a valid field +ValueError: 0: intlcal_get_maximum(): Argument #2 ($field) must be a valid field +ValueError: 0: intlcal_get_greatest_minimum(): Argument #2 ($field) must be a valid field +ValueError: 0: intlcal_get_minimum(): Argument #2 ($field) must be a valid field diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt index 475c06402225..908da9047c36 100644 --- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt +++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt @@ -10,21 +10,21 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->get(-1)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump($c->getActualMaximum(-1)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump($c->getActualMinimum(-1)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::get(): Argument #1 ($field) must be a valid field -IntlCalendar::getActualMaximum(): Argument #1 ($field) must be a valid field -IntlCalendar::getActualMinimum(): Argument #1 ($field) must be a valid field +ValueError: IntlCalendar::get(): Argument #1 ($field) must be a valid field +ValueError: IntlCalendar::getActualMaximum(): Argument #1 ($field) must be a valid field +ValueError: IntlCalendar::getActualMinimum(): Argument #1 ($field) must be a valid field diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt index 10eb7f8029b8..0d87e2d1a756 100644 --- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt +++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt @@ -10,21 +10,21 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump(intlcal_get($c, -1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_get_actual_maximum($c, -1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_get_actual_minimum($c, -1)); } catch (Error $e) { - echo get_class($e) . ': ' . $e->getCode() . ', ' . $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getCode(), ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -ValueError: 0, intlcal_get(): Argument #2 ($field) must be a valid field -ValueError: 0, intlcal_get_actual_maximum(): Argument #2 ($field) must be a valid field -ValueError: 0, intlcal_get_actual_minimum(): Argument #2 ($field) must be a valid field +ValueError: 0: intlcal_get(): Argument #2 ($field) must be a valid field +ValueError: 0: intlcal_get_actual_maximum(): Argument #2 ($field) must be a valid field +ValueError: 0: intlcal_get_actual_minimum(): Argument #2 ($field) must be a valid field diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt index 7f289f073ae0..cde6efa7ea2a 100644 --- a/ext/intl/tests/calendar_isSet_error.phpt +++ b/ext/intl/tests/calendar_isSet_error.phpt @@ -10,9 +10,9 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->isSet(-1)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::isSet(): Argument #1 ($field) must be a valid field +ValueError: IntlCalendar::isSet(): Argument #1 ($field) must be a valid field diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt index 4c05c17a5f81..cfad2e10d215 100644 --- a/ext/intl/tests/calendar_roll_error.phpt +++ b/ext/intl/tests/calendar_roll_error.phpt @@ -10,9 +10,9 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->roll(-1, 2)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::roll(): Argument #1 ($field) must be a valid field +ValueError: IntlCalendar::roll(): Argument #1 ($field) must be a valid field diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt index 6e85207f28d7..d695b66282d9 100644 --- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt @@ -12,16 +12,16 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->setFirstDayOfWeek(0)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_set_first_day_of_week($c, 0)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::setFirstDayOfWeek(): Argument #1 ($dayOfWeek) must be a valid day of the week -intlcal_set_first_day_of_week(): Argument #2 ($dayOfWeek) must be a valid day of the week +ValueError: IntlCalendar::setFirstDayOfWeek(): Argument #1 ($dayOfWeek) must be a valid day of the week +ValueError: intlcal_set_first_day_of_week(): Argument #2 ($dayOfWeek) must be a valid day of the week diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt index dc3bbc9f3ace..fc66632da305 100644 --- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt @@ -10,16 +10,16 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->setMinimalDaysInFirstWeek(0)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_set_minimal_days_in_first_week($c, 0)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::setMinimalDaysInFirstWeek(): Argument #1 ($days) must be between 1 and 7 -intlcal_set_minimal_days_in_first_week(): Argument #2 ($days) must be between 1 and 7 +ValueError: IntlCalendar::setMinimalDaysInFirstWeek(): Argument #1 ($days) must be between 1 and 7 +ValueError: intlcal_set_minimal_days_in_first_week(): Argument #2 ($days) must be between 1 and 7 diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt index 8019c81870da..26faba5bc63e 100644 --- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt @@ -10,15 +10,15 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { var_dump($c->setSkippedWallTimeOption(3)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump($c->setRepeatedWallTimeOption(2)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::setSkippedWallTimeOption(): Argument #1 ($option) must be one of IntlCalendar::WALLTIME_FIRST, IntlCalendar::WALLTIME_LAST, or IntlCalendar::WALLTIME_NEXT_VALID -IntlCalendar::setRepeatedWallTimeOption(): Argument #1 ($option) must be either IntlCalendar::WALLTIME_FIRST or IntlCalendar::WALLTIME_LAST +ValueError: IntlCalendar::setSkippedWallTimeOption(): Argument #1 ($option) must be one of IntlCalendar::WALLTIME_FIRST, IntlCalendar::WALLTIME_LAST, or IntlCalendar::WALLTIME_NEXT_VALID +ValueError: IntlCalendar::setRepeatedWallTimeOption(): Argument #1 ($option) must be either IntlCalendar::WALLTIME_FIRST or IntlCalendar::WALLTIME_LAST diff --git a/ext/intl/tests/calendar_set_date_out_of_bounds.phpt b/ext/intl/tests/calendar_set_date_out_of_bounds.phpt index db9d18275ae8..27a0759793cb 100644 --- a/ext/intl/tests/calendar_set_date_out_of_bounds.phpt +++ b/ext/intl/tests/calendar_set_date_out_of_bounds.phpt @@ -11,22 +11,22 @@ $cal = IntlCalendar::createInstance(); try { $cal->setDate(99999999999, 1, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->setDate(1, 99999999999, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->setDate(1, 1, 99999999999); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::setDate(): Argument #1 ($year) must be between -2147483648 and 2147483647 -IntlCalendar::setDate(): Argument #2 ($month) must be between -2147483648 and 2147483647 -IntlCalendar::setDate(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDate(): Argument #1 ($year) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDate(): Argument #2 ($month) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDate(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 diff --git a/ext/intl/tests/calendar_set_date_time_out_of_bounds.phpt b/ext/intl/tests/calendar_set_date_time_out_of_bounds.phpt index 798ab1ebb01f..fbd7edd178d0 100644 --- a/ext/intl/tests/calendar_set_date_time_out_of_bounds.phpt +++ b/ext/intl/tests/calendar_set_date_time_out_of_bounds.phpt @@ -11,43 +11,43 @@ $cal = IntlCalendar::createInstance(); try { $cal->setDateTime(99999999999, 1, 1, 1, 1, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->setDateTime(1, 99999999999, 1, 1, 1, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->setDateTime(1, 1, 99999999999, 1, 1, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->setDateTime(1, 1, 1, 99999999999, 1, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->setDateTime(1, 1, 1, 1, 99999999999, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->setDateTime(1, 1, 1, 1, 1, 99999999999); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlCalendar::setDateTime(): Argument #1 ($year) must be between -2147483648 and 2147483647 -IntlCalendar::setDateTime(): Argument #2 ($month) must be between -2147483648 and 2147483647 -IntlCalendar::setDateTime(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 -IntlCalendar::setDateTime(): Argument #4 ($hour) must be between -2147483648 and 2147483647 -IntlCalendar::setDateTime(): Argument #5 ($minute) must be between -2147483648 and 2147483647 -IntlCalendar::setDateTime(): Argument #6 ($second) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDateTime(): Argument #1 ($year) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDateTime(): Argument #2 ($month) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDateTime(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDateTime(): Argument #4 ($hour) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDateTime(): Argument #5 ($minute) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::setDateTime(): Argument #6 ($second) must be between -2147483648 and 2147483647 diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index d29442f51950..c295b1861d71 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -10,35 +10,35 @@ $c = new IntlGregorianCalendar(NULL, 'pt_PT'); try { $c->set(1, 2, 3, 4, 5, 6, 7); } catch (ArgumentCountError $exception) { - echo $exception->getMessage() . "\n"; + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } try { $c->set(1, 2, 3, 4); } catch (ArgumentCountError $exception) { - echo $exception->getMessage() . "\n"; + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } try { var_dump($c->set(-1, 2)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlcal_set($c, -1, 2)); } catch (\ValueError $e) { - echo $e->getMessage() . \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d -IntlCalendar::set() expects at most 6 arguments, 7 given +ArgumentCountError: IntlCalendar::set() expects at most 6 arguments, 7 given Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d -IntlCalendar::set() has no variant with exactly 4 parameters -IntlCalendar::set(): Argument #1 ($year) must be a valid field +ArgumentCountError: IntlCalendar::set() has no variant with exactly 4 parameters +ValueError: IntlCalendar::set(): Argument #1 ($year) must be a valid field Deprecated: Function intlcal_set() is deprecated since 8.4, use IntlCalendar::set(), IntlCalendar::setDate(), or IntlCalendar::setDateTime() instead in %s on line %d -intlcal_set(): Argument #2 ($year) must be a valid field +ValueError: intlcal_set(): Argument #2 ($year) must be a valid field diff --git a/ext/intl/tests/calendar_set_out_of_bounds.phpt b/ext/intl/tests/calendar_set_out_of_bounds.phpt index 1ca407d3f713..7c5d4e2339e9 100644 --- a/ext/intl/tests/calendar_set_out_of_bounds.phpt +++ b/ext/intl/tests/calendar_set_out_of_bounds.phpt @@ -11,45 +11,45 @@ $cal = IntlCalendar::createInstance(); try { $cal->set(99999999999, 1, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { intlcal_set($cal, 1, 99999999999, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->set(1, 1, 1, 99999999999, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $cal->set(1, 1, 1, 1, 99999999999, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { intlcal_set($cal, 1, 1, 1, 1, 1, 99999999999); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d -IntlCalendar::set(): Argument #1 ($year) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::set(): Argument #1 ($year) must be between -2147483648 and 2147483647 Deprecated: Function intlcal_set() is deprecated since 8.4, use IntlCalendar::set(), IntlCalendar::setDate(), or IntlCalendar::setDateTime() instead in %s on line %d -intlcal_set(): Argument #3 ($month) must be between -2147483648 and 2147483647 +ValueError: intlcal_set(): Argument #3 ($month) must be between -2147483648 and 2147483647 Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d -IntlCalendar::set(): Argument #4 ($hour) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::set(): Argument #4 ($hour) must be between -2147483648 and 2147483647 Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated, use either IntlCalendar::setDate() or IntlCalendar::setDateTime() instead in %s on line %d -IntlCalendar::set(): Argument #5 ($minute) must be between -2147483648 and 2147483647 +ValueError: IntlCalendar::set(): Argument #5 ($minute) must be between -2147483648 and 2147483647 Deprecated: Function intlcal_set() is deprecated since 8.4, use IntlCalendar::set(), IntlCalendar::setDate(), or IntlCalendar::setDateTime() instead in %s on line %d -intlcal_set(): Argument #7 ($second) must be between -2147483648 and 2147483647 +ValueError: intlcal_set(): Argument #7 ($second) must be between -2147483648 and 2147483647 diff --git a/ext/intl/tests/calendar_uninitialized_argument_position.phpt b/ext/intl/tests/calendar_uninitialized_argument_position.phpt index f92367180549..115fecbfa47d 100644 --- a/ext/intl/tests/calendar_uninitialized_argument_position.phpt +++ b/ext/intl/tests/calendar_uninitialized_argument_position.phpt @@ -12,7 +12,7 @@ foreach (['equals', 'before', 'after', 'isEquivalentTo'] as $method) { try { $calendar->$method($uninitialized); } catch (Error $e) { - echo $method, ': ', $e->getMessage(), PHP_EOL; + echo $method, ': ', $e::class, ': ', $e->getMessage(), PHP_EOL; } } @@ -20,17 +20,17 @@ foreach (['intlcal_equals', 'intlcal_before', 'intlcal_after', 'intlcal_is_equiv try { $function($calendar, $uninitialized); } catch (Error $e) { - echo $function, ': ', $e->getMessage(), PHP_EOL; + echo $function, ': ', $e::class, ': ', $e->getMessage(), PHP_EOL; } } ?> --EXPECT-- -equals: IntlCalendar::equals(): Argument #1 ($other) is uninitialized -before: IntlCalendar::before(): Argument #1 ($other) is uninitialized -after: IntlCalendar::after(): Argument #1 ($other) is uninitialized -isEquivalentTo: IntlCalendar::isEquivalentTo(): Argument #1 ($other) is uninitialized -intlcal_equals: intlcal_equals(): Argument #2 ($other) is uninitialized -intlcal_before: intlcal_before(): Argument #2 ($other) is uninitialized -intlcal_after: intlcal_after(): Argument #2 ($other) is uninitialized -intlcal_is_equivalent_to: intlcal_is_equivalent_to(): Argument #2 ($other) is uninitialized +equals: Error: IntlCalendar::equals(): Argument #1 ($other) is uninitialized +before: Error: IntlCalendar::before(): Argument #1 ($other) is uninitialized +after: Error: IntlCalendar::after(): Argument #1 ($other) is uninitialized +isEquivalentTo: Error: IntlCalendar::isEquivalentTo(): Argument #1 ($other) is uninitialized +intlcal_equals: Error: intlcal_equals(): Argument #2 ($other) is uninitialized +intlcal_before: Error: intlcal_before(): Argument #2 ($other) is uninitialized +intlcal_after: Error: intlcal_after(): Argument #2 ($other) is uninitialized +intlcal_is_equivalent_to: Error: intlcal_is_equivalent_to(): Argument #2 ($other) is uninitialized diff --git a/ext/intl/tests/collator_double_ctor.phpt b/ext/intl/tests/collator_double_ctor.phpt index 93b72f7392b3..f676ccb4aa03 100644 --- a/ext/intl/tests/collator_double_ctor.phpt +++ b/ext/intl/tests/collator_double_ctor.phpt @@ -9,8 +9,8 @@ $collator = new Collator('en_US'); try { $collator->__construct('en_US'); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Collator object is already constructed +Error: Collator object is already constructed diff --git a/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt b/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt index e33464a40a44..0ca58a80a01d 100644 --- a/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt +++ b/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt @@ -8,21 +8,20 @@ intl try { var_dump(new IntlDateFormatter(NULL, 0, 0, 'bad timezone')); } catch (Throwable $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, 3)); } catch (Throwable $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, new stdclass)); } catch (Throwable $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- IntlException: IntlDateFormatter::__construct(): No such time zone: "bad timezone" IntlException: IntlDateFormatter::__construct(): Invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object TypeError: IntlDateFormatter::__construct(): Argument #5 ($calendar) must be of type IntlCalendar|int|null, stdClass given - diff --git a/ext/intl/tests/dateformat_formatObject_error.phpt b/ext/intl/tests/dateformat_formatObject_error.phpt index b38a379b9f5a..eeb9abd70733 100644 --- a/ext/intl/tests/dateformat_formatObject_error.phpt +++ b/ext/intl/tests/dateformat_formatObject_error.phpt @@ -18,7 +18,7 @@ try { var_dump(IntlDateFormatter::formatObject(new B)); var_dump(intl_get_error_message()); } catch (Throwable $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump(IntlDateFormatter::formatObject(new stdclass)); diff --git a/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt b/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt index d34c93bfb369..b2b4cbf9030c 100644 --- a/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt +++ b/ext/intl/tests/dateformat_get_set_calendar_variant_icu70.phpt @@ -52,4 +52,3 @@ dimanche 1 janvier 2012 ap. J.-C. à 00:00:00 temps universel coordonné bool(false) string(9) "gregorian" string(3) "UTC" - diff --git a/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt b/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt index 428e67fc24e3..8c5d9c32961b 100644 --- a/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt +++ b/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt @@ -55,4 +55,3 @@ string(12) "Europe/Paris" domingo, 1 de janeiro de 2012 às 01:00:00 Hor%s padrão %Sda Europa Central string(16) "Europe/Amsterdam" string(16) "Europe/Amsterdam" - diff --git a/ext/intl/tests/dateformat_set_timezone_id_icu72-1.phpt b/ext/intl/tests/dateformat_set_timezone_id_icu72-1.phpt index 6424ba1e6b40..c26327c1f9d5 100644 --- a/ext/intl/tests/dateformat_set_timezone_id_icu72-1.phpt +++ b/ext/intl/tests/dateformat_set_timezone_id_icu72-1.phpt @@ -37,7 +37,7 @@ function ut_main() try { ut_datefmt_set_timezone_id( $fmt , $timezone_id_entry ); } catch (IntlException $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $timezone_id = ut_datefmt_get_timezone_id( $fmt ); $res_str .= "\nAfter call to set_timezone_id : timezone_id= $timezone_id"; diff --git a/ext/intl/tests/formatter_format_and_parse_errors.phpt b/ext/intl/tests/formatter_format_and_parse_errors.phpt index e2d1cde89133..a99df84f7242 100644 --- a/ext/intl/tests/formatter_format_and_parse_errors.phpt +++ b/ext/intl/tests/formatter_format_and_parse_errors.phpt @@ -13,61 +13,61 @@ $str = "string"; try { numfmt_format($o, $num, -20); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $o->format($num, -20); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { numfmt_parse($o, $str, -20); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $o->parse($str, -20); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } /* With NumberFormatter::TYPE_CURRENCY */ try { numfmt_format($o, $num, NumberFormatter::TYPE_CURRENCY); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $o->format($num, NumberFormatter::TYPE_CURRENCY); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { numfmt_parse($o, $str, NumberFormatter::TYPE_CURRENCY); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $o->parse($str, NumberFormatter::TYPE_CURRENCY); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -numfmt_format(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant -NumberFormatter::format(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant -numfmt_parse(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant -NumberFormatter::parse(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant +ValueError: numfmt_format(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant +ValueError: NumberFormatter::format(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant +ValueError: numfmt_parse(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant +ValueError: NumberFormatter::parse(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d -numfmt_format(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_format_currency() function instead +ValueError: numfmt_format(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_format_currency() function instead Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d -NumberFormatter::format(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use NumberFormatter::formatCurrency() method instead +ValueError: NumberFormatter::format(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use NumberFormatter::formatCurrency() method instead Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d -numfmt_parse(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_parse_currency() function instead +ValueError: numfmt_parse(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_parse_currency() function instead Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d -NumberFormatter::parse(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use NumberFormatter::parseCurrency() method instead +ValueError: NumberFormatter::parse(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use NumberFormatter::parseCurrency() method instead diff --git a/ext/intl/tests/formatter_format_decimal_compact.phpt b/ext/intl/tests/formatter_format_decimal_compact.phpt index 2c78f8787e0f..cb2d88f1181c 100644 --- a/ext/intl/tests/formatter_format_decimal_compact.phpt +++ b/ext/intl/tests/formatter_format_decimal_compact.phpt @@ -54,4 +54,4 @@ uk: long = 1,2 мільйона en: short = 1.2M en: long = 1.2 million bg: short = 1,2 млн. -bg: long = 1,2 милиона \ No newline at end of file +bg: long = 1,2 милиона diff --git a/ext/intl/tests/gh12243.phpt b/ext/intl/tests/gh12243.phpt index 324ed9a65661..b1b1014c5d8f 100644 --- a/ext/intl/tests/gh12243.phpt +++ b/ext/intl/tests/gh12243.phpt @@ -16,9 +16,9 @@ try { timezone: $datetime->getTimezone(), ); } catch (\IntlException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlDateFormatter::__construct(): datefmt_create: time format must be IntlDateFormatter::PATTERN if date format is IntlDateFormatter::PATTERN +IntlException: IntlDateFormatter::__construct(): datefmt_create: time format must be IntlDateFormatter::PATTERN if date format is IntlDateFormatter::PATTERN diff --git a/ext/intl/tests/gh12282.phpt b/ext/intl/tests/gh12282.phpt index b12dc655f705..421e6abb188d 100644 --- a/ext/intl/tests/gh12282.phpt +++ b/ext/intl/tests/gh12282.phpt @@ -15,15 +15,15 @@ try { 'w' ); } catch (\ValueError $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } Locale::setDefault('xx'); try { new IntlDateFormatter(Locale::getDefault()); } catch (\ValueError $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } --EXPECT-- -IntlDateFormatter::__construct(): Argument #1 ($locale) "xx" is invalid -IntlDateFormatter::__construct(): Argument #1 ($locale) "xx" is invalid +ValueError: IntlDateFormatter::__construct(): Argument #1 ($locale) "xx" is invalid +ValueError: IntlDateFormatter::__construct(): Argument #1 ($locale) "xx" is invalid diff --git a/ext/intl/tests/gh12727.phpt b/ext/intl/tests/gh12727.phpt index e04b5eb26a12..61746a9374b7 100644 --- a/ext/intl/tests/gh12727.phpt +++ b/ext/intl/tests/gh12727.phpt @@ -8,8 +8,8 @@ intl try { new NumberFormatter('xx', NumberFormatter::DECIMAL); } catch (ValueError $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -NumberFormatter::__construct(): Argument #1 ($locale) "%s" is invalid +ValueError: NumberFormatter::__construct(): Argument #1 ($locale) "%s" is invalid diff --git a/ext/intl/tests/gh13766.phpt b/ext/intl/tests/gh13766.phpt index 9ed8d985de47..f9119c4abc0b 100644 --- a/ext/intl/tests/gh13766.phpt +++ b/ext/intl/tests/gh13766.phpt @@ -17,19 +17,19 @@ $offset3 = "offset"; try { $oIntlDateFormatter->parseToCalendar('America/Los_Angeles', $offset3); } catch (\TypeError $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $offset3 = PHP_INT_MAX * 16; try { $oIntlDateFormatter->parseToCalendar('America/Los_Angeles', $offset3); } catch (\ValueError $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } --EXPECTF-- int(%d) string(13) "Europe/Berlin" int(%d) string(19) "America/Los_Angeles" -IntlDateFormatter::parseToCalendar(): Argument #2 ($offset) must be of type int, string given +TypeError: IntlDateFormatter::parseToCalendar(): Argument #2 ($offset) must be of type int, string given Warning: The float %r(1\.4757395258967641E\+20|34359738352)%r is not representable as an int, cast occurred in %s on line %d diff --git a/ext/intl/tests/gh17469.phpt b/ext/intl/tests/gh17469.phpt index 5a2263684422..13108a7a140f 100644 --- a/ext/intl/tests/gh17469.phpt +++ b/ext/intl/tests/gh17469.phpt @@ -19,12 +19,12 @@ ini_set("intl.use_exceptions", 1); try { UConverter::transcode("\x0a", 'nein!!', 'UTF-8'); } catch (IntlException $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { UConverter::transcode("\x0a", 'UTF-16BE', 'da!'); } catch (IntlException $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- @@ -33,5 +33,5 @@ Deprecated: ini_set(): Using a value different than 0 for intl.error_level is de Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in %s on line %d Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in %s on line %d -UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR -UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR +IntlException: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR +IntlException: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR diff --git a/ext/intl/tests/grapheme_levenshtein.phpt b/ext/intl/tests/grapheme_levenshtein.phpt index 37978f422363..5c8bce5d5d50 100644 --- a/ext/intl/tests/grapheme_levenshtein.phpt +++ b/ext/intl/tests/grapheme_levenshtein.phpt @@ -74,19 +74,19 @@ echo '--- Corner case ---' . PHP_EOL; try { grapheme_levenshtein($nabe, $nabe_E0100, 0, 1, 1); } catch (ValueError $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { grapheme_levenshtein($nabe, $nabe_E0100, 1, 0, 1); } catch (ValueError $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { grapheme_levenshtein($nabe, $nabe_E0100, 1, 1, 0); } catch (ValueError $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "--- Invalid locales ---\n"; @@ -138,9 +138,9 @@ int(0) int(1) int(0) --- Corner case --- -grapheme_levenshtein(): Argument #3 ($insertion_cost) must be greater than 0 and less than or equal to %d -grapheme_levenshtein(): Argument #4 ($replacement_cost) must be greater than 0 and less than or equal to %d -grapheme_levenshtein(): Argument #5 ($deletion_cost) must be greater than 0 and less than or equal to %d +ValueError: grapheme_levenshtein(): Argument #3 ($insertion_cost) must be greater than 0 and less than or equal to %d +ValueError: grapheme_levenshtein(): Argument #4 ($replacement_cost) must be greater than 0 and less than or equal to %d +ValueError: grapheme_levenshtein(): Argument #5 ($deletion_cost) must be greater than 0 and less than or equal to %d --- Invalid locales --- bool(false) int(%d) diff --git a/ext/intl/tests/grapheme_out_of_bounds.phpt b/ext/intl/tests/grapheme_out_of_bounds.phpt index 286cb68b7d34..5a090d9e1aa9 100644 --- a/ext/intl/tests/grapheme_out_of_bounds.phpt +++ b/ext/intl/tests/grapheme_out_of_bounds.phpt @@ -38,42 +38,42 @@ echo "\n"; try { var_dump(grapheme_strpos("foo", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_stripos("foo", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strrpos("foo", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strripos("foo", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strpos("äöü", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_stripos("äöü", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strrpos("äöü", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strripos("äöü", "bar", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "\n"; @@ -81,42 +81,42 @@ echo "\n"; try { var_dump(grapheme_strpos("foo", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_stripos("foo", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strrpos("foo", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strripos("foo", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strpos("äöü", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_stripos("äöü", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strrpos("äöü", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strripos("äöü", "bar", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "\n"; @@ -124,42 +124,42 @@ echo "\n"; try { var_dump(grapheme_strpos("äöü", "", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_stripos("äöü", "", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strrpos("äöü", "", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strripos("äöü", "", 4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strpos("äöü", "", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_stripos("äöü", "", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strrpos("äöü", "", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(grapheme_strripos("äöü", "", -4)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "\n"; @@ -208,32 +208,32 @@ bool(false) bool(false) bool(false) -grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) +ValueError: grapheme_strripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) string(0) "" string(3) "foo" diff --git a/ext/intl/tests/gregoriancalendar___construct_error.phpt b/ext/intl/tests/gregoriancalendar___construct_error.phpt index 6922b7cadd8c..ef58b6fc70a8 100644 --- a/ext/intl/tests/gregoriancalendar___construct_error.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_error.phpt @@ -8,49 +8,49 @@ intl try { var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7)); } catch (ArgumentCountError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7,8)); } catch (ArgumentCountError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(intlgregcal_create_instance(1,2,3,4)); } catch (ArgumentCountError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(new IntlGregorianCalendar(1,2,NULL,4)); } catch (ArgumentCountError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(new IntlGregorianCalendar(1,2,3,4,5,array())); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $cal = new IntlGregorianCalendar(); try { $cal->__construct(); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -Too many arguments +ArgumentCountError: Too many arguments Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -Too many arguments +ArgumentCountError: Too many arguments Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -No variant with 4 arguments (excluding trailing NULLs) +ArgumentCountError: No variant with 4 arguments (excluding trailing NULLs) Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -No variant with 4 arguments (excluding trailing NULLs) +ArgumentCountError: No variant with 4 arguments (excluding trailing NULLs) Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -IntlGregorianCalendar::__construct(): Argument #6 ($second) must be of type int, array given -IntlGregorianCalendar object is already constructed +TypeError: IntlGregorianCalendar::__construct(): Argument #6 ($second) must be of type int, array given +Error: IntlGregorianCalendar object is already constructed diff --git a/ext/intl/tests/gregoriancalendar___construct_out_of_bounds.phpt b/ext/intl/tests/gregoriancalendar___construct_out_of_bounds.phpt index 5b084b25d869..237d4de7d2d5 100644 --- a/ext/intl/tests/gregoriancalendar___construct_out_of_bounds.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_out_of_bounds.phpt @@ -9,45 +9,45 @@ intl try { new IntlGregorianCalendar(99999999999, 1, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { intlgregcal_create_instance(1, 99999999999, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new IntlGregorianCalendar(1, 1, 1, 99999999999, 1); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new IntlGregorianCalendar(1, 1, 1, 1, 99999999999); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { intlgregcal_create_instance(1, 1, 1, 1, 1, 99999999999); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -IntlGregorianCalendar::__construct(): Argument #1 ($timezoneOrYear) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::__construct(): Argument #1 ($timezoneOrYear) must be between -2147483648 and 2147483647 Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -intlgregcal_create_instance(): Argument #2 ($localeOrMonth) must be between -2147483648 and 2147483647 +ValueError: intlgregcal_create_instance(): Argument #2 ($localeOrMonth) must be between -2147483648 and 2147483647 Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -IntlGregorianCalendar::__construct(): Argument #4 ($hour) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::__construct(): Argument #4 ($hour) must be between -2147483648 and 2147483647 Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -IntlGregorianCalendar::__construct(): Argument #5 ($minute) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::__construct(): Argument #5 ($minute) must be between -2147483648 and 2147483647 Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4, use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d -intlgregcal_create_instance(): Argument #6 ($second) must be between -2147483648 and 2147483647 +ValueError: intlgregcal_create_instance(): Argument #6 ($second) must be between -2147483648 and 2147483647 diff --git a/ext/intl/tests/gregoriancalendar_set_date_error.phpt b/ext/intl/tests/gregoriancalendar_set_date_error.phpt index 154f598d8dff..1a10a68577d2 100644 --- a/ext/intl/tests/gregoriancalendar_set_date_error.phpt +++ b/ext/intl/tests/gregoriancalendar_set_date_error.phpt @@ -9,23 +9,23 @@ intl try { var_dump(IntlGregorianCalendar::createFromDate(99999999999, 1, 1)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(IntlGregorianCalendar::createFromDate(1, 99999999999, 1)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(IntlGregorianCalendar::createFromDate(1, 1, 99999999999)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlGregorianCalendar::createFromDate(): Argument #1 ($year) must be between -2147483648 and 2147483647 -IntlGregorianCalendar::createFromDate(): Argument #2 ($month) must be between -2147483648 and 2147483647 -IntlGregorianCalendar::createFromDate(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDate(): Argument #1 ($year) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDate(): Argument #2 ($month) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDate(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 diff --git a/ext/intl/tests/gregoriancalendar_set_date_time_error.phpt b/ext/intl/tests/gregoriancalendar_set_date_time_error.phpt index 4fcfa4a1ffbc..0cdba38451f6 100644 --- a/ext/intl/tests/gregoriancalendar_set_date_time_error.phpt +++ b/ext/intl/tests/gregoriancalendar_set_date_time_error.phpt @@ -9,44 +9,44 @@ intl try { var_dump(IntlGregorianCalendar::createFromDateTime(99999999999, 1, 1, 1, 1, 1)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(IntlGregorianCalendar::createFromDateTime(1, 99999999999, 1, 1, 1, 1)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(IntlGregorianCalendar::createFromDateTime(1, 1, 99999999999, 1, 1, 1)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(IntlGregorianCalendar::createFromDateTime(1, 1, 1, 99999999999, 1, 1)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(IntlGregorianCalendar::createFromDateTime(1, 1, 1, 1, 99999999999, 1)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(IntlGregorianCalendar::createFromDateTime(1, 1, 1, 1, 1, 99999999999)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlGregorianCalendar::createFromDateTime(): Argument #1 ($year) must be between -2147483648 and 2147483647 -IntlGregorianCalendar::createFromDateTime(): Argument #2 ($month) must be between -2147483648 and 2147483647 -IntlGregorianCalendar::createFromDateTime(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 -IntlGregorianCalendar::createFromDateTime(): Argument #4 ($hour) must be between -2147483648 and 2147483647 -IntlGregorianCalendar::createFromDateTime(): Argument #5 ($minute) must be between -2147483648 and 2147483647 -IntlGregorianCalendar::createFromDateTime(): Argument #6 ($second) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDateTime(): Argument #1 ($year) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDateTime(): Argument #2 ($month) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDateTime(): Argument #3 ($dayOfMonth) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDateTime(): Argument #4 ($hour) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDateTime(): Argument #5 ($minute) must be between -2147483648 and 2147483647 +ValueError: IntlGregorianCalendar::createFromDateTime(): Argument #6 ($second) must be between -2147483648 and 2147483647 diff --git a/ext/intl/tests/ini_use_exceptions_basic.phpt b/ext/intl/tests/ini_use_exceptions_basic.phpt index e03c991ae05f..f34782780280 100644 --- a/ext/intl/tests/ini_use_exceptions_basic.phpt +++ b/ext/intl/tests/ini_use_exceptions_basic.phpt @@ -9,14 +9,14 @@ $t = transliterator_create('any-hex'); try { var_dump($t->transliterate('a', 3)); } catch (IntlException $intlE) { - var_dump($intlE->getMessage()); + echo $intlE::class, ': ', $intlE->getMessage(), PHP_EOL; } ini_set("intl.use_exceptions", false); ini_set("intl.error_level", E_NOTICE); var_dump($t->transliterate('a', 3)); ?> --EXPECTF-- -string(133) "Transliterator::transliterate(): Neither "start" nor the "end" arguments can exceed the number of UTF-16 code units (in this case, 1)" +IntlException: Transliterator::transliterate(): Neither "start" nor the "end" arguments can exceed the number of UTF-16 code units (in this case, 1) Deprecated: ini_set(): Using a value different than 0 for intl.error_level is deprecated, as the intl.error_level INI setting is deprecated. Instead the intl.use_exceptions INI setting should be enabled to throw exceptions on errors or intl_get_error_code()/intl_get_error_message() should be used to manually deal with errors in %s on line %d diff --git a/ext/intl/tests/listformatter/listformatter_clone.phpt b/ext/intl/tests/listformatter/listformatter_clone.phpt index ce7ce99aef45..e80fd4ff4981 100644 --- a/ext/intl/tests/listformatter/listformatter_clone.phpt +++ b/ext/intl/tests/listformatter/listformatter_clone.phpt @@ -14,8 +14,8 @@ $formatter = new IntlListFormatter('en_US', IntlListFormatter::TYPE_AND, IntlLis try { $clonedFormatter = clone $formatter; } catch(Error $error) { - echo $error->getMessage(); + echo $error::class, ': ', $error->getMessage(), PHP_EOL; } ?> --EXPECT-- -Trying to clone an uncloneable object of class IntlListFormatter +Error: Trying to clone an uncloneable object of class IntlListFormatter diff --git a/ext/intl/tests/listformatter/listformatter_double_ctor.phpt b/ext/intl/tests/listformatter/listformatter_double_ctor.phpt index f8b0ca1e1633..1de61e76c392 100644 --- a/ext/intl/tests/listformatter/listformatter_double_ctor.phpt +++ b/ext/intl/tests/listformatter/listformatter_double_ctor.phpt @@ -9,8 +9,8 @@ $formatter = new IntlListFormatter('en_US'); try { $formatter->__construct('en_US'); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlListFormatter object is already constructed +Error: IntlListFormatter object is already constructed diff --git a/ext/intl/tests/listformatter/listformatter_error.phpt b/ext/intl/tests/listformatter/listformatter_error.phpt index 4ca22136943e..db065456d02c 100644 --- a/ext/intl/tests/listformatter/listformatter_error.phpt +++ b/ext/intl/tests/listformatter/listformatter_error.phpt @@ -8,13 +8,13 @@ intl try { $formatter = new IntlListFormatter('f', IntlListFormatter::TYPE_AND, IntlListFormatter::WIDTH_WIDE); } catch(ValueError $exception) { - echo $exception->getMessage() . PHP_EOL; + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } try { $formatter = new IntlListFormatter('ro_thisiswaytooooooooooooooooooooooooooooooooooooooooooooolongtobevaliditneedstobeatleast157characterstofailthevalidationinthelistformattercodeimplementation', IntlListFormatter::TYPE_AND, IntlListFormatter::WIDTH_WIDE); } catch(ValueError $exception) { - echo $exception->getMessage() . PHP_EOL; + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } $formatter = new IntlListFormatter('ro', IntlListFormatter::TYPE_AND, IntlListFormatter::WIDTH_WIDE); @@ -22,17 +22,17 @@ $formatter = new IntlListFormatter('ro', IntlListFormatter::TYPE_AND, IntlListFo try { echo $formatter->format([new stdClass()]); } catch(Error $error) { - echo $error->getMessage() . PHP_EOL; + echo $error::class, ': ', $error->getMessage(), PHP_EOL; } try { echo $formatter->format([1, 2, new stdClass(), 4]); } catch(Error $error) { - echo $error->getMessage() . PHP_EOL; + echo $error::class, ': ', $error->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlListFormatter::__construct(): Argument #1 ($locale) "f" is invalid -IntlListFormatter::__construct(): Argument #1 ($locale) must be less than or equal to 156 characters -Object of class stdClass could not be converted to string -Object of class stdClass could not be converted to string +ValueError: IntlListFormatter::__construct(): Argument #1 ($locale) "f" is invalid +ValueError: IntlListFormatter::__construct(): Argument #1 ($locale) must be less than or equal to 156 characters +Error: Object of class stdClass could not be converted to string +Error: Object of class stdClass could not be converted to string diff --git a/ext/intl/tests/listformatter/listformatter_with_parameters_error.phpt b/ext/intl/tests/listformatter/listformatter_with_parameters_error.phpt index bfa75e7399bb..1ae3ba6c8d1d 100644 --- a/ext/intl/tests/listformatter/listformatter_with_parameters_error.phpt +++ b/ext/intl/tests/listformatter/listformatter_with_parameters_error.phpt @@ -10,17 +10,17 @@ intl try { $formatter = new IntlListFormatter('ro', 23232323); } catch(ValueError $exception) { - echo $exception->getMessage(); + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } -echo PHP_EOL; + try { $formatter = new IntlListFormatter('ro', IntlListFormatter::TYPE_AND, 2323232); } catch(ValueError $exception) { - echo $exception->getMessage(); + echo $exception::class, ': ', $exception->getMessage(), PHP_EOL; } ?> --EXPECT-- -IntlListFormatter::__construct(): Argument #2 ($type) must be one of IntlListFormatter::TYPE_AND, IntlListFormatter::TYPE_OR, or IntlListFormatter::TYPE_UNITS -IntlListFormatter::__construct(): Argument #3 ($width) must be one of IntlListFormatter::WIDTH_WIDE, IntlListFormatter::WIDTH_SHORT, or IntlListFormatter::WIDTH_NARROW +ValueError: IntlListFormatter::__construct(): Argument #2 ($type) must be one of IntlListFormatter::TYPE_AND, IntlListFormatter::TYPE_OR, or IntlListFormatter::TYPE_UNITS +ValueError: IntlListFormatter::__construct(): Argument #3 ($width) must be one of IntlListFormatter::WIDTH_WIDE, IntlListFormatter::WIDTH_SHORT, or IntlListFormatter::WIDTH_NARROW diff --git a/ext/intl/tests/locale_filter_matches_icu70.phpt b/ext/intl/tests/locale_filter_matches_icu70.phpt index 0e0b16af1760..cc7cb0c302f4 100644 --- a/ext/intl/tests/locale_filter_matches_icu70.phpt +++ b/ext/intl/tests/locale_filter_matches_icu70.phpt @@ -72,13 +72,13 @@ function ut_main() try { ut_loc_locale_filter_matches("de\0-DE", "de-DE", false); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { ut_loc_locale_filter_matches("de-DE", "d\0e-DE", false); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $res_str .= "\n"; @@ -91,10 +91,10 @@ ut_run(); ?> --EXPECT-- -Locale::filterMatches(): Argument #1 ($languageTag) must not contain any null bytes -Locale::filterMatches(): Argument #2 ($locale) must not contain any null bytes -locale_filter_matches(): Argument #1 ($languageTag) must not contain any null bytes -locale_filter_matches(): Argument #2 ($locale) must not contain any null bytes +ValueError: Locale::filterMatches(): Argument #1 ($languageTag) must not contain any null bytes +ValueError: Locale::filterMatches(): Argument #2 ($locale) must not contain any null bytes +ValueError: locale_filter_matches(): Argument #1 ($languageTag) must not contain any null bytes +ValueError: locale_filter_matches(): Argument #2 ($locale) must not contain any null bytes -------------- loc_range:de-de matches lang_tag de-DEVA ? NO loc_range:de_DE canonically matches lang_tag de_Deva ? NO diff --git a/ext/intl/tests/locale_get_all_variants.phpt b/ext/intl/tests/locale_get_all_variants.phpt index 12bf82cacac0..ea2ebc432e02 100644 --- a/ext/intl/tests/locale_get_all_variants.phpt +++ b/ext/intl/tests/locale_get_all_variants.phpt @@ -42,7 +42,7 @@ function ut_main() try { ut_loc_locale_get_all_variants("i-\0tay"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $res_str .= "\n"; @@ -55,8 +55,8 @@ ut_run(); ?> --EXPECT-- -Locale::getAllVariants(): Argument #1 ($locale) must not contain any null bytes -locale_get_all_variants(): Argument #1 ($locale) must not contain any null bytes +ValueError: Locale::getAllVariants(): Argument #1 ($locale) must not contain any null bytes +ValueError: locale_get_all_variants(): Argument #1 ($locale) must not contain any null bytes sl_IT_nedis_KIRTI : variants 'NEDIS','KIRTI', sl_IT_nedis-a-kirti-x-xyz : variants 'NEDIS', sl_IT_rozaj : variants 'ROZAJ', diff --git a/ext/intl/tests/locale_get_display_language4.phpt b/ext/intl/tests/locale_get_display_language4.phpt index 1273c4a99968..bf3c76709358 100644 --- a/ext/intl/tests/locale_get_display_language4.phpt +++ b/ext/intl/tests/locale_get_display_language4.phpt @@ -10,20 +10,20 @@ function ut_main() try { ut_loc_get_display_language("a-D\0E", "locale=a-DE"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { ut_loc_get_display_language("a-DE", "locale=a\0-DE"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } } include_once 'ut_common.inc'; ut_run(); ?> --EXPECT-- -Locale::getDisplayLanguage(): Argument #1 ($locale) must not contain any null bytes -Locale::getDisplayLanguage(): Argument #2 ($displayLocale) must not contain any null bytes -locale_get_display_language(): Argument #1 ($locale) must not contain any null bytes -locale_get_display_language(): Argument #2 ($displayLocale) must not contain any null bytes +ValueError: Locale::getDisplayLanguage(): Argument #1 ($locale) must not contain any null bytes +ValueError: Locale::getDisplayLanguage(): Argument #2 ($displayLocale) must not contain any null bytes +ValueError: locale_get_display_language(): Argument #1 ($locale) must not contain any null bytes +ValueError: locale_get_display_language(): Argument #2 ($displayLocale) must not contain any null bytes diff --git a/ext/intl/tests/locale_get_display_script4.phpt b/ext/intl/tests/locale_get_display_script4.phpt index 533052933026..c26b67a8d982 100644 --- a/ext/intl/tests/locale_get_display_script4.phpt +++ b/ext/intl/tests/locale_get_display_script4.phpt @@ -86,13 +86,13 @@ function ut_main() try { ut_loc_get_display_script("a-D\0E", "locale=a-DE"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { ut_loc_get_display_script("a-DE", "locale=a\0-DE"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } return $res_str; @@ -104,10 +104,10 @@ ut_run(); ?> --EXPECT-- -Locale::getDisplayScript(): Argument #1 ($locale) must not contain any null bytes -Locale::getDisplayScript(): Argument #2 ($displayLocale) must not contain any null bytes -locale_get_display_script(): Argument #1 ($locale) must not contain any null bytes -locale_get_display_script(): Argument #2 ($displayLocale) must not contain any null bytes +ValueError: Locale::getDisplayScript(): Argument #1 ($locale) must not contain any null bytes +ValueError: Locale::getDisplayScript(): Argument #2 ($displayLocale) must not contain any null bytes +ValueError: locale_get_display_script(): Argument #1 ($locale) must not contain any null bytes +ValueError: locale_get_display_script(): Argument #2 ($displayLocale) must not contain any null bytes locale='uk-ua_CALIFORNIA@currency=;currency=GRN' disp_locale=en : display_script= disp_locale=fr : display_script= diff --git a/ext/intl/tests/locale_get_region.phpt b/ext/intl/tests/locale_get_region.phpt index 0c3c1655deb3..a6c26e899029 100644 --- a/ext/intl/tests/locale_get_region.phpt +++ b/ext/intl/tests/locale_get_region.phpt @@ -79,7 +79,7 @@ function ut_main() try { ut_loc_get_region("a-\0DE"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } return $res_str; @@ -91,8 +91,8 @@ ut_run(); ?> --EXPECTF-- -Locale::getRegion(): Argument #1 ($locale) must not contain any null bytes -locale_get_region(): Argument #1 ($locale) must not contain any null bytes +ValueError: Locale::getRegion(): Argument #1 ($locale) must not contain any null bytes +ValueError: locale_get_region(): Argument #1 ($locale) must not contain any null bytes uk-ua_CALIFORNIA@currency=;currency=GRN: region='UA' root: region='' uk@currency=EURO: region='' diff --git a/ext/intl/tests/locale_get_script.phpt b/ext/intl/tests/locale_get_script.phpt index 52e0a4155a97..efd67b2550e9 100644 --- a/ext/intl/tests/locale_get_script.phpt +++ b/ext/intl/tests/locale_get_script.phpt @@ -77,7 +77,7 @@ function ut_main() try { ut_loc_get_script("de\0-419-DE"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } return $res_str; @@ -89,8 +89,8 @@ ut_run(); ?> --EXPECT-- -Locale::getScript(): Argument #1 ($locale) must not contain any null bytes -locale_get_script(): Argument #1 ($locale) must not contain any null bytes +ValueError: Locale::getScript(): Argument #1 ($locale) must not contain any null bytes +ValueError: locale_get_script(): Argument #1 ($locale) must not contain any null bytes uk-ua_CALIFORNIA@currency=;currency=GRN: script='' root: script='' uk@currency=EURO: script='' diff --git a/ext/intl/tests/locale_is_right_to_left.phpt b/ext/intl/tests/locale_is_right_to_left.phpt index c9e4323ff744..d1dfd1c50f67 100644 --- a/ext/intl/tests/locale_is_right_to_left.phpt +++ b/ext/intl/tests/locale_is_right_to_left.phpt @@ -11,7 +11,7 @@ var_dump(Locale::isRightToLeft("ar")); try { Locale::isRightToLeft("a\0r"); } catch (\ValueError $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- @@ -19,4 +19,4 @@ bool(false) bool(false) bool(false) bool(true) -Locale::isRightToLeft(): Argument #1 ($locale) must not contain any null bytes +ValueError: Locale::isRightToLeft(): Argument #1 ($locale) must not contain any null bytes diff --git a/ext/intl/tests/locale_lookup_invalid_language_tag.phpt b/ext/intl/tests/locale_lookup_invalid_language_tag.phpt index 3ba48f61334b..2891617e2601 100644 --- a/ext/intl/tests/locale_lookup_invalid_language_tag.phpt +++ b/ext/intl/tests/locale_lookup_invalid_language_tag.phpt @@ -16,13 +16,13 @@ ini_set('intl.use_exceptions', '1'); try { Locale::lookup([''], 'de-DE', false, 'en-US'); } catch (IntlException $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { locale_lookup([''], 'de-DE', false, 'en-US'); } catch (IntlException $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -31,5 +31,5 @@ NULL string(75) "Locale::lookup(): unable to canonicalize lang_tag: U_ILLEGAL_ARGUMENT_ERROR" NULL string(74) "locale_lookup(): unable to canonicalize lang_tag: U_ILLEGAL_ARGUMENT_ERROR" -Locale::lookup(): unable to canonicalize lang_tag -locale_lookup(): unable to canonicalize lang_tag +IntlException: Locale::lookup(): unable to canonicalize lang_tag +IntlException: locale_lookup(): unable to canonicalize lang_tag diff --git a/ext/intl/tests/locale_lookup_variant3.phpt b/ext/intl/tests/locale_lookup_variant3.phpt index b13a54139f44..b2f3d4af7bb4 100644 --- a/ext/intl/tests/locale_lookup_variant3.phpt +++ b/ext/intl/tests/locale_lookup_variant3.phpt @@ -62,19 +62,19 @@ function ut_main() try { ut_loc_locale_lookup(["de\0-DE"], "de-DE", false, "en-US"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { ut_loc_locale_lookup(["de-DE"], "de-D\0E", true, "en-US"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { ut_loc_locale_lookup(["de-DE"], "de-DE", true, "e\0n-US"); } catch (\ValueError $e) { - echo $e->getMessage(). PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $res_str .= "\n"; @@ -87,12 +87,12 @@ ut_run(); ?> --EXPECT-- -Locale::lookup(): Argument #2 ($locale) must not contain any null bytes -Locale::lookup(): Argument #2 ($locale) must not contain any null bytes -Locale::lookup(): Argument #4 ($defaultLocale) must not contain any null bytes -locale_lookup(): Argument #2 ($locale) must not contain any null bytes -locale_lookup(): Argument #2 ($locale) must not contain any null bytes -locale_lookup(): Argument #4 ($defaultLocale) must not contain any null bytes +ValueError: Locale::lookup(): Argument #2 ($locale) must not contain any null bytes +ValueError: Locale::lookup(): Argument #2 ($locale) must not contain any null bytes +ValueError: Locale::lookup(): Argument #4 ($defaultLocale) must not contain any null bytes +ValueError: locale_lookup(): Argument #2 ($locale) must not contain any null bytes +ValueError: locale_lookup(): Argument #2 ($locale) must not contain any null bytes +ValueError: locale_lookup(): Argument #4 ($defaultLocale) must not contain any null bytes -------------- loc_range:de-de lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 diff --git a/ext/intl/tests/locale_set_default.phpt b/ext/intl/tests/locale_set_default.phpt index 6108f370274b..c4aaf824bcab 100644 --- a/ext/intl/tests/locale_set_default.phpt +++ b/ext/intl/tests/locale_set_default.phpt @@ -89,7 +89,7 @@ function ut_main() try { ut_loc_set_default("a-\0DE"); } catch (\ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } return $res_str; @@ -101,8 +101,8 @@ ut_run(); ?> --EXPECT-- -Locale::setDefault(): Argument #1 ($locale) must not contain any null bytes -locale_set_default(): Argument #1 ($locale) must not contain any null bytes +ValueError: Locale::setDefault(): Argument #1 ($locale) must not contain any null bytes +ValueError: locale_set_default(): Argument #1 ($locale) must not contain any null bytes uk-ua_CALIFORNIA@currency=;currency=GRN: set locale 'uk-ua_CALIFORNIA@currency=;currency=GRN' root: set locale 'root' uk@currency=EURO: set locale 'uk@currency=EURO' diff --git a/ext/intl/tests/msgfmt_bug70484.phpt b/ext/intl/tests/msgfmt_bug70484.phpt index 91d346743641..9b5cfa198982 100644 --- a/ext/intl/tests/msgfmt_bug70484.phpt +++ b/ext/intl/tests/msgfmt_bug70484.phpt @@ -88,4 +88,3 @@ string(11) "42,42-other" string(22) "2 147 483 643-other" string(26) "2 147 483 643,123-other" string(4) "five" - diff --git a/ext/intl/tests/numfmt_parse_currency_references.phpt b/ext/intl/tests/numfmt_parse_currency_references.phpt index 06427a736930..81a2dffd7c2d 100644 --- a/ext/intl/tests/numfmt_parse_currency_references.phpt +++ b/ext/intl/tests/numfmt_parse_currency_references.phpt @@ -13,8 +13,8 @@ $num = "1\xc2\xa0$"; try { numfmt_parse_currency($fmt, $num, $test->prop); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Cannot assign string to reference held by property Test::$prop of type int +TypeError: Cannot assign string to reference held by property Test::$prop of type int diff --git a/ext/intl/tests/rbbiter___construct_basic.phpt b/ext/intl/tests/rbbiter___construct_basic.phpt index e749442daa9f..067de3d351a5 100644 --- a/ext/intl/tests/rbbiter___construct_basic.phpt +++ b/ext/intl/tests/rbbiter___construct_basic.phpt @@ -26,10 +26,10 @@ var_dump(get_class($rbbi)); try { $obj = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+', 'aoeu'); } catch (IntlException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- string(26) "IntlRuleBasedBreakIterator" -IntlRuleBasedBreakIterator::__construct(): unable to create instance from compiled rules +IntlException: IntlRuleBasedBreakIterator::__construct(): unable to create instance from compiled rules diff --git a/ext/intl/tests/resourcebundle_double_ctor.phpt b/ext/intl/tests/resourcebundle_double_ctor.phpt index 331d3d503b0f..3083c71d6f26 100644 --- a/ext/intl/tests/resourcebundle_double_ctor.phpt +++ b/ext/intl/tests/resourcebundle_double_ctor.phpt @@ -10,9 +10,9 @@ $r = new ResourceBundle('en_US', BUNDLE); try { $r->__construct('en_US', BUNDLE); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -ResourceBundle object is already constructed +Error: ResourceBundle object is already constructed diff --git a/ext/intl/tests/spoofchecker_008.phpt b/ext/intl/tests/spoofchecker_008.phpt index 66e39967c788..3f6fd39777b6 100644 --- a/ext/intl/tests/spoofchecker_008.phpt +++ b/ext/intl/tests/spoofchecker_008.phpt @@ -19,19 +19,19 @@ var_dump($s->isSuspicious("ABC")); try { $s->setAllowedChars('[a-z]', 1024); } catch (\ValueError $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $s->setAllowedChars("A-Z]"); } catch (\ValueError $e) { - echo $e->getMessage() . PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $s->setAllowedChars("[A-Z"); } catch (\ValueError $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -39,6 +39,6 @@ try { bool(true) bool(false) bool(false) -Spoofchecker::setAllowedChars(): Argument #2 ($patternOptions) must be a valid pattern option, 0 or (SpoofChecker::IGNORE_SPACE|( or SpoofChecker::CASE_INSENSITIVE%s)) -Spoofchecker::setAllowedChars(): Argument #1 ($pattern) must be a valid regular expression character set pattern -Spoofchecker::setAllowedChars(): Argument #1 ($pattern) must be a valid regular expression character set pattern +ValueError: Spoofchecker::setAllowedChars(): Argument #2 ($patternOptions) must be a valid pattern option, 0 or (SpoofChecker::IGNORE_SPACE|( or SpoofChecker::CASE_INSENSITIVE%s)) +ValueError: Spoofchecker::setAllowedChars(): Argument #1 ($pattern) must be a valid regular expression character set pattern +ValueError: Spoofchecker::setAllowedChars(): Argument #1 ($pattern) must be a valid regular expression character set pattern diff --git a/ext/intl/tests/spoofchecker_double_ctor.phpt b/ext/intl/tests/spoofchecker_double_ctor.phpt index 01dae5ab4bc5..e135634f0726 100644 --- a/ext/intl/tests/spoofchecker_double_ctor.phpt +++ b/ext/intl/tests/spoofchecker_double_ctor.phpt @@ -11,8 +11,8 @@ $checker = new Spoofchecker(); try { $checker->__construct(); } catch (Error $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Spoofchecker object is already constructed +Error: Spoofchecker object is already constructed diff --git a/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt b/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt index 187be350f594..f3078e8969f2 100644 --- a/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt +++ b/ext/intl/tests/spoofchecker_unknown_restriction_level.phpt @@ -13,9 +13,9 @@ $x = new Spoofchecker(); try { $x->setRestrictionLevel(Spoofchecker::SINGLE_SCRIPT); } catch (\ValueError $e) { - echo $e->getMessage(), \PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Spoofchecker::setRestrictionLevel(): Argument #1 ($level) must be one of Spoofchecker::ASCII, Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE, Spoofchecker::HIGHLY_RESTRICTIVE, Spoofchecker::MODERATELY_RESTRICTIVE, Spoofchecker::MINIMALLY_RESTRICTIVE, or Spoofchecker::UNRESTRICTIVE +ValueError: Spoofchecker::setRestrictionLevel(): Argument #1 ($level) must be one of Spoofchecker::ASCII, Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE, Spoofchecker::HIGHLY_RESTRICTIVE, Spoofchecker::MODERATELY_RESTRICTIVE, Spoofchecker::MINIMALLY_RESTRICTIVE, or Spoofchecker::UNRESTRICTIVE diff --git a/ext/phar/tests/002.phpt b/ext/phar/tests/002.phpt index c89f223b2b9c..ba17c2aeb2ed 100644 --- a/ext/phar/tests/002.phpt +++ b/ext/phar/tests/002.phpt @@ -7,15 +7,15 @@ phar try { Phar::mapPhar(5, 'hio', 'hi'); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::mapPhar(); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } __HALT_COMPILER(); ?> --EXPECTF-- -Phar::mapPhar() expects at most 2 arguments, 3 given -internal corruption of phar "%s002.php" (truncated manifest at manifest length) +ArgumentCountError: Phar::mapPhar() expects at most 2 arguments, 3 given +PharException: internal corruption of phar "%s002.php" (truncated manifest at manifest length) diff --git a/ext/phar/tests/004.phpt b/ext/phar/tests/004.phpt index 90d4572f0718..ffa73318ec3b 100644 --- a/ext/phar/tests/004.phpt +++ b/ext/phar/tests/004.phpt @@ -7,8 +7,8 @@ phar try { Phar::mapPhar('hio'); } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -__HALT_COMPILER(); must be declared in a phar +PharException: __HALT_COMPILER(); must be declared in a phar diff --git a/ext/phar/tests/005.phpt b/ext/phar/tests/005.phpt index 6bc2985f9f9c..3119e4c3bcd5 100644 --- a/ext/phar/tests/005.phpt +++ b/ext/phar/tests/005.phpt @@ -7,8 +7,8 @@ phar try { Phar::mapPhar('hio'); } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } __HALT_COMPILER(); ?>() --EXPECTF-- -internal corruption of phar "%s" (truncated manifest at manifest length) +PharException: internal corruption of phar "%s" (truncated manifest at manifest length) diff --git a/ext/phar/tests/006.phpt b/ext/phar/tests/006.phpt index e203bff90e7a..db01fa53736f 100644 --- a/ext/phar/tests/006.phpt +++ b/ext/phar/tests/006.phpt @@ -7,8 +7,8 @@ phar try { Phar::mapPhar('hio'); } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } __HALT_COMPILER(); ?> --EXPECTF-- -internal corruption of phar "%s" (truncated manifest at manifest length) +PharException: internal corruption of phar "%s" (truncated manifest at manifest length) diff --git a/ext/phar/tests/007.phpt b/ext/phar/tests/007.phpt index 701e6ccf08e3..1e62b12ae03d 100644 --- a/ext/phar/tests/007.phpt +++ b/ext/phar/tests/007.phpt @@ -7,8 +7,8 @@ phar try { Phar::mapPhar('hio'); } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } __HALT_COMPILER(); ?>~~~~ --EXPECTF-- -manifest cannot be larger than 100 MB in phar "%s" +PharException: manifest cannot be larger than 100 MB in phar "%s" diff --git a/ext/phar/tests/008.phpt b/ext/phar/tests/008.phpt index a8e7eaec39e7..00a211c54240 100644 --- a/ext/phar/tests/008.phpt +++ b/ext/phar/tests/008.phpt @@ -12,10 +12,10 @@ file_put_contents(__DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php', $fil try { include __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -internal corruption of phar "%s" (truncated manifest header) +PharException: internal corruption of phar "%s" (truncated manifest header) diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt index d18329395a68..1e268b0a1f76 100644 --- a/ext/phar/tests/009.phpt +++ b/ext/phar/tests/009.phpt @@ -14,10 +14,10 @@ file_put_contents(__DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php', $fil try { include __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -internal corruption of phar "%s009.phar.php" (too many manifest entries for size of manifest) +PharException: internal corruption of phar "%s009.phar.php" (too many manifest entries for size of manifest) diff --git a/ext/phar/tests/010.phpt b/ext/phar/tests/010.phpt index 724d67d815de..4c91ffbc9663 100644 --- a/ext/phar/tests/010.phpt +++ b/ext/phar/tests/010.phpt @@ -20,10 +20,10 @@ try { include __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; echo file_get_contents('phar://hio/a'); } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -internal corruption of phar "%s" (too many manifest entries for size of manifest) +PharException: internal corruption of phar "%s" (too many manifest entries for size of manifest) diff --git a/ext/phar/tests/011.phpt b/ext/phar/tests/011.phpt index d143bd5091a9..cb3c3e535843 100644 --- a/ext/phar/tests/011.phpt +++ b/ext/phar/tests/011.phpt @@ -21,10 +21,10 @@ try { include $fname; echo file_get_contents('phar://hio/a'); } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -internal corruption of phar "%s" (compressed and uncompressed size does not match for uncompressed entry) +PharException: internal corruption of phar "%s" (compressed and uncompressed size does not match for uncompressed entry) diff --git a/ext/phar/tests/029.phpt b/ext/phar/tests/029.phpt index 1b664fbdb742..36ac6348d711 100644 --- a/ext/phar/tests/029.phpt +++ b/ext/phar/tests/029.phpt @@ -33,7 +33,7 @@ try } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -45,4 +45,4 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); --EXPECTF-- bool(true) bool(true) -alias "copy" is already used for archive "%s029.1.phar.php" cannot be overloaded with "%s029.2.phar.php" +PharException: alias "copy" is already used for archive "%s029.1.phar.php" cannot be overloaded with "%s029.2.phar.php" diff --git a/ext/phar/tests/030.phpt b/ext/phar/tests/030.phpt index e558261df89c..3e2a2a671e6b 100644 --- a/ext/phar/tests/030.phpt +++ b/ext/phar/tests/030.phpt @@ -29,7 +29,7 @@ var_dump(isset($p['.phar/test'])); try { $p['.phar/test']; } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -43,4 +43,4 @@ This is b/c This is b/d This is e bool(false) -Cannot directly get any files or directories in magic ".phar" directory +BadMethodCallException: Cannot directly get any files or directories in magic ".phar" directory diff --git a/ext/phar/tests/032.phpt b/ext/phar/tests/032.phpt index 7099320e8915..f813f43afd3b 100644 --- a/ext/phar/tests/032.phpt +++ b/ext/phar/tests/032.phpt @@ -14,7 +14,7 @@ require_once 'files/phar_oo_test.inc'; try { Phar::loadPhar($fname); } catch (Exception $e) { -echo $e->getMessage(); +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -25,4 +25,5 @@ unlink(__DIR__ . '/files/032.phar.php'); __halt_compiler(); ?> --EXPECTF-- -phar "%s032.phar.php" does not have a signature===DONE=== +PharException: phar "%s032.phar.php" does not have a signature +===DONE=== diff --git a/ext/phar/tests/033a.phpt b/ext/phar/tests/033a.phpt index 355617b29f93..f6d115e9daec 100644 --- a/ext/phar/tests/033a.phpt +++ b/ext/phar/tests/033a.phpt @@ -28,7 +28,7 @@ try { $a['a.php']->chmod(0666); var_dump($a['a.php']->isExecutable()); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -37,4 +37,4 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> --EXPECTF-- bool(false) -Cannot modify permissions for file "a.php" in phar "%s033a.1.phar.php", write operations are prohibited +PharException: Cannot modify permissions for file "a.php" in phar "%s033a.1.phar.php", write operations are prohibited diff --git a/ext/phar/tests/addfuncs.phpt b/ext/phar/tests/addfuncs.phpt index 9707cb5b1f41..7fd0c881c545 100644 --- a/ext/phar/tests/addfuncs.phpt +++ b/ext/phar/tests/addfuncs.phpt @@ -16,27 +16,27 @@ echo file_get_contents($pname . '/b') . "\n"; try { $phar->addFile($pname . '/a'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFile($pname . '/a', 'a'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFile(__DIR__ . '/does/not/exist'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFile($pname . '/a', '.phar/stub.php'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFromString('.phar/stub.php', 'hi'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -44,8 +44,8 @@ echo $e->getMessage() . "\n"; --EXPECTF-- hi hi -Entry phar://%saddfuncs.phar.php/a does not exist and cannot be created: phar error: invalid path "phar://%saddfuncs.phar.php/a" contains double slash -Entry a does not exist and cannot be created: phar error: file "a" in phar "%saddfuncs.phar.php" cannot be opened for writing, readable file pointers are open -phar error: unable to open file "%s/does/not/exist" to add to phar archive -Cannot create any files in magic ".phar" directory -Cannot create any files in magic ".phar" directory +BadMethodCallException: Entry phar://%saddfuncs.phar.php/a does not exist and cannot be created: phar error: invalid path "phar://%saddfuncs.phar.php/a" contains double slash +BadMethodCallException: Entry a does not exist and cannot be created: phar error: file "a" in phar "%saddfuncs.phar.php" cannot be opened for writing, readable file pointers are open +RuntimeException: phar error: unable to open file "%s/does/not/exist" to add to phar archive +BadMethodCallException: Cannot create any files in magic ".phar" directory +BadMethodCallException: Cannot create any files in magic ".phar" directory diff --git a/ext/phar/tests/alias_acrobatics.phpt b/ext/phar/tests/alias_acrobatics.phpt index b2f80c0abe74..d8aea395f682 100644 --- a/ext/phar/tests/alias_acrobatics.phpt +++ b/ext/phar/tests/alias_acrobatics.phpt @@ -17,19 +17,19 @@ $p['unused'] = 'hi'; try { $a = new Phar($fname2, 0, 'foo'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } copy($fname, $fname2); echo "2\n"; try { $a = new Phar($fname2); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b = new Phar($fname, 0, 'another'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -38,7 +38,7 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar'); ?> --EXPECTF-- -alias "foo" is already used for archive "%salias_acrobatics.phar" cannot be overloaded with "%salias_acrobatics.2.phar" +UnexpectedValueException: alias "foo" is already used for archive "%salias_acrobatics.phar" cannot be overloaded with "%salias_acrobatics.2.phar" 2 -Cannot open archive "%salias_acrobatics.2.phar", alias is already in use by existing archive -alias "another" is already used for archive "%salias_acrobatics.phar" cannot be overloaded with "%salias_acrobatics.phar" +UnexpectedValueException: Cannot open archive "%salias_acrobatics.2.phar", alias is already in use by existing archive +UnexpectedValueException: alias "another" is already used for archive "%salias_acrobatics.phar" cannot be overloaded with "%salias_acrobatics.phar" diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index efa74678f897..5a239ac0b235 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -11,258 +11,258 @@ ini_set('phar.readonly', 1); try { Phar::mungServer('hi'); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::createDefaultStub(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::loadPhar(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::canCompress('hi'); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a = new Phar(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a = new Phar(__DIR__ . '/files/frontcontroller10.phar'); } catch (PharException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->convertToExecutable(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->convertToData(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b = new PharData(__DIR__ . '/whatever.tar'); } catch (PharException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $c = new PharData(__DIR__ . '/whatever.zip'); } catch (PharException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b->delete(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->delete('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b->delete('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { echo $a->getPath() . "\n"; } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->setAlias('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b->setAlias('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 0); try { $a->setAlias(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 1); try { $b->stopBuffering(); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->setStub('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b->setStub('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 0); try { $a->setStub(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 1); try { $b->setDefaultStub('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->setDefaultStub(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->setDefaultStub('oops'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->setSignatureAlgorithm(Phar::MD5); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->compress(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->compress(1); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->compressFiles(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->decompressFiles(); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->copy(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->copy('a', 'b'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->offsetExists(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->offsetGet(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 0); try { $a->offsetSet(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 1); try { $b->offsetUnset(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->offsetUnset('a'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->addEmptyDir(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->addFile(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->addFromString(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->setMetadata('a'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 0); try { $a->setMetadata(1,2); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 1); try { $a->delMetadata(); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -Phar::mungServer(): Argument #1 ($variables) must be of type array, string given -Phar::createDefaultStub(): Argument #1 ($index) must be of type ?string, array given -Phar::loadPhar(): Argument #1 ($filename) must be of type string, array given -Phar::canCompress(): Argument #1 ($compression) must be of type int, string given -Phar::__construct(): Argument #1 ($filename) must be of type string, array given -Phar::convertToExecutable(): Argument #1 ($format) must be of type ?int, array given -Phar::convertToData(): Argument #1 ($format) must be of type ?int, array given -PharData::delete(): Argument #1 ($localName) must be of type string, array given -Cannot write out phar archive, phar is read-only -Entry oops does not exist and cannot be deleted +TypeError: Phar::mungServer(): Argument #1 ($variables) must be of type array, string given +TypeError: Phar::createDefaultStub(): Argument #1 ($index) must be of type ?string, array given +TypeError: Phar::loadPhar(): Argument #1 ($filename) must be of type string, array given +TypeError: Phar::canCompress(): Argument #1 ($compression) must be of type int, string given +TypeError: Phar::__construct(): Argument #1 ($filename) must be of type string, array given +TypeError: Phar::convertToExecutable(): Argument #1 ($format) must be of type ?int, array given +TypeError: Phar::convertToData(): Argument #1 ($format) must be of type ?int, array given +TypeError: PharData::delete(): Argument #1 ($localName) must be of type string, array given +UnexpectedValueException: Cannot write out phar archive, phar is read-only +BadMethodCallException: Entry oops does not exist and cannot be deleted %sfrontcontroller10.phar -Cannot write out phar archive, phar is read-only -A Phar alias cannot be set in a plain tar archive -Phar::setAlias(): Argument #1 ($alias) must be of type string, array given -Cannot change stub, phar is read-only -A Phar stub cannot be set in a plain tar archive -Phar::setStub(): Argument #1 ($stub) must be of type string, array given -A Phar stub cannot be set in a plain tar archive -Phar::setDefaultStub(): Argument #1 ($index) must be of type ?string, array given -Cannot change stub: phar.readonly=1 -Cannot set signature algorithm, phar is read-only -Phar::compress(): Argument #1 ($compression) must be of type int, array given -Cannot compress phar archive, phar is read-only -Phar::compressFiles(): Argument #1 ($compression) must be of type int, array given -Phar is readonly, cannot change compression -Phar::copy() expects exactly 2 arguments, 1 given -Cannot copy "a" to "b", phar is read-only -Phar::offsetExists(): Argument #1 ($localName) must be of type string, array given -Phar::offsetGet(): Argument #1 ($localName) must be of type string, array given -Phar::offsetSet() expects exactly 2 arguments, 1 given -PharData::offsetUnset(): Argument #1 ($localName) must be of type string, array given -Write operations disabled by the php.ini setting phar.readonly -Phar::addEmptyDir(): Argument #1 ($directory) must be of type string, array given -Phar::addFile(): Argument #1 ($filename) must be of type string, array given -Phar::addFromString() expects exactly 2 arguments, 1 given -Write operations disabled by the php.ini setting phar.readonly -Phar::setMetadata() expects exactly 1 argument, 2 given -Write operations disabled by the php.ini setting phar.readonly +UnexpectedValueException: Cannot write out phar archive, phar is read-only +UnexpectedValueException: A Phar alias cannot be set in a plain tar archive +TypeError: Phar::setAlias(): Argument #1 ($alias) must be of type string, array given +UnexpectedValueException: Cannot change stub, phar is read-only +UnexpectedValueException: A Phar stub cannot be set in a plain tar archive +TypeError: Phar::setStub(): Argument #1 ($stub) must be of type string, array given +UnexpectedValueException: A Phar stub cannot be set in a plain tar archive +TypeError: Phar::setDefaultStub(): Argument #1 ($index) must be of type ?string, array given +UnexpectedValueException: Cannot change stub: phar.readonly=1 +UnexpectedValueException: Cannot set signature algorithm, phar is read-only +TypeError: Phar::compress(): Argument #1 ($compression) must be of type int, array given +UnexpectedValueException: Cannot compress phar archive, phar is read-only +TypeError: Phar::compressFiles(): Argument #1 ($compression) must be of type int, array given +BadMethodCallException: Phar is readonly, cannot change compression +ArgumentCountError: Phar::copy() expects exactly 2 arguments, 1 given +UnexpectedValueException: Cannot copy "a" to "b", phar is read-only +TypeError: Phar::offsetExists(): Argument #1 ($localName) must be of type string, array given +TypeError: Phar::offsetGet(): Argument #1 ($localName) must be of type string, array given +ArgumentCountError: Phar::offsetSet() expects exactly 2 arguments, 1 given +TypeError: PharData::offsetUnset(): Argument #1 ($localName) must be of type string, array given +BadMethodCallException: Write operations disabled by the php.ini setting phar.readonly +TypeError: Phar::addEmptyDir(): Argument #1 ($directory) must be of type string, array given +TypeError: Phar::addFile(): Argument #1 ($filename) must be of type string, array given +ArgumentCountError: Phar::addFromString() expects exactly 2 arguments, 1 given +BadMethodCallException: Write operations disabled by the php.ini setting phar.readonly +ArgumentCountError: Phar::setMetadata() expects exactly 1 argument, 2 given +BadMethodCallException: Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/bug13786.phpt b/ext/phar/tests/bug13786.phpt index d190343b68e6..f47bc67b2f77 100644 --- a/ext/phar/tests/bug13786.phpt +++ b/ext/phar/tests/bug13786.phpt @@ -21,10 +21,10 @@ for ($i = 0; $i < 2; $i++) { echo("\nWritten files: $i\n"); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- string(26) "file 0 in DataArchive.phar" -unable to seek to start of file "0" while creating new phar "%sDataArchive.phar" +PharException: unable to seek to start of file "0" while creating new phar "%sDataArchive.phar" diff --git a/ext/phar/tests/bug45218_SLOWTEST.phpt b/ext/phar/tests/bug45218_SLOWTEST.phpt index a0ac5922b840..9368eecc0969 100644 --- a/ext/phar/tests/bug45218_SLOWTEST.phpt +++ b/ext/phar/tests/bug45218_SLOWTEST.phpt @@ -49,8 +49,7 @@ try { } var_dump($ret); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/bug48377.2.phpt b/ext/phar/tests/bug48377.2.phpt index 547e908b11b8..f988ee48813c 100644 --- a/ext/phar/tests/bug48377.2.phpt +++ b/ext/phar/tests/bug48377.2.phpt @@ -14,10 +14,10 @@ $phar['x'] = 'hi'; try { $phar->convertToData(Phar::ZIP, Phar::NONE, 'phar.zip'); } catch (BadMethodCallException $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -data phar "%sbug48377.2.phar.zip" has invalid extension phar.zip +BadMethodCallException: data phar "%sbug48377.2.phar.zip" has invalid extension phar.zip diff --git a/ext/phar/tests/bug48377.phpt b/ext/phar/tests/bug48377.phpt index 6b964b97ef98..e7ed29a9159c 100644 --- a/ext/phar/tests/bug48377.phpt +++ b/ext/phar/tests/bug48377.phpt @@ -17,11 +17,11 @@ $phar['x'] = 'hi'; try { $phar->convertToData(Phar::ZIP, Phar::NONE, 'zip'); } catch (BadMethodCallException $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -phar "%sbug48377.zip" exists and must be unlinked prior to conversion +BadMethodCallException: phar "%sbug48377.zip" exists and must be unlinked prior to conversion diff --git a/ext/phar/tests/bug54395.phpt b/ext/phar/tests/bug54395.phpt index 44c3de0e3226..0501adddc4fe 100644 --- a/ext/phar/tests/bug54395.phpt +++ b/ext/phar/tests/bug54395.phpt @@ -8,9 +8,9 @@ phar try { phar::mount(1,1); } catch (Exception $e) { - var_dump($e->getMessage()); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -string(25) "Mounting of 1 to 1 failed" +PharException: Mounting of 1 to 1 failed diff --git a/ext/phar/tests/bug60261.phpt b/ext/phar/tests/bug60261.phpt index d56d8c16e9de..a5888844b3ff 100644 --- a/ext/phar/tests/bug60261.phpt +++ b/ext/phar/tests/bug60261.phpt @@ -9,9 +9,9 @@ try { $nx = new Phar(); $nx->getLinkTarget(); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Phar::__construct() expects at least 1 argument, 0 given +ArgumentCountError: Phar::__construct() expects at least 1 argument, 0 given diff --git a/ext/phar/tests/bug64931/bug64931.phpt b/ext/phar/tests/bug64931/bug64931.phpt index 20f708f8294f..964a8be630d6 100644 --- a/ext/phar/tests/bug64931/bug64931.phpt +++ b/ext/phar/tests/bug64931/bug64931.phpt @@ -15,31 +15,31 @@ $phar->addFile(__DIR__."/src/.pharignore", ".pharignore"); try { $phar->addFile(__DIR__."/src/.pharignore", ".phar/gotcha"); } catch (Exception $e) { - echo "CAUGHT: ". $e->getMessage() ."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFromString(".phar", "gotcha"); } catch (Exception $e) { - echo "CAUGHT: ". $e->getMessage() ."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFromString(".phar//", "gotcha"); } catch (Exception $e) { - echo "CAUGHT: ". $e->getMessage() ."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFromString(".phar\\", "gotcha"); } catch (Exception $e) { - echo "CAUGHT: ". $e->getMessage() ."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addFromString(".phar\0", "gotcha"); } catch (ValueError $e) { - echo "CAUGHT: ". $e->getMessage() ."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -49,8 +49,8 @@ try { ?> --EXPECT-- Test -CAUGHT: Cannot create any files in magic ".phar" directory -CAUGHT: Cannot create any files in magic ".phar" directory -CAUGHT: Cannot create any files in magic ".phar" directory -CAUGHT: Cannot create any files in magic ".phar" directory -CAUGHT: Phar::addFromString(): Argument #1 ($localName) must not contain any null bytes +BadMethodCallException: Cannot create any files in magic ".phar" directory +BadMethodCallException: Cannot create any files in magic ".phar" directory +BadMethodCallException: Cannot create any files in magic ".phar" directory +BadMethodCallException: Cannot create any files in magic ".phar" directory +ValueError: Phar::addFromString(): Argument #1 ($localName) must not contain any null bytes diff --git a/ext/phar/tests/bug65028.phpt b/ext/phar/tests/bug65028.phpt index 4acf364bc4f5..cefc967cef3c 100644 --- a/ext/phar/tests/bug65028.phpt +++ b/ext/phar/tests/bug65028.phpt @@ -143,7 +143,7 @@ try } catch(UnexpectedValueException $ex) { - echo "Exception thrown: " . $ex->getMessage() . "\n"; + echo $ex::class, ': ', $ex->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/bug65414.phpt b/ext/phar/tests/bug65414.phpt index d3ff77947144..4e752b018d05 100644 --- a/ext/phar/tests/bug65414.phpt +++ b/ext/phar/tests/bug65414.phpt @@ -19,14 +19,14 @@ foreach ($bads as $bad) { $phar->addFromString($bad, 'this content is injected'); echo 'Failed to throw expected exception'; } catch (BadMethodCallException $ex) { - echo $ex->getMessage() . PHP_EOL; + echo $ex::class, ': ', $ex->getMessage(), PHP_EOL; } } echo 'done' . PHP_EOL; ?> --EXPECT-- -.phar/injected-1.txt:Cannot create any files in magic ".phar" directory -/.phar/injected-2.txt:Cannot create any files in magic ".phar" directory -//.phar/injected-3.txt:Entry //.phar/injected-3.txt does not exist and cannot be created: phar error: invalid path "//.phar/injected-3.txt" contains double slash -/.phar/:Cannot create any files in magic ".phar" directory +.phar/injected-1.txt:BadMethodCallException: Cannot create any files in magic ".phar" directory +/.phar/injected-2.txt:BadMethodCallException: Cannot create any files in magic ".phar" directory +//.phar/injected-3.txt:BadMethodCallException: Entry //.phar/injected-3.txt does not exist and cannot be created: phar error: invalid path "//.phar/injected-3.txt" contains double slash +/.phar/:BadMethodCallException: Cannot create any files in magic ".phar" directory done diff --git a/ext/phar/tests/bug69324.phpt b/ext/phar/tests/bug69324.phpt index be7df7ec2531..d6ddbea76574 100644 --- a/ext/phar/tests/bug69324.phpt +++ b/ext/phar/tests/bug69324.phpt @@ -9,8 +9,8 @@ $p = new Phar(__DIR__.'/bug69324.phar', 0); $meta=$p->getMetadata(); var_dump($meta); } catch(Exception $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -internal corruption of phar "%s" (truncated manifest entry) +UnexpectedValueException: internal corruption of phar "%s" (truncated manifest entry) diff --git a/ext/phar/tests/bug71498.phpt b/ext/phar/tests/bug71498.phpt index 62b5bbec76b9..a426a6597db8 100644 --- a/ext/phar/tests/bug71498.phpt +++ b/ext/phar/tests/bug71498.phpt @@ -7,11 +7,12 @@ phar try { $p = new PharData(__DIR__."/bug71498.zip"); } catch(UnexpectedValueException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> DONE --EXPECTF-- -phar error: end of central directory not found in zip-based phar "%s%ebug71498.zip" +UnexpectedValueException: phar error: end of central directory not found in zip-based phar "%s%ebug71498.zip" + DONE diff --git a/ext/phar/tests/bug72321.phpt b/ext/phar/tests/bug72321.phpt index 1184be869ac0..775d6b8ebbaf 100644 --- a/ext/phar/tests/bug72321.phpt +++ b/ext/phar/tests/bug72321.phpt @@ -12,7 +12,7 @@ $phar = new PharData("72321_2.zip"); try { $phar->extractTo("test72321"); } catch(PharException $e) { - print $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> DONE @@ -21,5 +21,5 @@ DONE rmdir(__DIR__."/test72321"); ?> --EXPECTF-- -Extraction from phar "%s72321_2.zip" failed: Cannot extract "AAAAAAAAxxxxBBBBCCCCCCCCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/b/c", could not create directory "test72321/AAAAAAAAxxxxBBBBCCCCCCCCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/b" +PharException: Extraction from phar "%s72321_2.zip" failed: Cannot extract "AAAAAAAAxxxxBBBBCCCCCCCCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/b/c", could not create directory "test72321/AAAAAAAAxxxxBBBBCCCCCCCCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/b" DONE diff --git a/ext/phar/tests/bug72928.phpt b/ext/phar/tests/bug72928.phpt index 352e1b5c34d1..81cfe60758cf 100644 --- a/ext/phar/tests/bug72928.phpt +++ b/ext/phar/tests/bug72928.phpt @@ -9,10 +9,10 @@ try { $phar = new PharData('bug72928.zip'); var_dump($phar); } catch(UnexpectedValueException $e) { - print $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> DONE --EXPECTF-- -phar error: signature cannot be read in zip-based phar "%sbug72928.zip" +UnexpectedValueException: phar error: signature cannot be read in zip-based phar "%sbug72928.zip" DONE diff --git a/ext/phar/tests/bug73035.phpt b/ext/phar/tests/bug73035.phpt index 24965128b727..213f91244c49 100644 --- a/ext/phar/tests/bug73035.phpt +++ b/ext/phar/tests/bug73035.phpt @@ -9,10 +9,10 @@ try { $phar = new PharData('bug73035.tar'); var_dump($phar); } catch(UnexpectedValueException $e) { - print $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> DONE --EXPECTF-- -phar error: tar-based phar "%sbug73035.tar" signature cannot be read +UnexpectedValueException: phar error: tar-based phar "%sbug73035.tar" signature cannot be read DONE diff --git a/ext/phar/tests/bug73764.phpt b/ext/phar/tests/bug73764.phpt index 7082049b1948..4e52efb3ccb0 100644 --- a/ext/phar/tests/bug73764.phpt +++ b/ext/phar/tests/bug73764.phpt @@ -9,8 +9,8 @@ try { $p = Phar::LoadPhar('bug73764.phar', 'alias.phar'); echo "OK\n"; } catch(PharException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -internal corruption of phar "%sbug73764.phar" (truncated manifest entry) +PharException: internal corruption of phar "%sbug73764.phar" (truncated manifest entry) diff --git a/ext/phar/tests/bug73768.phpt b/ext/phar/tests/bug73768.phpt index be73d45cfd57..7de6966130f9 100644 --- a/ext/phar/tests/bug73768.phpt +++ b/ext/phar/tests/bug73768.phpt @@ -9,8 +9,8 @@ try { $p = Phar::LoadPhar('bug73768.phar', 'alias.phar'); echo "OK\n"; } catch(PharException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -internal corruption of phar "%sbug73768.phar" (truncated manifest header) +PharException: internal corruption of phar "%sbug73768.phar" (truncated manifest header) diff --git a/ext/phar/tests/bug77143.phpt b/ext/phar/tests/bug77143.phpt index 21b52d6427cd..668c90f13217 100644 --- a/ext/phar/tests/bug77143.phpt +++ b/ext/phar/tests/bug77143.phpt @@ -11,8 +11,8 @@ try { var_dump(new Phar('bug77143.phar',0,'project.phar')); echo "OK\n"; } catch(UnexpectedValueException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -internal corruption of phar "%sbug77143.phar" (truncated manifest header) +UnexpectedValueException: internal corruption of phar "%sbug77143.phar" (truncated manifest header) diff --git a/ext/phar/tests/bug77247.phpt b/ext/phar/tests/bug77247.phpt index acd97a837967..0421f6fa044e 100644 --- a/ext/phar/tests/bug77247.phpt +++ b/ext/phar/tests/bug77247.phpt @@ -11,4 +11,4 @@ var_dump(new Phar('a/.b', 0,'test.phar')); } ?> --EXPECT-- -OK \ No newline at end of file +OK diff --git a/ext/phar/tests/bug77396.phpt b/ext/phar/tests/bug77396.phpt index b6c33ab0fcf8..fdb1072c0ed7 100644 --- a/ext/phar/tests/bug77396.phpt +++ b/ext/phar/tests/bug77396.phpt @@ -8,8 +8,8 @@ $path = '../' . str_repeat("x", PHP_MAXPATHLEN) . '.tar'; try { $phar = new PharData($path); } catch (UnexpectedValueException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Phar creation or opening failed +UnexpectedValueException: Phar creation or opening failed diff --git a/ext/phar/tests/bug79503.phpt b/ext/phar/tests/bug79503.phpt index 921ad8d18db9..3295f95f316f 100644 --- a/ext/phar/tests/bug79503.phpt +++ b/ext/phar/tests/bug79503.phpt @@ -7,8 +7,8 @@ phar try { new Phar(__DIR__ . '/bug79503.phar'); } catch (UnexpectedValueException $ex) { - echo $ex->getMessage(); + echo $ex::class, ': ', $ex->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: tar-based phar "%s%ebug79503.phar" has invalid metadata in magic file ".phar/.metadata.bin" +UnexpectedValueException: phar error: tar-based phar "%s%ebug79503.phar" has invalid metadata in magic file ".phar/.metadata.bin" diff --git a/ext/phar/tests/bug81211.phpt b/ext/phar/tests/bug81211.phpt index fe7b1326aa68..ffeb18af5504 100644 --- a/ext/phar/tests/bug81211.phpt +++ b/ext/phar/tests/bug81211.phpt @@ -24,12 +24,12 @@ $archive = new PharData(__DIR__ . '/bug81211/archive.tar'); try { $archive->buildFromDirectory(__DIR__ . '/bug81211/foo'); } catch (UnexpectedValueException $ex) { - echo $ex->getMessage(), PHP_EOL; + echo $ex::class, ': ', $ex->getMessage(), PHP_EOL; } try { $archive->buildFromIterator(new RecursiveDirectoryIterator(__DIR__ . '/bug81211/foo', FilesystemIterator::SKIP_DOTS), __DIR__ . '/bug81211/foo'); } catch (UnexpectedValueException $ex) { - echo $ex->getMessage(), PHP_EOL; + echo $ex::class, ': ', $ex->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -42,5 +42,5 @@ try { @rmdir(__DIR__ . '/bug81211'); ?> --EXPECTF-- -Iterator RecursiveIteratorIterator returned a path "%s%ebug81211%efoobar%efile" that is not in the base directory "%s%ebug81211%efoo" -Iterator RecursiveDirectoryIterator returned a path "%s%ebug81211%efoobar%efile" that is not in the base directory "%s%ebug81211%efoo" +UnexpectedValueException: Iterator RecursiveIteratorIterator returned a path "%s%ebug81211%efoobar%efile" that is not in the base directory "%s%ebug81211%efoo" +UnexpectedValueException: Iterator RecursiveDirectoryIterator returned a path "%s%ebug81211%efoobar%efile" that is not in the base directory "%s%ebug81211%efoo" diff --git a/ext/phar/tests/create_new_phar_b.phpt b/ext/phar/tests/create_new_phar_b.phpt index fb106153ca87..b315f0f62a7f 100644 --- a/ext/phar/tests/create_new_phar_b.phpt +++ b/ext/phar/tests/create_new_phar_b.phpt @@ -18,4 +18,3 @@ Warning: file_put_contents(phar://%screate_new_phar_b.phar.php/a.php): Failed to Warning: include(phar://%screate_new_phar_b.phar.php/a.php): Failed to open stream: %s in %screate_new_phar_b.php on line %d Warning: include(): Failed opening 'phar://%screate_new_phar_b.phar.php/a.php' for inclusion (include_path='%s') in %screate_new_phar_b.php on line %d - diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt index fea390e477cb..807c7722fbc1 100644 --- a/ext/phar/tests/create_path_error.phpt +++ b/ext/phar/tests/create_path_error.phpt @@ -55,7 +55,7 @@ foreach($checks as $check) } catch (ValueError $e) { - echo 'Exception: ' . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } } @@ -78,4 +78,4 @@ string(5) "query" 11:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 12:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character 13:Error: file_put_contents(phar://%s): Failed to open stream: phar error: invalid path "%s" contains illegal character -Exception: Phar::offsetSet(): Argument #1 ($localName) must not contain any null bytes +ValueError: Phar::offsetSet(): Argument #1 ($localName) must not contain any null bytes diff --git a/ext/phar/tests/delete_in_phar.phpt b/ext/phar/tests/delete_in_phar.phpt index 11978fdce7bc..0c06cc29fed4 100644 --- a/ext/phar/tests/delete_in_phar.phpt +++ b/ext/phar/tests/delete_in_phar.phpt @@ -44,4 +44,3 @@ This is b Warning: include(%sdelete_in_phar.phar.php/b/c.php): Failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar.phar.php" in %sdelete_in_phar.php on line %d Warning: include(): Failed opening 'phar://%sdelete_in_phar.phar.php/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar.php on line %d - diff --git a/ext/phar/tests/delete_in_phar_b.phpt b/ext/phar/tests/delete_in_phar_b.phpt index 1cc372d53c3a..cd73d73ebaff 100644 --- a/ext/phar/tests/delete_in_phar_b.phpt +++ b/ext/phar/tests/delete_in_phar_b.phpt @@ -41,4 +41,3 @@ Warning: unlink(): phar error: write operations disabled by the php.ini setting This is a This is b This is b/c - diff --git a/ext/phar/tests/delete_in_phar_confirm.phpt b/ext/phar/tests/delete_in_phar_confirm.phpt index 12d1099bf635..78423fe3c374 100644 --- a/ext/phar/tests/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/delete_in_phar_confirm.phpt @@ -48,4 +48,3 @@ This is b Warning: include(%sdelete_in_phar_confirm.phar.php/b/c.php): Failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar_confirm.phar.php" in %sdelete_in_phar_confirm.php on line %d Warning: include(): Failed opening 'phar://%sdelete_in_phar_confirm.phar.php/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar_confirm.php on line %d - diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt index 81a2f43e80a1..9b6a67643ddf 100644 --- a/ext/phar/tests/fgc_edgecases.phpt +++ b/ext/phar/tests/fgc_edgecases.phpt @@ -15,7 +15,7 @@ $pname = 'phar://' . $fname; try { file_get_contents(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } chdir(__DIR__); file_put_contents($fname, "blah\n"); @@ -50,7 +50,7 @@ include $pname . '/foo/hi'; --EXPECTF-- -file_get_contents(): Argument #1 ($filename) must be of type string, array given +TypeError: file_get_contents(): Argument #1 ($filename) must be of type string, array given blah getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } chdir(__DIR__); file_put_contents($fname, "blah\n"); @@ -37,7 +37,7 @@ include $pname . '/foo/hi'; --EXPECTF-- -fopen(): Argument #1 ($filename) must be of type string, array given +TypeError: fopen(): Argument #1 ($filename) must be of type string, array given blah test diff --git a/ext/phar/tests/gh13833.phpt b/ext/phar/tests/gh13833.phpt index 8430bd5e605b..b6d0b47a9e17 100644 --- a/ext/phar/tests/gh13833.phpt +++ b/ext/phar/tests/gh13833.phpt @@ -30,7 +30,7 @@ copy($fname, $fname_new); try { new Phar($fname_new); } catch (UnexpectedValueException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXTENSIONS-- @@ -44,4 +44,4 @@ unlink(__DIR__ . '/gh13833.phar.copy.phar'); Yuancheng Jiang Felix De Vliegher --EXPECTF-- -internal corruption of phar "%sgh13833.phar.copy.phar" (trying to read past buffer end) +UnexpectedValueException: internal corruption of phar "%sgh13833.phar.copy.phar" (trying to read past buffer end) diff --git a/ext/phar/tests/gh14603.phpt b/ext/phar/tests/gh14603.phpt index 95b9fa30fd55..409e94bff6df 100644 Binary files a/ext/phar/tests/gh14603.phpt and b/ext/phar/tests/gh14603.phpt differ diff --git a/ext/phar/tests/gh17518.phpt b/ext/phar/tests/gh17518.phpt index 6a45e390edd0..8471838c90ec 100644 --- a/ext/phar/tests/gh17518.phpt +++ b/ext/phar/tests/gh17518.phpt @@ -12,7 +12,7 @@ $phar['a'] = 'b'; try { $phar->extractTo(__DIR__ . '/gh17518', ''); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/gh19752.phpt b/ext/phar/tests/gh19752.phpt index 94ee8691305e..9494032bd31c 100644 --- a/ext/phar/tests/gh19752.phpt +++ b/ext/phar/tests/gh19752.phpt @@ -8,8 +8,8 @@ $phar = new PharData(__DIR__.'/gh19752.1'); try { $phar->decompress("*"); } catch (BadMethodCallException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -data phar converted from "%sgh19752.1" has invalid extension * +BadMethodCallException: data phar converted from "%sgh19752.1" has invalid extension * diff --git a/ext/phar/tests/gh20302.phpt b/ext/phar/tests/gh20302.phpt index 0cbd253d54fc..23a44f94a5c1 100644 --- a/ext/phar/tests/gh20302.phpt +++ b/ext/phar/tests/gh20302.phpt @@ -23,7 +23,7 @@ include __DIR__.'/files/phar_test.inc'; try { new Phar($fname); } catch (UnexpectedValueException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -33,4 +33,4 @@ try { @rmdir(__DIR__.'/gh20302'); ?> --EXPECTF-- -Cannot open archive "%sgh20302.phar", alias is already in use by existing archive +UnexpectedValueException: Cannot open archive "%sgh20302.phar", alias is already in use by existing archive diff --git a/ext/phar/tests/gh20882.phpt b/ext/phar/tests/gh20882.phpt index 8928178a22a9..959c1a2a0ba9 100644 --- a/ext/phar/tests/gh20882.phpt +++ b/ext/phar/tests/gh20882.phpt @@ -15,8 +15,8 @@ try { null ); } catch (BadMethodCallException $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Iterator RecursiveIteratorIterator returns an SplFileInfo object, so base directory must be specified +BadMethodCallException: Iterator RecursiveIteratorIterator returns an SplFileInfo object, so base directory must be specified diff --git a/ext/phar/tests/gh21798-offsetget-temp-entry.phpt b/ext/phar/tests/gh21798-offsetget-temp-entry.phpt index b5b11ad43634..7d544afcaafe 100644 --- a/ext/phar/tests/gh21798-offsetget-temp-entry.phpt +++ b/ext/phar/tests/gh21798-offsetget-temp-entry.phpt @@ -16,24 +16,24 @@ $phar = new Phar($fname); try { $phar->offsetGet('.phar/stub.php'); } catch (BadMethodCallException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->offsetGet('.phar/alias.txt'); } catch (BadMethodCallException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->offsetGet('.phar/internal'); } catch (BadMethodCallException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "no crash\n"; ?> --CLEAN-- --EXPECT-- -Entry .phar/stub.php does not exist -Entry .phar/alias.txt does not exist -Entry .phar/internal does not exist +BadMethodCallException: Entry .phar/stub.php does not exist +BadMethodCallException: Entry .phar/alias.txt does not exist +BadMethodCallException: Entry .phar/internal does not exist no crash diff --git a/ext/phar/tests/invalid_alias.phpt b/ext/phar/tests/invalid_alias.phpt index 231dd9fdb315..4cf1f47a9986 100644 --- a/ext/phar/tests/invalid_alias.phpt +++ b/ext/phar/tests/invalid_alias.phpt @@ -12,28 +12,28 @@ $p = new Phar($fname); try { $p->setAlias('hi/'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $p->setAlias('hi\\l'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $p->setAlias('hil;'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $p->setAlias(':hil'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -Invalid alias "hi/" specified for phar "%sinvalid_alias.phar" -Invalid alias "hi\l" specified for phar "%sinvalid_alias.phar" -Invalid alias "hil;" specified for phar "%sinvalid_alias.phar" -Invalid alias ":hil" specified for phar "%sinvalid_alias.phar" +UnexpectedValueException: Invalid alias "hi/" specified for phar "%sinvalid_alias.phar" +UnexpectedValueException: Invalid alias "hi\l" specified for phar "%sinvalid_alias.phar" +UnexpectedValueException: Invalid alias "hil;" specified for phar "%sinvalid_alias.phar" +UnexpectedValueException: Invalid alias ":hil" specified for phar "%sinvalid_alias.phar" diff --git a/ext/phar/tests/invalid_setstubalias.phpt b/ext/phar/tests/invalid_setstubalias.phpt index bcbcb2666928..f2ee71388ddc 100644 --- a/ext/phar/tests/invalid_setstubalias.phpt +++ b/ext/phar/tests/invalid_setstubalias.phpt @@ -13,28 +13,28 @@ $p = new Phar($fname); try { $p['.phar/stub.php'] = 'hi'; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $p['.phar/alias.txt'] = 'hi'; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $p = new Phar($fname2); try { $p['.phar/stub.php'] = 'hi'; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $p['.phar/alias.txt'] = 'hi'; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -Cannot set stub ".phar/stub.php" directly in phar "%sinvalid_setstubalias.phar.tar", use setStub -Cannot set alias ".phar/alias.txt" directly in phar "%sinvalid_setstubalias.phar.tar", use setAlias -Cannot set stub ".phar/stub.php" directly in phar "%sinvalid_setstubalias.phar.zip", use setStub -Cannot set alias ".phar/alias.txt" directly in phar "%sinvalid_setstubalias.phar.zip", use setAlias +BadMethodCallException: Cannot set stub ".phar/stub.php" directly in phar "%sinvalid_setstubalias.phar.tar", use setStub +BadMethodCallException: Cannot set alias ".phar/alias.txt" directly in phar "%sinvalid_setstubalias.phar.tar", use setAlias +BadMethodCallException: Cannot set stub ".phar/stub.php" directly in phar "%sinvalid_setstubalias.phar.zip", use setStub +BadMethodCallException: Cannot set alias ".phar/alias.txt" directly in phar "%sinvalid_setstubalias.phar.zip", use setAlias diff --git a/ext/phar/tests/mkdir.phpt b/ext/phar/tests/mkdir.phpt index 2c1586b0de5c..34962093bb5d 100644 --- a/ext/phar/tests/mkdir.phpt +++ b/ext/phar/tests/mkdir.phpt @@ -22,12 +22,12 @@ $a->addEmptyDir('bb'); try { $a->addEmptyDir('.phar'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->addEmptyDir('/.phar'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $a->addEmptyDir('/.pharx'); var_dump(is_dir($pname . '/.pharx')); @@ -49,6 +49,6 @@ Warning: rmdir(): phar error: cannot remove directory "phar://", no phar archive Warning: rmdir(): phar error: cannot remove directory "" in phar "foo.phar", directory does not exist in %smkdir.php on line %d Warning: rmdir(): phar error: cannot remove directory "a" in phar "%smkdir.phar.php", phar error: path "a" exists and is a not a directory in %smkdir.php on line %d -Cannot create a directory in magic ".phar" directory -Cannot create a directory in magic ".phar" directory +BadMethodCallException: Cannot create a directory in magic ".phar" directory +BadMethodCallException: Cannot create a directory in magic ".phar" directory bool(true) diff --git a/ext/phar/tests/mounteddir.phpt b/ext/phar/tests/mounteddir.phpt index 2f6be58eb4d4..a8699a5d9e24 100644 --- a/ext/phar/tests/mounteddir.phpt +++ b/ext/phar/tests/mounteddir.phpt @@ -62,22 +62,22 @@ foreach ($out as $b) { try { Phar::mount($pname . '/testit', 'another\\..\\mistake'); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::mount($pname . '/notfound', __DIR__ . '/this/does/not/exist'); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::mount($pname . '/testit', __DIR__); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::mount($pname . '/testit/extfile.php', __DIR__); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -109,7 +109,7 @@ extfile2.php phar://%stempmanifest1.phar.php/testit%cdirectory phar://%stempmanifest1.phar.php/testit%cextfile.php phar://%stempmanifest1.phar.php/testit%cextfile2.php -Mounting of /testit to another\..\mistake within phar %stempmanifest1.phar.php failed -Mounting of /notfound to %stests/this/does/not/exist within phar %stempmanifest1.phar.php failed -Mounting of /testit to %stests within phar %stests/tempmanifest1.phar.php failed -Mounting of /testit/extfile.php to %stests within phar %stests/tempmanifest1.phar.php failed +PharException: Mounting of /testit to another\..\mistake within phar %stempmanifest1.phar.php failed +PharException: Mounting of /notfound to %stests/this/does/not/exist within phar %stempmanifest1.phar.php failed +PharException: Mounting of /testit to %stests within phar %stests/tempmanifest1.phar.php failed +PharException: Mounting of /testit/extfile.php to %stests within phar %stests/tempmanifest1.phar.php failed diff --git a/ext/phar/tests/open_for_write_newfile_b.phpt b/ext/phar/tests/open_for_write_newfile_b.phpt index 498e3dd4be3e..22f0042ad9b3 100644 --- a/ext/phar/tests/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/open_for_write_newfile_b.phpt @@ -32,4 +32,3 @@ This is b/c Warning: include(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): Failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.php" in %sopen_for_write_newfile_b.php on line %d Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b.phar.php/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b.php on line %d - diff --git a/ext/phar/tests/open_for_write_newfile_c.phpt b/ext/phar/tests/open_for_write_newfile_c.phpt index 8bb0e2ba6803..13482d4976bb 100644 --- a/ext/phar/tests/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/open_for_write_newfile_c.phpt @@ -32,4 +32,3 @@ This is b/c Warning: include(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): Failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.php" in %sopen_for_write_newfile_c.php on line %d Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c.phar.php/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c.php on line %d - diff --git a/ext/phar/tests/opendir_edgecases.phpt b/ext/phar/tests/opendir_edgecases.phpt index fbca644d18db..6816eaa9e00d 100644 --- a/ext/phar/tests/opendir_edgecases.phpt +++ b/ext/phar/tests/opendir_edgecases.phpt @@ -15,7 +15,7 @@ $pname = 'phar://' . $fname; try { opendir(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } mkdir(__DIR__ . '/opendir_edgecases'); @@ -55,7 +55,7 @@ include $pname . '/foo'; setSignatureAlgorithm(Phar::OPENSSL, "randomcrap"); try { $phar->addEmptyDir('blah'); } catch (PharException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -31,4 +31,4 @@ try { @unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- -phar error: unable to write signature to tar-based phar: unable to write phar "%s" with requested openssl signature +PharException: phar error: unable to write signature to tar-based phar: unable to write phar "%s" with requested openssl signature diff --git a/ext/phar/tests/phar_buildfromdirectory1.phpt b/ext/phar/tests/phar_buildfromdirectory1.phpt index 9ab1fb92151f..6e9809221809 100644 --- a/ext/phar/tests/phar_buildfromdirectory1.phpt +++ b/ext/phar/tests/phar_buildfromdirectory1.phpt @@ -12,10 +12,8 @@ try { ini_set('phar.readonly', 1); $phar->buildFromDirectory(1); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -%s(24) "UnexpectedValueException" -Cannot write to archive - write operations restricted by INI setting +UnexpectedValueException: Cannot write to archive - write operations restricted by INI setting diff --git a/ext/phar/tests/phar_buildfromdirectory2.phpt b/ext/phar/tests/phar_buildfromdirectory2.phpt index c828587548a9..888015621282 100644 --- a/ext/phar/tests/phar_buildfromdirectory2.phpt +++ b/ext/phar/tests/phar_buildfromdirectory2.phpt @@ -15,10 +15,8 @@ try { $phar = new Phar(__DIR__ . '/buildfromdirectory2.phar'); $phar->buildFromDirectory(1); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -%s(24) "UnexpectedValueException" -RecursiveDirectoryIterator::__construct(1): Failed to open directory: No such file or directory +UnexpectedValueException: RecursiveDirectoryIterator::__construct(1): Failed to open directory: No such file or directory diff --git a/ext/phar/tests/phar_buildfromdirectory4.phpt b/ext/phar/tests/phar_buildfromdirectory4.phpt index 79bb51caa00c..8a72f46eca1a 100644 --- a/ext/phar/tests/phar_buildfromdirectory4.phpt +++ b/ext/phar/tests/phar_buildfromdirectory4.phpt @@ -20,8 +20,7 @@ try { asort($a); var_dump($a); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump(file_exists(__DIR__ . '/buildfromdirectory4.phar')); diff --git a/ext/phar/tests/phar_buildfromdirectory5.phpt b/ext/phar/tests/phar_buildfromdirectory5.phpt index 2d468fe3535b..0b8f0a38cfa3 100644 --- a/ext/phar/tests/phar_buildfromdirectory5.phpt +++ b/ext/phar/tests/phar_buildfromdirectory5.phpt @@ -19,8 +19,7 @@ try { asort($a); var_dump($a); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump(file_exists(__DIR__ . '/buildfromdirectory5.phar')); diff --git a/ext/phar/tests/phar_buildfromdirectory6.phpt b/ext/phar/tests/phar_buildfromdirectory6.phpt index a652a89921db..8eafed3216ae 100644 --- a/ext/phar/tests/phar_buildfromdirectory6.phpt +++ b/ext/phar/tests/phar_buildfromdirectory6.phpt @@ -17,8 +17,7 @@ try { $phar = new Phar(__DIR__ . '/buildfromdirectory6.phar'); var_dump($phar->buildFromDirectory(__DIR__ . '/testdir6', '/\.php$/')); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump(file_exists(__DIR__ . '/buildfromdirectory6.phar')); diff --git a/ext/phar/tests/phar_buildfromiterator1.phpt b/ext/phar/tests/phar_buildfromiterator1.phpt index 23daf212054e..a3ff84b41a06 100644 --- a/ext/phar/tests/phar_buildfromiterator1.phpt +++ b/ext/phar/tests/phar_buildfromiterator1.phpt @@ -13,10 +13,8 @@ try { $phar->buildFromIterator(new ArrayIterator([])); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -%s(24) "UnexpectedValueException" -Cannot write out phar archive, phar is read-only +UnexpectedValueException: Cannot write out phar archive, phar is read-only diff --git a/ext/phar/tests/phar_buildfromiterator10.phpt b/ext/phar/tests/phar_buildfromiterator10.phpt index 495f177fabb2..676d545483f3 100644 --- a/ext/phar/tests/phar_buildfromiterator10.phpt +++ b/ext/phar/tests/phar_buildfromiterator10.phpt @@ -18,8 +18,7 @@ try { asort($a); var_dump($a); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/phar_buildfromiterator4.phpt b/ext/phar/tests/phar_buildfromiterator4.phpt index e7bccc27c956..2cf1107fe189 100644 --- a/ext/phar/tests/phar_buildfromiterator4.phpt +++ b/ext/phar/tests/phar_buildfromiterator4.phpt @@ -47,8 +47,7 @@ try { '.phar/oops' => basename(__FILE__, 'php') . 'phpt', )))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/phar_buildfromiterator5.phpt b/ext/phar/tests/phar_buildfromiterator5.phpt index 2ddf1c282ece..aab140946ece 100644 --- a/ext/phar/tests/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/phar_buildfromiterator5.phpt @@ -40,13 +40,11 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator5.phar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass)))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- rewind valid current -%s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) +UnexpectedValueException: Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) diff --git a/ext/phar/tests/phar_buildfromiterator6.phpt b/ext/phar/tests/phar_buildfromiterator6.phpt index 4e4f09f74aa7..d4c8151ab22f 100644 --- a/ext/phar/tests/phar_buildfromiterator6.phpt +++ b/ext/phar/tests/phar_buildfromiterator6.phpt @@ -40,8 +40,7 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator6.phar'); var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt')))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- @@ -49,5 +48,4 @@ rewind valid current key -%s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid key (must return a string) +UnexpectedValueException: Iterator myIterator returned an invalid key (must return a string) diff --git a/ext/phar/tests/phar_buildfromiterator7.phpt b/ext/phar/tests/phar_buildfromiterator7.phpt index 646bcdac2a5c..22a1fbb7fcf0 100644 --- a/ext/phar/tests/phar_buildfromiterator7.phpt +++ b/ext/phar/tests/phar_buildfromiterator7.phpt @@ -40,8 +40,7 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator7.phar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt')))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- @@ -49,5 +48,4 @@ rewind valid current key -%s(24) "UnexpectedValueException" -Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt" +UnexpectedValueException: Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt" diff --git a/ext/phar/tests/phar_buildfromiterator8.phpt b/ext/phar/tests/phar_buildfromiterator8.phpt index 6dbe9dcd3f92..d95f7eaeb8f4 100644 --- a/ext/phar/tests/phar_buildfromiterator8.phpt +++ b/ext/phar/tests/phar_buildfromiterator8.phpt @@ -13,8 +13,7 @@ try { asort($a); var_dump($a); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/phar_buildfromiterator9.phpt b/ext/phar/tests/phar_buildfromiterator9.phpt index a2cb24d8cc7f..4ac01dcc14aa 100644 --- a/ext/phar/tests/phar_buildfromiterator9.phpt +++ b/ext/phar/tests/phar_buildfromiterator9.phpt @@ -41,8 +41,7 @@ try { var_dump($phar->buildFromIterator(new myIterator(array('a' => $a = fopen(basename(__FILE__, 'php') . 'phpt', 'r'))))); fclose($a); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/phar_construct_invalidurl.phpt b/ext/phar/tests/phar_construct_invalidurl.phpt index af281a56fe8f..95ce9dd295a0 100644 --- a/ext/phar/tests/phar_construct_invalidurl.phpt +++ b/ext/phar/tests/phar_construct_invalidurl.phpt @@ -9,20 +9,20 @@ phar try { $a = new Phar('http://should.fail.com'); } catch (UnexpectedValueException $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a = new Phar('http://'); } catch (UnexpectedValueException $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a = new Phar('http:/'); } catch (UnexpectedValueException $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Cannot create a phar archive from a URL like "http://should.fail.com". Phar objects can only be created from local files -Cannot create a phar archive from a URL like "http://". Phar objects can only be created from local files -Cannot create phar 'http:/', file extension (or combination) not recognised or the directory does not exist +UnexpectedValueException: Cannot create a phar archive from a URL like "http://should.fail.com". Phar objects can only be created from local files +UnexpectedValueException: Cannot create a phar archive from a URL like "http://". Phar objects can only be created from local files +UnexpectedValueException: Cannot create phar 'http:/', file extension (or combination) not recognised or the directory does not exist diff --git a/ext/phar/tests/phar_convert_metadata_leak.phpt b/ext/phar/tests/phar_convert_metadata_leak.phpt index 61a240c8888d..6553746b5666 100644 --- a/ext/phar/tests/phar_convert_metadata_leak.phpt +++ b/ext/phar/tests/phar_convert_metadata_leak.phpt @@ -15,10 +15,10 @@ $phar['x'] = 'hi'; try { $phar->convertToData(Phar::ZIP, Phar::NONE, 'phar.zip'); } catch (BadMethodCallException $e) { - echo $e->getMessage(),"\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -data phar "%s" has invalid extension phar.zip +BadMethodCallException: data phar "%s" has invalid extension phar.zip diff --git a/ext/phar/tests/phar_create_in_cwd.phpt b/ext/phar/tests/phar_create_in_cwd.phpt index c6245c295e65..4864589cf45b 100644 --- a/ext/phar/tests/phar_create_in_cwd.phpt +++ b/ext/phar/tests/phar_create_in_cwd.phpt @@ -22,7 +22,7 @@ __HALT_COMPILER(); ?>"); var_dump($p->getStub()); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/phar_createdefaultstub.phpt b/ext/phar/tests/phar_createdefaultstub.phpt index fdc50ce85046..a5a90bce681f 100644 --- a/ext/phar/tests/phar_createdefaultstub.phpt +++ b/ext/phar/tests/phar_createdefaultstub.phpt @@ -16,7 +16,7 @@ echo "========================================================================== echo "============================================================================\n"; var_dump(Phar::createDefaultStub(str_repeat('a', 401))); } catch(Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "============================================================================\n"; echo "============================================================================\n"; @@ -29,7 +29,7 @@ echo "========================================================================== var_dump(strlen(Phar::createDefaultStub('index.php', str_repeat('a', 400)))); var_dump(Phar::createDefaultStub('hio', str_repeat('a', 401))); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- @@ -624,7 +624,7 @@ __HALT_COMPILER(); ?>" int(7032) ============================================================================ ============================================================================ -Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed +PharException: Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed ============================================================================ ============================================================================ ============================================================================ @@ -924,4 +924,4 @@ __HALT_COMPILER(); ?>" ============================================================================ ============================================================================ int(7032) -Illegal web filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed +PharException: Illegal web filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed diff --git a/ext/phar/tests/phar_extract.phpt b/ext/phar/tests/phar_extract.phpt index 7d50a3bed749..1a8475ffa1eb 100644 --- a/ext/phar/tests/phar_extract.phpt +++ b/ext/phar/tests/phar_extract.phpt @@ -47,19 +47,19 @@ var_dump(is_dir(__DIR__ . '/extract1-2/one/level')); try { $a->extractTo(__DIR__ . '/whatever', new stdClass()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->extractTo(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->extractTo(''); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } file_put_contents(__DIR__ . '/oops', 'I is file'); @@ -67,19 +67,19 @@ file_put_contents(__DIR__ . '/oops', 'I is file'); try { $a->extractTo(__DIR__ . '/oops', 'file1.txt'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->extractTo(__DIR__ . '/oops1', array(array(), 'file1.txt')); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a->extractTo(__DIR__ . '/extract', 'file1.txt'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } file_put_contents(__DIR__ . '/extract/file1.txt', 'first'); @@ -91,7 +91,7 @@ var_dump(file_get_contents(__DIR__ . '/extract/file1.txt')); try { $a->extractTo(str_repeat('a', 20000), 'file1.txt'); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $a[str_repeat('a', 20000)] = 'long'; @@ -99,7 +99,7 @@ $a[str_repeat('a', 20000)] = 'long'; try { $a->extractTo(__DIR__ . '/extract', str_repeat('a', 20000)); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -138,13 +138,13 @@ string(2) "hi" string(3) "hi3" string(3) "hi2" bool(false) -Phar::extractTo(): Argument #2 ($files) must be of type array|string|null, stdClass given -Phar::extractTo(): Argument #1 ($directory) must be of type string, array given -Invalid argument, extraction path must be non-zero length -Unable to use path "%soops" for extraction, it is a file, must be a directory -Invalid argument, array of filenames to extract contains non-string value -Extraction from phar "%stempmanifest1.phar.php" failed: Cannot extract "file1.txt" to "%sextract/file1.txt", path already exists +TypeError: Phar::extractTo(): Argument #2 ($files) must be of type array|string|null, stdClass given +TypeError: Phar::extractTo(): Argument #1 ($directory) must be of type string, array given +InvalidArgumentException: Invalid argument, extraction path must be non-zero length +RuntimeException: Unable to use path "%soops" for extraction, it is a file, must be a directory +InvalidArgumentException: Invalid argument, array of filenames to extract contains non-string value +PharException: Extraction from phar "%stempmanifest1.phar.php" failed: Cannot extract "file1.txt" to "%sextract/file1.txt", path already exists string(5) "first" string(2) "hi" -Cannot extract to "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...", destination directory is too long for filesystem -Extraction from phar "%stempmanifest1.phar.php" failed: Cannot extract "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..." to "%s...", extracted filename is too long for filesystem +InvalidArgumentException: Cannot extract to "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...", destination directory is too long for filesystem +PharException: Extraction from phar "%stempmanifest1.phar.php" failed: Cannot extract "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..." to "%s...", extracted filename is too long for filesystem diff --git a/ext/phar/tests/phar_extract3.phpt b/ext/phar/tests/phar_extract3.phpt index 1bd46781b2a9..9de650dd49ec 100644 --- a/ext/phar/tests/phar_extract3.phpt +++ b/ext/phar/tests/phar_extract3.phpt @@ -16,7 +16,7 @@ $phar = new PharData($fname); try { $phar->extractTo($extract); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $phar = new PharData($fname2); @@ -27,7 +27,7 @@ foreach ($phar as $filename) { try { $phar->extractTo($extract); } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -39,6 +39,6 @@ $dir = __DIR__ . '/test-extract3/'; @rmdir($dir); ?> --EXPECTF-- -Invalid argument, %sfiles/bogus.zip cannot be found +InvalidArgumentException: Invalid argument, %sfiles/bogus.zip cannot be found phar://%sfiles/notbogus.zip%cnonsense.txt phar://%sfiles/notbogus.zip%cstuff.txt diff --git a/ext/phar/tests/phar_magic_dir_prefix.phpt b/ext/phar/tests/phar_magic_dir_prefix.phpt index e1f1c517632e..fefd04dbc75a 100644 --- a/ext/phar/tests/phar_magic_dir_prefix.phpt +++ b/ext/phar/tests/phar_magic_dir_prefix.phpt @@ -43,13 +43,13 @@ var_dump($subdir); try { $phar->addFromString('.phar/still-magic.txt', 'no'); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->addEmptyDir('/.phar'); } catch (Throwable $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -76,5 +76,5 @@ array(3) { [2]=> string(15) "from-string.txt" } -Cannot create any files in magic ".phar" directory -Cannot create a directory in magic ".phar" directory +BadMethodCallException: Cannot create any files in magic ".phar" directory +BadMethodCallException: Cannot create a directory in magic ".phar" directory diff --git a/ext/phar/tests/phar_metadata_write4.phpt b/ext/phar/tests/phar_metadata_write4.phpt index ad9f4d47d91c..ee90165eaf9a 100644 --- a/ext/phar/tests/phar_metadata_write4.phpt +++ b/ext/phar/tests/phar_metadata_write4.phpt @@ -55,7 +55,7 @@ var_dump($phar['a']->getMetadata(['allowed_classes' => true])); try { var_dump($phar['a']->setMetadata(new ThrowsOnSerialize())); } catch (RuntimeException $e) { - echo "Caught {$e->getMessage()} at {$e->getFile()}:{$e->getLine()}\n"; + echo $e::class, ': ', $e->getMessage(), ' in ', $e->getFile(), ' on line ', $e->getLine(), PHP_EOL; unset($e); } var_dump($phar['a']->getMetadata([])); @@ -90,7 +90,7 @@ In __wakeup 2 object(EchoesOnWakeup)#2 (0) { } In __destruct 2 -Caught In sleep at %sphar_metadata_write4.php:12 +RuntimeException: In sleep in %sphar_metadata_write4.php on line 12 In __wakeup 3 object(EchoesOnWakeup)#3 (0) { } @@ -98,4 +98,4 @@ In __destruct 3 object(__PHP_Incomplete_Class)#4 (1) { ["__PHP_Incomplete_Class_Name"]=> string(14) "EchoesOnWakeup" -} \ No newline at end of file +} diff --git a/ext/phar/tests/phar_mount.phpt b/ext/phar/tests/phar_mount.phpt index ca3838398481..2b08713617fb 100644 --- a/ext/phar/tests/phar_mount.phpt +++ b/ext/phar/tests/phar_mount.phpt @@ -39,12 +39,12 @@ __HALT_COMPILER();'); try { include $fname2; } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::mount($pname . '/oops', '/home/oops/../../etc/passwd:'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } Phar::mount($pname . '/testit2', $pname . '/testit1'); echo substr($a['testit2']->getContent(),0, 50),"\n"; @@ -55,7 +55,7 @@ echo substr($a['testit2']->getContent(),0, 50),"\n"; --EXPECTF-- Mounting of testit to %sphar_mount.php within phar %sphar_mount.phar.php failed Can only mount internal paths within a phar archive, use a relative path instead of "phar://%sphar_mount.phar.php/testit1" -Mounting of testit to %sphar_mount.php within phar %sphar_mount.phar.tar failed -Mounting of /oops to /home/oops/../../etc/passwd: within phar %sphar_mount.phar.php failed +PharException: Mounting of testit to %sphar_mount.php within phar %sphar_mount.phar.tar failed +PharException: Mounting of /oops to /home/oops/../../etc/passwd: within phar %sphar_mount.phar.php failed offsetGet('.phar/stub.php'); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->offsetGet('.phar/alias.txt'); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->offsetSet('.phar/stub.php', ''); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump(strlen($phar->getStub())); @@ -40,7 +40,7 @@ var_dump(strlen($phar->getStub())); try { $phar->offsetUnset('.phar/stub.php'); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump(strlen($phar->getStub())); @@ -48,7 +48,7 @@ var_dump(strlen($phar->getStub())); try { $phar->offsetSet('.phar/alias.txt', 'dolly'); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getAlias()); @@ -56,7 +56,7 @@ var_dump($phar->getAlias()); try { $phar->offsetUnset('.phar/alias.txt'); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getAlias()); @@ -65,11 +65,11 @@ var_dump($phar->getAlias()); --CLEAN-- --EXPECTF-- -Entry .phar/stub.php does not exist -Entry .phar/alias.txt does not exist -Cannot set stub ".phar/stub.php" directly in phar "%sphar_offset_check.phar.php", use setStub +BadMethodCallException: Entry .phar/stub.php does not exist +BadMethodCallException: Entry .phar/alias.txt does not exist +BadMethodCallException: Cannot set stub ".phar/stub.php" directly in phar "%sphar_offset_check.phar.php", use setStub int(6643) int(6643) -Cannot set alias ".phar/alias.txt" directly in phar "%sphar_offset_check.phar.php", use setAlias +BadMethodCallException: Cannot set alias ".phar/alias.txt" directly in phar "%sphar_offset_check.phar.php", use setAlias string(5) "susan" string(5) "susan" diff --git a/ext/phar/tests/phar_offset_get_error.phpt b/ext/phar/tests/phar_offset_get_error.phpt index b97971f8c3e5..6d16aa56be4d 100644 --- a/ext/phar/tests/phar_offset_get_error.phpt +++ b/ext/phar/tests/phar_offset_get_error.phpt @@ -22,7 +22,7 @@ try } catch(Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } include($pname . $iname); @@ -31,18 +31,18 @@ include($pname . $iname); try { $p['.phar/oops'] = 'hi'; } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a = $p['.phar/stub.php']; } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECT-- -Entry /error/.. does not exist and cannot be created: phar error: invalid path "/error/.." contains upper directory reference +BadMethodCallException: Entry /error/.. does not exist and cannot be created: phar error: invalid path "/error/.." contains upper directory reference foobar -Cannot set any files or directories in magic ".phar" directory -Entry .phar/stub.php does not exist +BadMethodCallException: Cannot set any files or directories in magic ".phar" directory +BadMethodCallException: Entry .phar/stub.php does not exist diff --git a/ext/phar/tests/phar_oo_001.phpt b/ext/phar/tests/phar_oo_001.phpt index e30d112109f1..dbac6547006b 100644 --- a/ext/phar/tests/phar_oo_001.phpt +++ b/ext/phar/tests/phar_oo_001.phpt @@ -28,14 +28,14 @@ try } catch (LogicException $e) { - var_dump($e->getMessage()); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar = new Phar('test.phar'); $phar->__construct('oops'); } catch (LogicException $e) { - var_dump($e->getMessage()); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -47,5 +47,5 @@ __halt_compiler(); --EXPECT-- string(5) "1.0.0" int(5) -string(50) "Cannot call method on an uninitialized Phar object" -string(29) "Cannot call constructor twice" +BadMethodCallException: Cannot call method on an uninitialized Phar object +BadMethodCallException: Cannot call constructor twice diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt index a21f8188415b..9b6cab43f2fa 100644 --- a/ext/phar/tests/phar_oo_006.phpt +++ b/ext/phar/tests/phar_oo_006.phpt @@ -25,7 +25,7 @@ try } catch (TypeError $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $phar->setInfoClass('MyFile'); @@ -40,7 +40,7 @@ unlink(__DIR__ . '/files/phar_oo_006.phar.php'); __halt_compiler(); ?> --EXPECTF-- -SplFileInfo::setFileClass(): Argument #1 ($class) must be a class name derived from SplFileObject, SplFileInfo given +TypeError: SplFileInfo::setFileClass(): Argument #1 ($class) must be a class name derived from SplFileObject, SplFileInfo given MyFile::__construct(phar://%s/a.php) a.php MyFile::__construct(phar://%s/b/c.php) diff --git a/ext/phar/tests/phar_oo_011b.phpt b/ext/phar/tests/phar_oo_011b.phpt index 44677732cfbb..95dcd646bbb9 100644 --- a/ext/phar/tests/phar_oo_011b.phpt +++ b/ext/phar/tests/phar_oo_011b.phpt @@ -23,7 +23,7 @@ try } catch (BadMethodCallException $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -33,4 +33,4 @@ unlink(__DIR__ . '/files/phar_oo_011b.phar.php'); __halt_compiler(); ?> --EXPECT-- -Exception: Write operations disabled by the php.ini setting phar.readonly +BadMethodCallException: Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/phar_oo_012b.phpt b/ext/phar/tests/phar_oo_012b.phpt index 296d2e04f898..ff534d275ab4 100644 --- a/ext/phar/tests/phar_oo_012b.phpt +++ b/ext/phar/tests/phar_oo_012b.phpt @@ -26,7 +26,7 @@ try } catch (BadMethodCallException $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -36,4 +36,4 @@ unlink(__DIR__ . '/files/phar_oo_012b.phar.php'); __halt_compiler(); ?> --EXPECT-- -Exception: Write operations disabled by the php.ini setting phar.readonly +BadMethodCallException: Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/phar_oo_getcontents.phpt b/ext/phar/tests/phar_oo_getcontents.phpt index 7883610ff7fd..9187b0fd2bf7 100644 --- a/ext/phar/tests/phar_oo_getcontents.phpt +++ b/ext/phar/tests/phar_oo_getcontents.phpt @@ -16,12 +16,12 @@ echo $phar['a/b']->getContent() . "\n"; try { echo $phar['a']->getContent(), "\n"; } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { echo $phar['hi']->getContent(), "\n"; } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -32,5 +32,5 @@ __halt_compiler(); --EXPECTF-- file contents this works -phar error: Cannot retrieve contents, "a" in phar "%sphar_oo_getcontents.phar.php" is a directory -phar error: Cannot retrieve contents, "hi" in phar "%sphar_oo_getcontents.phar.php" is a directory +BadMethodCallException: phar error: Cannot retrieve contents, "a" in phar "%sphar_oo_getcontents.phar.php" is a directory +BadMethodCallException: phar error: Cannot retrieve contents, "hi" in phar "%sphar_oo_getcontents.phar.php" is a directory diff --git a/ext/phar/tests/phar_setalias2.phpt b/ext/phar/tests/phar_setalias2.phpt index 7944af8330bd..4fb4a95153a0 100644 --- a/ext/phar/tests/phar_setalias2.phpt +++ b/ext/phar/tests/phar_setalias2.phpt @@ -27,12 +27,12 @@ $phar = new Phar(__DIR__ . '/notphar.phar'); try { $phar->setAlias('test'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b = new Phar(__DIR__ . '/nope.phar', 0, 'test'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -42,5 +42,5 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); --EXPECTF-- hio test -alias "test" is already used for archive "%sphar_setalias2.phar.php" and cannot be used for other archives -alias "test" is already used for archive "%sphar_setalias2.phar.php" cannot be overloaded with "%snope.phar" +PharException: alias "test" is already used for archive "%sphar_setalias2.phar.php" and cannot be used for other archives +UnexpectedValueException: alias "test" is already used for archive "%sphar_setalias2.phar.php" cannot be overloaded with "%snope.phar" diff --git a/ext/phar/tests/phar_setdefaultstub.phpt b/ext/phar/tests/phar_setdefaultstub.phpt index c5db64a308e6..9013b3bd1afa 100644 --- a/ext/phar/tests/phar_setdefaultstub.phpt +++ b/ext/phar/tests/phar_setdefaultstub.phpt @@ -44,7 +44,7 @@ try { var_dump(strlen($phar->getStub())); } catch(Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -939,4 +939,4 @@ __HALT_COMPILER(); ?> ============================================================================ ============================================================================ int(7034) -Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed +UnexpectedValueException: Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed diff --git a/ext/phar/tests/phar_stub.phpt b/ext/phar/tests/phar_stub.phpt index 0ede5f011e11..cd2db6f1ed59 100644 --- a/ext/phar/tests/phar_stub.phpt +++ b/ext/phar/tests/phar_stub.phpt @@ -61,7 +61,7 @@ set_error_handler(function ($severity, $message, $file, $line) { try { $phar->setStub($fp); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } set_error_handler(null); fclose($fp); @@ -106,7 +106,7 @@ __HALT_COMPILER(); Deprecated: Calling Phar::setStub(resource $stub, int $length) is deprecated in %s on line %d booya -Calling Phar::setStub(resource $stub, int $length) is deprecated +Exception: Calling Phar::setStub(resource $stub, int $length) is deprecated Deprecated: Calling Phar::setStub(resource $stub, int $length) is deprecated in %s on line %d diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt index 9515e8675a4b..1de4f4ebc976 100644 --- a/ext/phar/tests/phar_stub_error.phpt +++ b/ext/phar/tests/phar_stub_error.phpt @@ -29,7 +29,7 @@ try } catch(exception $e) { - echo 'Exception: ' . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); var_dump($phar->getStub() == $stub); @@ -47,7 +47,7 @@ __HALT_COMPILER(); string(48) "" string(48) "" bool(true) -Exception: illegal stub for phar "%sphar_stub_error.phar.php" (__HALT_COMPILER(); is missing) +PharException: illegal stub for phar "%sphar_stub_error.phar.php" (__HALT_COMPILER(); is missing) string(48) "" bool(true) string(48) "" diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt index c76669be17bd..91b90e9a5c49 100644 --- a/ext/phar/tests/phar_unlinkarchive.phpt +++ b/ext/phar/tests/phar_unlinkarchive.phpt @@ -11,7 +11,7 @@ phar.readonly=0 try { Phar::unlinkArchive(""); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; @@ -20,18 +20,18 @@ $pdname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; try { Phar::unlinkArchive($fname); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } file_put_contents($pdname, 'blahblah'); try { Phar::unlinkArchive($pdname); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { Phar::unlinkArchive(array()); } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $pname = 'phar://' . $fname; @@ -53,7 +53,7 @@ var_dump($phar->getStub()); try { Phar::unlinkArchive($fname); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $phar = $phar->convertToExecutable(Phar::ZIP); var_dump($phar->isFileFormat(Phar::ZIP)); @@ -89,13 +89,13 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- -Unknown phar archive "" -Unknown phar archive "%sphar_unlinkarchive.phar" -Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry) -Phar::unlinkArchive(): Argument #1 ($filename) must be of type string, array given +PharException: Unknown phar archive "" +PharException: Unknown phar archive "%sphar_unlinkarchive.phar" +PharException: Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry) +TypeError: Phar::unlinkArchive(): Argument #1 ($filename) must be of type string, array given bool(false) string(48) "" -phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive() +PharException: phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive() bool(true) string(60) "chmod(066); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } lstat($pname . '/a/b'); // sets BG(CurrentLStatFile) $b->chmod(0666); @@ -25,4 +25,4 @@ $b->chmod(0666); --CLEAN-- --EXPECT-- -Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod +BadMethodCallException: Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt index 4839b8ebf8b4..6a4df354629f 100644 --- a/ext/phar/tests/pharfileinfo_construct.phpt +++ b/ext/phar/tests/pharfileinfo_construct.phpt @@ -13,14 +13,14 @@ try { file_put_contents($fname, 'blah'); $a = new PharFileInfo($pname . '/oops'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; unlink($fname); } try { $a = new PharFileInfo(array()); } catch (TypeError $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $a = new Phar($fname); @@ -30,26 +30,26 @@ $b = $a['a']; try { $a = new PharFileInfo($pname . '/oops/I/do/not/exist'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b->__construct('oops'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $a = new PharFileInfo(__FILE__); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry) -PharFileInfo::__construct(): Argument #1 ($filename) must be of type string, array given -Cannot access phar file entry '%s' in archive '%s' -Cannot call constructor twice -'%s' is not a valid phar archive URL (must have at least phar://filename.phar) +RuntimeException: Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry) +TypeError: PharFileInfo::__construct(): Argument #1 ($filename) must be of type string, array given +RuntimeException: Cannot access phar file entry '%s' in archive '%s' +BadMethodCallException: Cannot call constructor twice +RuntimeException: '%s' is not a valid phar archive URL (must have at least phar://filename.phar) diff --git a/ext/phar/tests/pharfileinfo_getcrc32.phpt b/ext/phar/tests/pharfileinfo_getcrc32.phpt index e9c682317c8b..32a8b6410110 100644 --- a/ext/phar/tests/pharfileinfo_getcrc32.phpt +++ b/ext/phar/tests/pharfileinfo_getcrc32.phpt @@ -23,25 +23,25 @@ $b = new PharFileInfo($pname . '/a/subdir'); try { var_dump($b->getCRC32()); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $b = new PharFileInfo($pname . '/a/subdir/here'); try { var_dump($b->getCRC32()); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $a = file_get_contents($pname . '/a/subdir/here'); try { var_dump($b->getCRC32()); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- -Phar entry is a directory, does not have a CRC -Phar entry was not CRC checked +BadMethodCallException: Phar entry is a directory, does not have a CRC +BadMethodCallException: Phar entry was not CRC checked int(%s) diff --git a/ext/phar/tests/pharfileinfo_setmetadata.phpt b/ext/phar/tests/pharfileinfo_setmetadata.phpt index 46990f46f142..b2fc8e45577a 100644 --- a/ext/phar/tests/pharfileinfo_setmetadata.phpt +++ b/ext/phar/tests/pharfileinfo_setmetadata.phpt @@ -18,30 +18,30 @@ $b = $phar['a/b']; try { $phar['a']->setMetadata('hi'); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar['a']->delMetadata(); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly', 1); try { $b->setMetadata('hi'); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b->delMetadata(); } catch (Exception $e) { -echo $e->getMessage(), "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECT-- -Phar entry is a temporary directory (not an actual entry in the archive), cannot set metadata -Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata -Write operations disabled by the php.ini setting phar.readonly -Write operations disabled by the php.ini setting phar.readonly +BadMethodCallException: Phar entry is a temporary directory (not an actual entry in the archive), cannot set metadata +BadMethodCallException: Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata +BadMethodCallException: Write operations disabled by the php.ini setting phar.readonly +BadMethodCallException: Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/tar/033.phpt b/ext/phar/tests/tar/033.phpt index f13121951fe5..ee6353a80198 100644 --- a/ext/phar/tests/tar/033.phpt +++ b/ext/phar/tests/tar/033.phpt @@ -36,7 +36,7 @@ try { $phar['test']->chmod(0666); var_dump($phar['test']->isReadable()); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/phar/tests/tar/033a.phpt b/ext/phar/tests/tar/033a.phpt index f0f3faf58e09..1b8894511980 100644 --- a/ext/phar/tests/tar/033a.phpt +++ b/ext/phar/tests/tar/033a.phpt @@ -37,7 +37,7 @@ try { $phar['test']->chmod(0666); var_dump($phar['test']->isReadable()); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -46,4 +46,4 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- bool(false) -Cannot modify permissions for file "a.php" in phar "%s033a.phar.tar", write operations are prohibited +PharException: Cannot modify permissions for file "a.php" in phar "%s033a.phar.tar", write operations are prohibited diff --git a/ext/phar/tests/tar/alias_acrobatics.phpt b/ext/phar/tests/tar/alias_acrobatics.phpt index c3d9134a5a48..23585d126ac6 100644 --- a/ext/phar/tests/tar/alias_acrobatics.phpt +++ b/ext/phar/tests/tar/alias_acrobatics.phpt @@ -17,19 +17,19 @@ $p['unused'] = 'hi'; try { $a = new Phar($fname2, 0, 'foo'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } copy($fname, $fname2); echo "2\n"; try { $a = new Phar($fname2); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b = new Phar($fname, 0, 'another'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -38,7 +38,7 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); ?> --EXPECTF-- -alias "foo" is already used for archive "%salias_acrobatics.phar.tar" cannot be overloaded with "%salias_acrobatics.2.phar.tar" +UnexpectedValueException: alias "foo" is already used for archive "%salias_acrobatics.phar.tar" cannot be overloaded with "%salias_acrobatics.2.phar.tar" 2 -phar error: Unable to add tar-based phar "%salias_acrobatics.2.phar.tar", alias is already in use -alias "another" is already used for archive "%salias_acrobatics.phar.tar" cannot be overloaded with "%salias_acrobatics.phar.tar" +UnexpectedValueException: phar error: Unable to add tar-based phar "%salias_acrobatics.2.phar.tar", alias is already in use +UnexpectedValueException: alias "another" is already used for archive "%salias_acrobatics.phar.tar" cannot be overloaded with "%salias_acrobatics.phar.tar" diff --git a/ext/phar/tests/tar/badchecksum.phpt b/ext/phar/tests/tar/badchecksum.phpt index be74dd531c2e..b97d1c069e02 100644 --- a/ext/phar/tests/tar/badchecksum.phpt +++ b/ext/phar/tests/tar/badchecksum.phpt @@ -16,7 +16,7 @@ $a->close(); try { $p = new PharData($fname); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -25,4 +25,4 @@ try { unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- -phar error: "%sbadchecksum.tar" is a corrupted tar file (checksum mismatch of file "hithere") +UnexpectedValueException: phar error: "%sbadchecksum.tar" is a corrupted tar file (checksum mismatch of file "hithere") diff --git a/ext/phar/tests/tar/bignames.phpt b/ext/phar/tests/tar/bignames.phpt index 0c5d3cbca713..009c4907dd70 100644 --- a/ext/phar/tests/tar/bignames.phpt +++ b/ext/phar/tests/tar/bignames.phpt @@ -23,21 +23,21 @@ echo $p2[str_repeat('a', 155) . '/' . str_repeat('b', 100)]->getContent() . "\n" try { $p2[str_repeat('a', 400)] = 'yuck'; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $p2 = new PharData($fname3); $p2[str_repeat('a', 101)] = 'yuck'; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $p2 = new PharData($fname4); $p2[str_repeat('b', 160) . '/' . str_repeat('a', 90)] = 'yuck'; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -50,6 +50,6 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); --EXPECTF-- hi hi2 -tar-based phar "%sbignames.2.tar" cannot be created, filename "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format -tar-based phar "%sbignames.3.tar" cannot be created, filename "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format -tar-based phar "%sbignames.4.tar" cannot be created, filename "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format +PharException: tar-based phar "%sbignames.2.tar" cannot be created, filename "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format +PharException: tar-based phar "%sbignames.3.tar" cannot be created, filename "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format +PharException: tar-based phar "%sbignames.4.tar" cannot be created, filename "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is too long for tar file format diff --git a/ext/phar/tests/tar/create_new_phar_b.phpt b/ext/phar/tests/tar/create_new_phar_b.phpt index 7ec06f42931c..a9103f3493bc 100644 --- a/ext/phar/tests/tar/create_new_phar_b.phpt +++ b/ext/phar/tests/tar/create_new_phar_b.phpt @@ -18,4 +18,3 @@ Warning: file_put_contents(phar://%screate_new_phar_b.phar.tar/a.php): Failed to Warning: include(phar://%screate_new_phar_b.phar.tar/a.php): Failed to open stream: %s in %screate_new_phar_b.php on line %d Warning: include(): Failed opening 'phar://%screate_new_phar_b.phar.tar/a.php' for inclusion (include_path='%s') in %screate_new_phar_b.php on line %d - diff --git a/ext/phar/tests/tar/delete_in_phar.phpt b/ext/phar/tests/tar/delete_in_phar.phpt index b9f624c728da..c552c48b2073 100644 --- a/ext/phar/tests/tar/delete_in_phar.phpt +++ b/ext/phar/tests/tar/delete_in_phar.phpt @@ -45,4 +45,3 @@ This is b Warning: include(%sdelete_in_phar.phar.tar/b/c.php): Failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar.phar.tar" in %sdelete_in_phar.php on line %d Warning: include(): Failed opening 'phar://%sdelete_in_phar.phar.tar/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar.php on line %d - diff --git a/ext/phar/tests/tar/delete_in_phar_b.phpt b/ext/phar/tests/tar/delete_in_phar_b.phpt index 812a43755b2e..a1c4f3be9cb6 100644 --- a/ext/phar/tests/tar/delete_in_phar_b.phpt +++ b/ext/phar/tests/tar/delete_in_phar_b.phpt @@ -44,4 +44,3 @@ Warning: unlink(): phar error: write operations disabled by the php.ini setting This is a This is b This is b/c - diff --git a/ext/phar/tests/tar/delete_in_phar_confirm.phpt b/ext/phar/tests/tar/delete_in_phar_confirm.phpt index 4a952a4b9f1b..e392f86a01a7 100644 --- a/ext/phar/tests/tar/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/tar/delete_in_phar_confirm.phpt @@ -48,4 +48,3 @@ This is b Warning: include(%sdelete_in_phar_confirm.phar.tar/b/c.php): Failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar_confirm.phar.tar" in %sdelete_in_phar_confirm.php on line %d Warning: include(): Failed opening 'phar://%sdelete_in_phar_confirm.phar.tar/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar_confirm.php on line %d - diff --git a/ext/phar/tests/tar/exists_as_phar.phpt b/ext/phar/tests/tar/exists_as_phar.phpt index 9007d73e5fa5..d2cbc0e3cb72 100644 --- a/ext/phar/tests/tar/exists_as_phar.phpt +++ b/ext/phar/tests/tar/exists_as_phar.phpt @@ -23,7 +23,7 @@ $phar->setAlias('hio2'); try { $p = new Phar($tname); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -33,4 +33,4 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- -phar tar error: "%sexists_as_phar.phar.tar" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar +UnexpectedValueException: phar tar error: "%sexists_as_phar.phar.tar" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar diff --git a/ext/phar/tests/tar/links.phpt b/ext/phar/tests/tar/links.phpt index cde880a74017..05e087616dd5 100644 --- a/ext/phar/tests/tar/links.phpt +++ b/ext/phar/tests/tar/links.phpt @@ -11,7 +11,7 @@ copy(__DIR__ . '/files/links.tar', $fname); try { $p = new PharData($fname); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($p['testit/link']->getContent()); var_dump($p['testit/hard']->getContent()); diff --git a/ext/phar/tests/tar/links2.phpt b/ext/phar/tests/tar/links2.phpt index 9d0292e7101d..a781b00ae885 100644 --- a/ext/phar/tests/tar/links2.phpt +++ b/ext/phar/tests/tar/links2.phpt @@ -22,7 +22,7 @@ $a->close(); try { $p = new PharData($fname); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -30,4 +30,4 @@ try { unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- -phar error: "%slinks2.tar" is a corrupted tar file - hard link to non-existent file "internal/file.txt" +UnexpectedValueException: phar error: "%slinks2.tar" is a corrupted tar file - hard link to non-existent file "internal/file.txt" diff --git a/ext/phar/tests/tar/links3.phpt b/ext/phar/tests/tar/links3.phpt index a887f5046f30..cb5b032f8960 100644 --- a/ext/phar/tests/tar/links3.phpt +++ b/ext/phar/tests/tar/links3.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 try { $p = new PharData(__DIR__ . '/files/biglink.tar'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo $p['file.txt']->getContent(); echo $p['my/file']->getContent(); diff --git a/ext/phar/tests/tar/links4.phpt b/ext/phar/tests/tar/links4.phpt index aa026e6e1ea0..e224ec6f6595 100644 --- a/ext/phar/tests/tar/links4.phpt +++ b/ext/phar/tests/tar/links4.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 try { $p = new PharData(__DIR__ . '/files/tinylink.tar'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo $p['file.txt']->getContent(); echo $p['link.txt']->getContent(); diff --git a/ext/phar/tests/tar/links5.phpt b/ext/phar/tests/tar/links5.phpt index 05ab8ce53f99..e9c2a5cecf35 100644 --- a/ext/phar/tests/tar/links5.phpt +++ b/ext/phar/tests/tar/links5.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 try { $p = new PharData(__DIR__ . '/files/subdirlink.tar'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo $p['hi/test.txt']->getContent(); echo $p['hi/link.txt']->getContent(); diff --git a/ext/phar/tests/tar/links6.phpt b/ext/phar/tests/tar/links6.phpt index 614c3bd66e5c..adb0c1adaed6 100644 --- a/ext/phar/tests/tar/links6.phpt +++ b/ext/phar/tests/tar/links6.phpt @@ -22,4 +22,3 @@ hi there hi there there - diff --git a/ext/phar/tests/tar/open_for_write_existing_b.phpt b/ext/phar/tests/tar/open_for_write_existing_b.phpt index ce400ab687ff..8d163d33d4cb 100644 --- a/ext/phar/tests/tar/open_for_write_existing_b.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_b.phpt @@ -39,4 +39,3 @@ include $alias . '/b/c.php'; Warning: fopen(phar://%sopen_for_write_existing_b.phar.tar/b/c.php): Failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d bool(false) This is b/c - diff --git a/ext/phar/tests/tar/open_for_write_existing_c.phpt b/ext/phar/tests/tar/open_for_write_existing_c.phpt index 0d251944b9f4..2bc06282e18c 100644 --- a/ext/phar/tests/tar/open_for_write_existing_c.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_c.phpt @@ -39,4 +39,3 @@ include $alias . '/b/c.php'; Warning: fopen(phar://%sopen_for_write_existing_c.phar.tar/b/c.php): Failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d bool(false) This is b/c - diff --git a/ext/phar/tests/tar/open_for_write_newfile_b.phpt b/ext/phar/tests/tar/open_for_write_newfile_b.phpt index c4192f2a8623..d8e273712540 100644 --- a/ext/phar/tests/tar/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_b.phpt @@ -44,4 +44,3 @@ This is b/c Warning: include(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): Failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.tar" in %sopen_for_write_newfile_b.php on line %d Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b.phar.tar/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b.php on line %d - diff --git a/ext/phar/tests/tar/open_for_write_newfile_c.phpt b/ext/phar/tests/tar/open_for_write_newfile_c.phpt index 89887823cc26..9b3ff0a3cd79 100644 --- a/ext/phar/tests/tar/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_c.phpt @@ -43,4 +43,3 @@ This is b/c Warning: include(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): Failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.tar" in %sopen_for_write_newfile_c.php on line %d Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c.phar.tar/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c.php on line %d - diff --git a/ext/phar/tests/tar/phar_buildfromiterator5.phpt b/ext/phar/tests/tar/phar_buildfromiterator5.phpt index 6a81c1df65d2..f9b1cbc2501b 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator5.phpt @@ -40,13 +40,11 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass)))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- rewind valid current -%s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) +UnexpectedValueException: Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) diff --git a/ext/phar/tests/tar/phar_buildfromiterator6.phpt b/ext/phar/tests/tar/phar_buildfromiterator6.phpt index 918203697998..dc48ab1be048 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator6.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator6.phpt @@ -40,8 +40,7 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt')))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- @@ -49,5 +48,4 @@ rewind valid current key -%s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid key (must return a string) +UnexpectedValueException: Iterator myIterator returned an invalid key (must return a string) diff --git a/ext/phar/tests/tar/phar_buildfromiterator7.phpt b/ext/phar/tests/tar/phar_buildfromiterator7.phpt index 297b40b5eedd..527824e76934 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator7.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator7.phpt @@ -40,8 +40,7 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt')))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- @@ -49,5 +48,4 @@ rewind valid current key -%s(24) "UnexpectedValueException" -Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt" +UnexpectedValueException: Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt" diff --git a/ext/phar/tests/tar/phar_setalias2.phpt b/ext/phar/tests/tar/phar_setalias2.phpt index 31df9ae59aa1..83c1a48ba128 100644 --- a/ext/phar/tests/tar/phar_setalias2.phpt +++ b/ext/phar/tests/tar/phar_setalias2.phpt @@ -35,7 +35,7 @@ $phar = new Phar(__DIR__ . '/notphar.phar'); try { $phar->setAlias('test'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -46,4 +46,4 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); --EXPECTF-- hio test -alias "test" is already used for archive "%sphar_setalias2.phar.tar" and cannot be used for other archives +PharException: alias "test" is already used for archive "%sphar_setalias2.phar.tar" and cannot be used for other archives diff --git a/ext/phar/tests/tar/phar_setdefaultstub.phpt b/ext/phar/tests/tar/phar_setdefaultstub.phpt index ffb1887c2339..a49a88d6c6bd 100644 --- a/ext/phar/tests/tar/phar_setdefaultstub.phpt +++ b/ext/phar/tests/tar/phar_setdefaultstub.phpt @@ -23,7 +23,7 @@ try { $phar->setDefaultStub(); $phar->stopBuffering(); } catch(Exception $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); @@ -34,13 +34,13 @@ echo "========================================================================== try { $phar->setDefaultStub('my/custom/thingy.php'); } catch(ValueError $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->stopBuffering(); } catch(Exception $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); @@ -51,13 +51,13 @@ echo "========================================================================== try { $phar->setDefaultStub('my/custom/thingy.php', 'the/web.php'); } catch(ValueError $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->stopBuffering(); } catch(Exception $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); @@ -76,11 +76,11 @@ string(60) "'; try { $phar->setStub($newstub); } catch(exception $e) { - echo 'Exception: ' . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); @@ -44,7 +44,7 @@ __HALT_COMPILER(); string(50) " " bool(true) -Exception: illegal stub for tar-based phar "%sphar_stub_error.phar.tar" +PharException: illegal stub for tar-based phar "%sphar_stub_error.phar.tar" string(50) " " bool(true) diff --git a/ext/phar/tests/tar/require_hash.phpt b/ext/phar/tests/tar/require_hash.phpt index f3463343b480..a7ade2e9baea 100644 --- a/ext/phar/tests/tar/require_hash.phpt +++ b/ext/phar/tests/tar/require_hash.phpt @@ -24,7 +24,7 @@ try { $phar = new Phar($fname); var_dump($phar->getStub()); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.require_hash', 0); try { @@ -34,7 +34,7 @@ try { $phar->setSignatureAlgorithm(Phar::MD5); var_dump($phar->getSignature()); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -44,7 +44,7 @@ try { @unlink(__DIR__ . '/require_hash.tar'); ?> --EXPECTF-- -tar-based phar "%srequire_hash.phar.tar" does not have a signature +UnexpectedValueException: tar-based phar "%srequire_hash.phar.tar" does not have a signature bool(false) array(2) { ["hash"]=> diff --git a/ext/phar/tests/tar/tar_001.phpt b/ext/phar/tests/tar/tar_001.phpt index 55b56c0469ae..27fafcb675e9 100644 --- a/ext/phar/tests/tar/tar_001.phpt +++ b/ext/phar/tests/tar/tar_001.phpt @@ -16,7 +16,7 @@ try { $phar = new Phar(__DIR__ . '/tar_001.phar.tar'); echo "should not execute\n"; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -25,4 +25,4 @@ try { ?> --EXPECTF-- Warning: fopen(phar://%star_001.phar.tar/tar_001.phpt): Failed to open stream: phar error: "%star_001.phar.tar" is a corrupted tar file (truncated) in %star_001.php on line 9 -phar error: "%star_001.phar.tar" is a corrupted tar file (truncated) +UnexpectedValueException: phar error: "%star_001.phar.tar" is a corrupted tar file (truncated) diff --git a/ext/phar/tests/tar/tar_002.phpt b/ext/phar/tests/tar/tar_002.phpt index 75bbe91d8c37..866835e6078f 100644 --- a/ext/phar/tests/tar/tar_002.phpt +++ b/ext/phar/tests/tar/tar_002.phpt @@ -19,7 +19,7 @@ try { $phar = new Phar(__DIR__ . '/tar_002.phar.tar'); echo "should not execute\n"; } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -28,4 +28,4 @@ try { ?> --EXPECTF-- Warning: fopen(phar://%star_002.phar.tar/tar_002.phpt): Failed to open stream: phar error: "%star_002.phar.tar" is a corrupted tar file (truncated) in %star_002.php on line 9 -phar error: "%star_002.phar.tar" is a corrupted tar file (truncated) +UnexpectedValueException: phar error: "%star_002.phar.tar" is a corrupted tar file (truncated) diff --git a/ext/phar/tests/tar/tar_003.phpt b/ext/phar/tests/tar/tar_003.phpt index 388f8362a6a2..1a59c03ea27d 100644 --- a/ext/phar/tests/tar/tar_003.phpt +++ b/ext/phar/tests/tar/tar_003.phpt @@ -28,7 +28,7 @@ echo file_get_contents($alias . '/internal/file/here'); try { $tar = opendir($alias . '/'); } catch (Exception $e) { -echo $e->getMessage()."\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } while (false !== ($v = readdir($tar))) { diff --git a/ext/phar/tests/tar/tar_nostub.phpt b/ext/phar/tests/tar/tar_nostub.phpt index 061fa6c8f5ef..102a42b612ad 100644 --- a/ext/phar/tests/tar/tar_nostub.phpt +++ b/ext/phar/tests/tar/tar_nostub.phpt @@ -22,7 +22,7 @@ try { $phar = new Phar($fname); var_dump($phar->getStub()); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } copy($fname, $fname2); @@ -31,7 +31,7 @@ try { $phar = new PharData($fname2); var_dump($phar->getStub()); } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -41,6 +41,6 @@ try { @unlink(__DIR__ . '/tar_nostub.tar'); ?> --EXPECTF-- -RecursiveDirectoryIterator::__construct(phar://%star_nostub.phar.tar/): Failed to open directory: '%star_nostub.phar.tar' is not a phar archive. Use PharData::__construct() for a standard zip or tar archive +UnexpectedValueException: RecursiveDirectoryIterator::__construct(phar://%star_nostub.phar.tar/): Failed to open directory: '%star_nostub.phar.tar' is not a phar archive. Use PharData::__construct() for a standard zip or tar archive phar url "phar://%star_nostub.phar.tar/" is unknown string(0) "" diff --git a/ext/phar/tests/tar/truncated.phpt b/ext/phar/tests/tar/truncated.phpt index 95ed3c1c7524..34ed9685ae21 100644 --- a/ext/phar/tests/tar/truncated.phpt +++ b/ext/phar/tests/tar/truncated.phpt @@ -7,9 +7,9 @@ phar try { $p = new PharData(__DIR__ . '/files/trunc.tar'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: "%strunc.tar" is a corrupted tar file (truncated) +UnexpectedValueException: phar error: "%strunc.tar" is a corrupted tar file (truncated) diff --git a/ext/phar/tests/tar_flush_too_long_filename.phpt b/ext/phar/tests/tar_flush_too_long_filename.phpt index be18f5e48168..a937e8dfaed5 100644 --- a/ext/phar/tests/tar_flush_too_long_filename.phpt +++ b/ext/phar/tests/tar_flush_too_long_filename.phpt @@ -29,7 +29,7 @@ $phar->setSignatureAlgorithm(Phar::OPENSSL, "randomcrap"); try { $phar->addEmptyDir('blah2/' . str_repeat('X', 1000)); } catch (PharException $e) { - echo $e->getMessage(); + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -38,4 +38,4 @@ try { unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- -tar-based phar "%s" cannot be created, filename "%s" is too long for tar file format +PharException: tar-based phar "%s" cannot be created, filename "%s" is too long for tar file format diff --git a/ext/phar/tests/test_alias_unset.phpt b/ext/phar/tests/test_alias_unset.phpt index 3a11fbac6d5a..306875480245 100644 --- a/ext/phar/tests/test_alias_unset.phpt +++ b/ext/phar/tests/test_alias_unset.phpt @@ -25,7 +25,7 @@ $a = fopen($pname . '/file1.txt', 'r'); // this works because there are no refer try { $phar2 = new Phar($fname2); // fails because references open to $fname } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } fclose($a); $phar2 = new Phar($fname2); // succeeds because all refs are closed @@ -37,7 +37,7 @@ $a = file_get_contents($pname . '/file1.txt'); // this fails because $fname2 ref --EXPECTF-- -Cannot open archive "%stest_alias_unset.2.phar.php", alias is already in use by existing archive +UnexpectedValueException: Cannot open archive "%stest_alias_unset.2.phar.php", alias is already in use by existing archive string(5) "first" Warning: file_get_contents(phar://%sfile1.txt): Failed to open stream: Cannot open archive "%stest_alias_unset.phar.php", alias is already in use by existing archive in %stest_alias_unset.php on line %d diff --git a/ext/phar/tests/test_unset.phpt b/ext/phar/tests/test_unset.phpt index 8aa422cb072c..aae1168caf19 100644 --- a/ext/phar/tests/test_unset.phpt +++ b/ext/phar/tests/test_unset.phpt @@ -22,7 +22,7 @@ $phar['b'] = 'whatever'; // flushed try { $phar->setAlias('first'); } catch(Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $phar = new Phar($fname); diff --git a/ext/phar/tests/webphar_compilefail.phpt b/ext/phar/tests/webphar_compilefail.phpt index 0f6e38e260f4..17169b756447 100644 --- a/ext/phar/tests/webphar_compilefail.phpt +++ b/ext/phar/tests/webphar_compilefail.phpt @@ -9,9 +9,9 @@ phar.readonly=1 try { Phar::webPhar('oopsiedaisy.phar', '/index.php'); } catch (Exception $e) { -echo $e->getMessage() . "\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } __HALT_COMPILER(); ?> --EXPECTF-- -internal corruption of phar "%swebphar_compilefail.php" (truncated manifest at manifest length) +PharException: internal corruption of phar "%swebphar_compilefail.php" (truncated manifest at manifest length) diff --git a/ext/phar/tests/zip/033.phpt b/ext/phar/tests/zip/033.phpt index cf5ccd9a5105..e1e4ea9844e4 100644 --- a/ext/phar/tests/zip/033.phpt +++ b/ext/phar/tests/zip/033.phpt @@ -41,7 +41,7 @@ try { $phar['test']->chmod(0666); var_dump($phar['test']->isReadable()); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- diff --git a/ext/phar/tests/zip/033a.phpt b/ext/phar/tests/zip/033a.phpt index b11ea44ed32f..b92d1d13ba9b 100644 --- a/ext/phar/tests/zip/033a.phpt +++ b/ext/phar/tests/zip/033a.phpt @@ -37,7 +37,7 @@ try { $phar['test']->chmod(0666); var_dump($phar['test']->isExecutable()); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -46,4 +46,4 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- bool(false) -Cannot modify permissions for file "a.php" in phar "%sa.phar.zip", write operations are prohibited +PharException: Cannot modify permissions for file "a.php" in phar "%sa.phar.zip", write operations are prohibited diff --git a/ext/phar/tests/zip/alias_acrobatics.phpt b/ext/phar/tests/zip/alias_acrobatics.phpt index 2ff5fd5dcc7d..574307fb3e7a 100644 --- a/ext/phar/tests/zip/alias_acrobatics.phpt +++ b/ext/phar/tests/zip/alias_acrobatics.phpt @@ -17,19 +17,19 @@ $p['unused'] = 'hi'; try { $a = new Phar($fname2, 0, 'foo'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } copy($fname, $fname2); echo "2\n"; try { $a = new Phar($fname2); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $b = new Phar($fname, 0, 'another'); } catch (Exception $e) { -echo $e->getMessage(),"\n"; +echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -38,7 +38,7 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); ?> --EXPECTF-- -alias "foo" is already used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.2.phar.zip" +UnexpectedValueException: alias "foo" is already used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.2.phar.zip" 2 -phar error: Unable to add zip-based phar "%salias_acrobatics.2.phar.zip" with implicit alias, alias is already in use -alias "another" is already used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.phar.zip" +UnexpectedValueException: phar error: Unable to add zip-based phar "%salias_acrobatics.2.phar.zip" with implicit alias, alias is already in use +UnexpectedValueException: alias "another" is already used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.phar.zip" diff --git a/ext/phar/tests/zip/corrupt_001.phpt b/ext/phar/tests/zip/corrupt_001.phpt index 69edece7163b..6f7f861e93d2 100644 --- a/ext/phar/tests/zip/corrupt_001.phpt +++ b/ext/phar/tests/zip/corrupt_001.phpt @@ -7,14 +7,14 @@ phar try { new PharData(__DIR__ . '/files/count1.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/count2.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount1.zip" -phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount2.zip" +UnexpectedValueException: phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount1.zip" +UnexpectedValueException: phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount2.zip" diff --git a/ext/phar/tests/zip/corrupt_002.phpt b/ext/phar/tests/zip/corrupt_002.phpt index 6650196504d3..594f1dee3b70 100644 --- a/ext/phar/tests/zip/corrupt_002.phpt +++ b/ext/phar/tests/zip/corrupt_002.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/nozipend.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: end of central directory not found in zip-based phar "%snozipend.zip" +UnexpectedValueException: phar error: end of central directory not found in zip-based phar "%snozipend.zip" diff --git a/ext/phar/tests/zip/corrupt_003.phpt b/ext/phar/tests/zip/corrupt_003.phpt index 150289ca8a8f..c4b215f5ac4c 100644 --- a/ext/phar/tests/zip/corrupt_003.phpt +++ b/ext/phar/tests/zip/corrupt_003.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/filecomment.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: end of central directory not found in zip-based phar "%sfilecomment.zip" +UnexpectedValueException: phar error: end of central directory not found in zip-based phar "%sfilecomment.zip" diff --git a/ext/phar/tests/zip/corrupt_004.phpt b/ext/phar/tests/zip/corrupt_004.phpt index e005488e3a13..878bb9d4d1c0 100644 --- a/ext/phar/tests/zip/corrupt_004.phpt +++ b/ext/phar/tests/zip/corrupt_004.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/cdir_offset.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: corrupted central directory entry, no magic signature in zip-based phar "%scdir_offset.zip" +UnexpectedValueException: phar error: corrupted central directory entry, no magic signature in zip-based phar "%scdir_offset.zip" diff --git a/ext/phar/tests/zip/corrupt_005.phpt b/ext/phar/tests/zip/corrupt_005.phpt index 027d0f6e94d4..8cc175fcfc94 100644 --- a/ext/phar/tests/zip/corrupt_005.phpt +++ b/ext/phar/tests/zip/corrupt_005.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/encrypted.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: Cannot process encrypted zip files in zip-based phar "%sencrypted.zip" +UnexpectedValueException: phar error: Cannot process encrypted zip files in zip-based phar "%sencrypted.zip" diff --git a/ext/phar/tests/zip/corrupt_006.phpt b/ext/phar/tests/zip/corrupt_006.phpt index 045bd77dcdac..19760ef124de 100644 --- a/ext/phar/tests/zip/corrupt_006.phpt +++ b/ext/phar/tests/zip/corrupt_006.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/stdin.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: Cannot process zips created from stdin (zero-length filename) in zip-based phar "%sstdin.zip" +UnexpectedValueException: phar error: Cannot process zips created from stdin (zero-length filename) in zip-based phar "%sstdin.zip" diff --git a/ext/phar/tests/zip/corrupt_007.phpt b/ext/phar/tests/zip/corrupt_007.phpt index 03bcae58ce6b..c9efdb53a5f4 100644 --- a/ext/phar/tests/zip/corrupt_007.phpt +++ b/ext/phar/tests/zip/corrupt_007.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/truncfilename.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: corrupted central directory entry, no magic signature in zip-based phar "%struncfilename.zip" +UnexpectedValueException: phar error: corrupted central directory entry, no magic signature in zip-based phar "%struncfilename.zip" diff --git a/ext/phar/tests/zip/corrupt_008.phpt b/ext/phar/tests/zip/corrupt_008.phpt index db9f51d6ce05..b29daa4fd00d 100644 --- a/ext/phar/tests/zip/corrupt_008.phpt +++ b/ext/phar/tests/zip/corrupt_008.phpt @@ -7,92 +7,92 @@ phar try { new PharData(__DIR__ . '/files/compress_unsup1.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup2.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup3.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup4.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup5.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup6.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup7.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup9.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup10.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup14.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup18.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup19.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup97.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsup98.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new PharData(__DIR__ . '/files/compress_unsupunknown.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: unsupported compression method (Shrunk) used in this zip in zip-based phar "%scompress_unsup1.zip" -phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup2.zip" -phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup3.zip" -phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup4.zip" -phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup5.zip" -phar error: unsupported compression method (Implode) used in this zip in zip-based phar "%scompress_unsup6.zip" -phar error: unsupported compression method (Tokenize) used in this zip in zip-based phar "%scompress_unsup7.zip" -phar error: unsupported compression method (Deflate64) used in this zip in zip-based phar "%scompress_unsup9.zip" -phar error: unsupported compression method (PKWare Implode/old IBM TERSE) used in this zip in zip-based phar "%scompress_unsup10.zip" -phar error: unsupported compression method (LZMA) used in this zip in zip-based phar "%scompress_unsup14.zip" -phar error: unsupported compression method (IBM TERSE) used in this zip in zip-based phar "%scompress_unsup18.zip" -phar error: unsupported compression method (IBM LZ77) used in this zip in zip-based phar "%scompress_unsup19.zip" -phar error: unsupported compression method (WavPack) used in this zip in zip-based phar "%scompress_unsup97.zip" -phar error: unsupported compression method (PPMd) used in this zip in zip-based phar "%scompress_unsup98.zip" -phar error: unsupported compression method (unknown) used in this zip in zip-based phar "%scompress_unsupunknown.zip" +UnexpectedValueException: phar error: unsupported compression method (Shrunk) used in this zip in zip-based phar "%scompress_unsup1.zip" +UnexpectedValueException: phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup2.zip" +UnexpectedValueException: phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup3.zip" +UnexpectedValueException: phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup4.zip" +UnexpectedValueException: phar error: unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup5.zip" +UnexpectedValueException: phar error: unsupported compression method (Implode) used in this zip in zip-based phar "%scompress_unsup6.zip" +UnexpectedValueException: phar error: unsupported compression method (Tokenize) used in this zip in zip-based phar "%scompress_unsup7.zip" +UnexpectedValueException: phar error: unsupported compression method (Deflate64) used in this zip in zip-based phar "%scompress_unsup9.zip" +UnexpectedValueException: phar error: unsupported compression method (PKWare Implode/old IBM TERSE) used in this zip in zip-based phar "%scompress_unsup10.zip" +UnexpectedValueException: phar error: unsupported compression method (LZMA) used in this zip in zip-based phar "%scompress_unsup14.zip" +UnexpectedValueException: phar error: unsupported compression method (IBM TERSE) used in this zip in zip-based phar "%scompress_unsup18.zip" +UnexpectedValueException: phar error: unsupported compression method (IBM LZ77) used in this zip in zip-based phar "%scompress_unsup19.zip" +UnexpectedValueException: phar error: unsupported compression method (WavPack) used in this zip in zip-based phar "%scompress_unsup97.zip" +UnexpectedValueException: phar error: unsupported compression method (PPMd) used in this zip in zip-based phar "%scompress_unsup98.zip" +UnexpectedValueException: phar error: unsupported compression method (unknown) used in this zip in zip-based phar "%scompress_unsupunknown.zip" diff --git a/ext/phar/tests/zip/corrupt_009.phpt b/ext/phar/tests/zip/corrupt_009.phpt index 76059bb60122..180676253766 100644 --- a/ext/phar/tests/zip/corrupt_009.phpt +++ b/ext/phar/tests/zip/corrupt_009.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/extralen_toolong.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: Unable to process extra field header for file in central directory in zip-based phar "%sextralen_toolong.zip" +UnexpectedValueException: phar error: Unable to process extra field header for file in central directory in zip-based phar "%sextralen_toolong.zip" diff --git a/ext/phar/tests/zip/corrupt_010.phpt b/ext/phar/tests/zip/corrupt_010.phpt index 549be171e3c2..21c1acee9aae 100644 --- a/ext/phar/tests/zip/corrupt_010.phpt +++ b/ext/phar/tests/zip/corrupt_010.phpt @@ -7,8 +7,8 @@ phar try { new PharData(__DIR__ . '/files/disknumber.zip'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -phar error: split archives spanning multiple zips cannot be processed in zip-based phar "%sdisknumber.zip" +UnexpectedValueException: phar error: split archives spanning multiple zips cannot be processed in zip-based phar "%sdisknumber.zip" diff --git a/ext/phar/tests/zip/create_new_phar_b.phpt b/ext/phar/tests/zip/create_new_phar_b.phpt index 0f4e239f91de..67831faf507f 100644 --- a/ext/phar/tests/zip/create_new_phar_b.phpt +++ b/ext/phar/tests/zip/create_new_phar_b.phpt @@ -18,4 +18,3 @@ Warning: file_put_contents(phar://%screate_new_phar_b.phar.zip/a.php): Failed to Warning: include(phar://%screate_new_phar_b.phar.zip/a.php): Failed to open stream: %s in %screate_new_phar_b.php on line %d Warning: include(): Failed opening 'phar://%screate_new_phar_b.phar.zip/a.php' for inclusion (include_path='%s') in %screate_new_phar_b.php on line %d - diff --git a/ext/phar/tests/zip/delete_in_phar.phpt b/ext/phar/tests/zip/delete_in_phar.phpt index b07f0bdbd8bd..87979613ebb6 100644 --- a/ext/phar/tests/zip/delete_in_phar.phpt +++ b/ext/phar/tests/zip/delete_in_phar.phpt @@ -44,4 +44,3 @@ This is b Warning: include(%sdelete_in_phar.phar.zip/b/c.php): Failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar.phar.zip" in %sdelete_in_phar.php on line %d Warning: include(): Failed opening 'phar://%sdelete_in_phar.phar.zip/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar.php on line %d - diff --git a/ext/phar/tests/zip/delete_in_phar_b.phpt b/ext/phar/tests/zip/delete_in_phar_b.phpt index c9a1c25fe276..338b09ebe1da 100644 --- a/ext/phar/tests/zip/delete_in_phar_b.phpt +++ b/ext/phar/tests/zip/delete_in_phar_b.phpt @@ -43,4 +43,3 @@ Warning: unlink(): phar error: write operations disabled by the php.ini setting This is a This is b This is b/c - diff --git a/ext/phar/tests/zip/delete_in_phar_confirm.phpt b/ext/phar/tests/zip/delete_in_phar_confirm.phpt index f5f65c8ede87..db643977e5f3 100644 --- a/ext/phar/tests/zip/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/zip/delete_in_phar_confirm.phpt @@ -49,4 +49,3 @@ This is b Warning: include(%sdelete_in_phar_confirm.phar.zip/b/c.php): Failed to open stream: phar error: "b/c.php" is not a file in phar "%sdelete_in_phar_confirm.phar.zip" in %sdelete_in_phar_confirm.php on line %d Warning: include(): Failed opening 'phar://%sdelete_in_phar_confirm.phar.zip/b/c.php' for inclusion (include_path='%s') in %sdelete_in_phar_confirm.php on line %d - diff --git a/ext/phar/tests/zip/exists_as_phar.phpt b/ext/phar/tests/zip/exists_as_phar.phpt index 1dbab22a3d87..c57c69b3889c 100644 --- a/ext/phar/tests/zip/exists_as_phar.phpt +++ b/ext/phar/tests/zip/exists_as_phar.phpt @@ -23,7 +23,7 @@ $phar->setAlias('hio2'); try { $p = new Phar($tname); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -33,4 +33,4 @@ unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- -phar zip error: phar "%sexists_as_phar.phar.zip" already exists as a regular phar and must be deleted from disk prior to creating as a zip-based phar +UnexpectedValueException: phar zip error: phar "%sexists_as_phar.phar.zip" already exists as a regular phar and must be deleted from disk prior to creating as a zip-based phar diff --git a/ext/phar/tests/zip/getalias.phpt b/ext/phar/tests/zip/getalias.phpt index 8f3edd6ee32d..323359b19aef 100644 --- a/ext/phar/tests/zip/getalias.phpt +++ b/ext/phar/tests/zip/getalias.phpt @@ -34,7 +34,7 @@ var_dump($phar->getAlias()); try { $phar['.phar/alias.txt'] = 'pinocchio'; } catch (Exception $e) { - echo $e->getMessage()."\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getAlias()); @@ -53,6 +53,6 @@ string(%d) "%sgetalias.phar.zip" string(%d) "%sgetalias.phar.zip" string(13) "jiminycricket" string(13) "jiminycricket" -Cannot set alias ".phar/alias.txt" directly in phar "%sgetalias.phar.zip", use setAlias +BadMethodCallException: Cannot set alias ".phar/alias.txt" directly in phar "%sgetalias.phar.zip", use setAlias string(13) "jiminycricket" string(9) "pinocchio" diff --git a/ext/phar/tests/zip/open_for_write_newfile_b.phpt b/ext/phar/tests/zip/open_for_write_newfile_b.phpt index c70968809b56..6bda6972388f 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_b.phpt @@ -43,4 +43,3 @@ This is b/c Warning: include(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): Failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_b.phar.zip" in %sopen_for_write_newfile_b.php on line %d Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_b.phar.zip/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_b.php on line %d - diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt index fbfe2104c84e..17659f56a9d9 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt @@ -43,4 +43,3 @@ This is b/c Warning: include(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): Failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.zip" in %sopen_for_write_newfile_c.php on line %d Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c.phar.zip/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c.php on line %d - diff --git a/ext/phar/tests/zip/phar_buildfromiterator5.phpt b/ext/phar/tests/zip/phar_buildfromiterator5.phpt index 3c587dfc9c87..09459bbac332 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator5.phpt @@ -40,13 +40,11 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass)))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- rewind valid current -%s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) +UnexpectedValueException: Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) diff --git a/ext/phar/tests/zip/phar_buildfromiterator6.phpt b/ext/phar/tests/zip/phar_buildfromiterator6.phpt index 9d9140bc3433..e2d8b11e4083 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator6.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator6.phpt @@ -40,8 +40,7 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt')))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- @@ -49,5 +48,4 @@ rewind valid current key -%s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid key (must return a string) +UnexpectedValueException: Iterator myIterator returned an invalid key (must return a string) diff --git a/ext/phar/tests/zip/phar_buildfromiterator7.phpt b/ext/phar/tests/zip/phar_buildfromiterator7.phpt index f62be404a1e0..3f8214115632 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator7.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator7.phpt @@ -40,8 +40,7 @@ try { $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt')))); } catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- @@ -49,5 +48,4 @@ rewind valid current key -%s(24) "UnexpectedValueException" -Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt" +UnexpectedValueException: Iterator myIterator returned a file that could not be opened "phar_buildfromiterator7./oopsie/there.phpt" diff --git a/ext/phar/tests/zip/phar_copy.phpt b/ext/phar/tests/zip/phar_copy.phpt index de9b1c9dd76d..3e091925ab7d 100644 --- a/ext/phar/tests/zip/phar_copy.phpt +++ b/ext/phar/tests/zip/phar_copy.phpt @@ -32,7 +32,7 @@ try } catch(Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ini_set('phar.readonly',1); $p2 = new Phar($fname2); @@ -48,7 +48,7 @@ echo 'c: ' ,file_get_contents($p2['c']->getPathName()); --EXPECTF-- hihibool(true) -file "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s +UnexpectedValueException: file "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s bool(true) a: hib: hic: hi===DONE=== diff --git a/ext/phar/tests/zip/phar_setalias2.phpt b/ext/phar/tests/zip/phar_setalias2.phpt index 2d113fbf2c5d..7d3e23b389e2 100644 --- a/ext/phar/tests/zip/phar_setalias2.phpt +++ b/ext/phar/tests/zip/phar_setalias2.phpt @@ -33,7 +33,7 @@ $phar = new Phar(__DIR__ . '/notphar.phar'); try { $phar->setAlias('test'); } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -44,4 +44,4 @@ __HALT_COMPILER(); --EXPECTF-- hio test -alias "test" is already used for archive "%sphar_setalias2.phar.zip" and cannot be used for other archives +PharException: alias "test" is already used for archive "%sphar_setalias2.phar.zip" and cannot be used for other archives diff --git a/ext/phar/tests/zip/phar_setdefaultstub.phpt b/ext/phar/tests/zip/phar_setdefaultstub.phpt index e979b59b1a4a..afe7c08a88c1 100644 --- a/ext/phar/tests/zip/phar_setdefaultstub.phpt +++ b/ext/phar/tests/zip/phar_setdefaultstub.phpt @@ -23,7 +23,7 @@ try { $phar->setDefaultStub(); $phar->stopBuffering(); } catch(Exception $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); @@ -34,13 +34,13 @@ echo "========================================================================== try { $phar->setDefaultStub('my/custom/thingy.php'); } catch(Error $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->stopBuffering(); } catch(Exception $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); @@ -51,13 +51,13 @@ echo "========================================================================== try { $phar->setDefaultStub('my/custom/thingy.php', 'the/web.php'); } catch(ValueError $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $phar->stopBuffering(); } catch(Exception $e) { - echo $e->getMessage(). "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); @@ -76,11 +76,11 @@ string(60) "getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($phar->getStub()); var_dump($phar->getStub() == $stub); @@ -44,7 +44,7 @@ __HALT_COMPILER(); string(50) " " bool(true) -Exception: illegal stub for zip-based phar "%sphar_stub_error.phar.zip" +PharException: illegal stub for zip-based phar "%sphar_stub_error.phar.zip" string(50) " " bool(true) diff --git a/ext/phar/tests/zip/zip_extra_underflow.phpt b/ext/phar/tests/zip/zip_extra_underflow.phpt index e37a3493b663..b64a169648cb 100644 --- a/ext/phar/tests/zip/zip_extra_underflow.phpt +++ b/ext/phar/tests/zip/zip_extra_underflow.phpt @@ -80,7 +80,7 @@ try { echo "Loaded corrupt ZIP\n"; echo $phar[$entry]->getMTime(), "\n"; } catch (Exception $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --CLEAN-- @@ -88,4 +88,4 @@ try { @unlink(__DIR__ . '/zip_extra_underflow.zip'); ?> --EXPECTF-- -phar error: Unable to process extra field header for file in central directory in zip-based phar "%szip_extra_underflow.zip" +UnexpectedValueException: phar error: Unable to process extra field header for file in central directory in zip-based phar "%szip_extra_underflow.zip" diff --git a/ext/random/tests/01_functions/bug46587.phpt b/ext/random/tests/01_functions/bug46587.phpt index d9b3044406ff..67dc80cee544 100644 --- a/ext/random/tests/01_functions/bug46587.phpt +++ b/ext/random/tests/01_functions/bug46587.phpt @@ -7,12 +7,12 @@ var_dump(mt_rand(3,8)); try { var_dump(mt_rand(8,3)); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "Done.\n"; ?> --EXPECTF-- int(%d) -mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) +ValueError: mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) Done. diff --git a/ext/random/tests/01_functions/mt_rand_basic.phpt b/ext/random/tests/01_functions/mt_rand_basic.phpt index 87a7d2bd4b53..7c7eba5a64f9 100644 --- a/ext/random/tests/01_functions/mt_rand_basic.phpt +++ b/ext/random/tests/01_functions/mt_rand_basic.phpt @@ -60,4 +60,3 @@ PASSED: range min = 100 max = 1000 PASSED: range min = 10500 max = 1050000 PASSED: range min = 16 max = 65536 PASSED: range min = 256 max = 448 - diff --git a/ext/random/tests/01_functions/random_bytes_error.phpt b/ext/random/tests/01_functions/random_bytes_error.phpt index bc0c1ccc2048..6b175f8f9cb5 100644 --- a/ext/random/tests/01_functions/random_bytes_error.phpt +++ b/ext/random/tests/01_functions/random_bytes_error.phpt @@ -7,16 +7,16 @@ Test error operation of random_bytes() try { $bytes = random_bytes(); } catch (TypeError $e) { - echo $e->getMessage().PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $bytes = random_bytes(0); } catch (Error $e) { - echo $e->getMessage().PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -random_bytes() expects exactly 1 argument, 0 given -random_bytes(): Argument #1 ($length) must be greater than 0 +ArgumentCountError: random_bytes() expects exactly 1 argument, 0 given +ValueError: random_bytes(): Argument #1 ($length) must be greater than 0 diff --git a/ext/random/tests/01_functions/random_int_error.phpt b/ext/random/tests/01_functions/random_int_error.phpt index fe461275c951..79f2d9e7675b 100644 --- a/ext/random/tests/01_functions/random_int_error.phpt +++ b/ext/random/tests/01_functions/random_int_error.phpt @@ -7,23 +7,23 @@ Test error operation of random_int() try { $randomInt = random_int(); } catch (TypeError $e) { - echo $e->getMessage().PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $randomInt = random_int(42); } catch (TypeError $e) { - echo $e->getMessage().PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $randomInt = random_int(42,0); } catch (Error $e) { - echo $e->getMessage().PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -random_int() expects exactly 2 arguments, 0 given -random_int() expects exactly 2 arguments, 1 given -random_int(): Argument #1 ($min) must be less than or equal to argument #2 ($max) +ArgumentCountError: random_int() expects exactly 2 arguments, 0 given +ArgumentCountError: random_int() expects exactly 2 arguments, 1 given +ValueError: random_int(): Argument #1 ($min) must be less than or equal to argument #2 ($max) diff --git a/ext/random/tests/02_engine/all_serialize_error.phpt b/ext/random/tests/02_engine/all_serialize_error.phpt index 056941514566..eb3f4a57cf0f 100644 --- a/ext/random/tests/02_engine/all_serialize_error.phpt +++ b/ext/random/tests/02_engine/all_serialize_error.phpt @@ -8,28 +8,28 @@ echo \Random\Engine\Mt19937::class, PHP_EOL; try { var_dump(unserialize('O:21:"Random\Engine\Mt19937":2:{i:0;a:0:{}i:1;a:626:{i:0;s:7:"5aa6b98";i:1;s:8:"8660cc14";i:2;s:8:"c0b631ca";i:3;s:8:"e85464ad";i:4;s:8:"70fa6108";i:5;s:8:"c5ed9c3c";i:6;s:8:"b05b7ff1";i:7;s:8:"faf33a3a";i:8;s:8:"ab7c0e61";i:9;s:8:"2d4c9c37";i:10;s:8:"daffe918";i:11;s:8:"644f25b9";i:12;s:8:"fdb352e5";i:13;s:8:"434dafa9";i:14;s:8:"a3c9826e";i:15;s:8:"923dfd8c";i:16;s:8:"f641a225";i:17;s:8:"d87134b3";i:18;s:8:"c3b7926e";i:19;s:8:"c880b60d";i:20;s:8:"975f362d";i:21;s:8:"48192b77";i:22;s:8:"6f7dd08b";i:23;s:8:"7d4ad4f8";i:24;s:8:"d805b910";i:25;s:8:"8c98b365";i:26;s:8:"89e54af9";i:27;s:8:"e5257a3c";i:28;s:8:"8f596624";i:29;s:8:"3f42f88a";i:30;s:8:"6a7e95cc";i:31;s:8:"e1349e4d";i:32;s:8:"4539bc92";i:33;s:8:"045a3148";i:34;s:8:"c27cf7b9";i:35;s:8:"c64e8009";i:36;s:8:"dc5ed02e";i:37;s:8:"5753c741";i:38;s:8:"50be0a82";i:39;s:8:"822da0ee";i:40;s:8:"42fdb3c6";i:41;s:8:"c668fc80";i:42;s:8:"262376c6";i:43;s:8:"17b998c6";i:44;s:8:"1f3aac02";i:45;s:8:"6f939c7e";i:46;s:8:"21c099f4";i:47;s:8:"0f4b5c76";i:48;s:8:"64799ac0";i:49;s:8:"45d3bb99";i:50;s:8:"8ff3eb79";i:51;s:8:"61996264";i:52;s:8:"2b9ab1f4";i:53;s:8:"a0d0c50f";i:54;s:8:"f08713ce";i:55;s:8:"6b1cf9d8";i:56;s:8:"52d92cc5";i:57;s:8:"34bcec6f";i:58;s:8:"83ffa063";i:59;s:8:"a002321d";i:60;s:8:"386c46d9";i:61;s:8:"45e2c63e";i:62;s:8:"f481bdf4";i:63;s:8:"df58facb";i:64;s:8:"1781e49b";i:65;s:8:"1d968a6b";i:66;s:8:"8aa7fdd2";i:67;s:8:"631ac8cd";i:68;s:8:"8090ff8e";i:69;s:8:"4ddd4a5d";i:70;s:8:"ff6d8193";i:71;s:8:"39e18244";i:72;s:8:"4efe15db";i:73;s:8:"3fe64cd5";i:74;s:8:"e693a97f";i:75;s:8:"807a34e9";i:76;s:8:"6dc16ae7";i:77;s:8:"a1e1ed1d";i:78;s:8:"605bdc86";i:79;s:8:"abb1830e";i:80;s:8:"2baabeda";i:81;s:8:"fc0f66ad";i:82;s:8:"9cf4fb96";i:83;s:8:"b50ff764";i:84;s:8:"67c37a3d";i:85;s:8:"15253035";i:86;s:8:"387fce47";i:87;s:8:"5c3299a5";i:88;s:8:"125602b9";i:89;s:8:"daeb445c";i:90;s:8:"289e5a8d";i:91;s:8:"b47cd48c";i:92;s:8:"8664db23";i:93;s:8:"b9352af8";i:94;s:8:"51684d88";i:95;s:8:"b204cbc9";i:96;s:8:"e1b6becc";i:97;s:8:"dbbe0ee6";i:98;s:8:"89e54027";i:99;s:8:"a6512564";i:100;s:8:"3aab8d17";i:101;s:8:"7cab5272";i:102;s:8:"1804e981";i:103;s:8:"0bfebe2c";i:104;s:8:"7c082a4c";i:105;s:8:"06bc80c3";i:106;s:8:"c63db839";i:107;s:8:"59edb59d";i:108;s:8:"b52d9655";i:109;s:8:"efce041b";i:110;s:8:"57c1f890";i:111;s:8:"15499697";i:112;s:8:"e0ad3e3a";i:113;s:8:"408d4c16";i:114;s:8:"e53cf468";i:115;s:8:"6ea3d84f";i:116;s:8:"0a2bc4f2";i:117;s:8:"27b59259";i:118;s:8:"d223514b";i:119;s:8:"434c4185";i:120;s:8:"999c71df";i:121;s:8:"46134706";i:122;s:8:"f7f048d0";i:123;s:8:"7f5cfe34";i:124;s:8:"9bdc475c";i:125;s:8:"c1cf42ea";i:126;s:8:"65be324b";i:127;s:8:"68c7a1dc";i:128;s:8:"a7c8c5a2";i:129;s:8:"ecc4cd8a";i:130;s:8:"a761615c";i:131;s:8:"718ec534";i:132;s:8:"c8b086fc";i:133;s:8:"ead759f9";i:134;s:8:"eb9df4a0";i:135;s:8:"ec5b25f9";i:136;s:8:"3a6ff94e";i:137;s:8:"4511a3de";i:138;s:8:"9034f1c6";i:139;s:8:"5c1c6d14";i:140;s:8:"a228ed46";i:141;s:8:"ffe19f2f";i:142;s:8:"f21f68cf";i:143;s:8:"6c2235a4";i:144;s:8:"e0aed51a";i:145;s:8:"2ade527b";i:146;s:8:"65f3c758";i:147;s:8:"f6e868b7";i:148;s:8:"49b770a5";i:149;s:8:"48ab9158";i:150;s:8:"ab07a671";i:151;s:8:"4ef74251";i:152;s:8:"f4cad644";i:153;s:8:"1576c59e";i:154;s:8:"3882bbd1";i:155;s:8:"e49f32c0";i:156;s:8:"c67b757c";i:157;s:8:"3528c5d8";i:158;s:8:"371c3e34";i:159;s:8:"7f1d614f";i:160;s:8:"b9e19e66";i:161;s:8:"80a1d97f";i:162;s:8:"7f93c9f3";i:163;s:8:"4e82ea48";i:164;s:8:"9675e170";i:165;s:8:"aa54caef";i:166;s:8:"3bb9838e";i:167;s:8:"9c0d0a2b";i:168;s:8:"2595d91f";i:169;s:8:"84cc7ff2";i:170;s:8:"9457c4ee";i:171;s:8:"405b6bc8";i:172;s:8:"5aa668a4";i:173;s:8:"e94dfca2";i:174;s:8:"89c0d739";i:175;s:8:"459f8eb3";i:176;s:8:"76b95b42";i:177;s:8:"0e5ceafb";i:178;s:8:"55d4eaee";i:179;s:8:"a55a4784";i:180;s:8:"8c23e133";i:181;s:8:"0994f794";i:182;s:8:"a8d4d1b7";i:183;s:8:"0a50b177";i:184;s:8:"65409f44";i:185;s:8:"acf34e81";i:186;s:8:"e32f278e";i:187;s:8:"7aa21660";i:188;s:8:"9da66881";i:189;s:8:"5c4df7c5";i:190;s:8:"b21f8a4e";i:191;s:8:"d2cc6756";i:192;s:8:"8716f97d";i:193;s:8:"aabd84c5";i:194;s:8:"2e0a965a";i:195;s:8:"b4acc29c";i:196;s:8:"ed3be992";i:197;s:8:"867d9400";i:198;s:8:"a696ba3e";i:199;s:8:"8e2af3d9";i:200;s:8:"8fd95ea9";i:201;s:8:"930903d8";i:202;s:8:"4508dbb1";i:203;s:8:"80598d21";i:204;s:8:"df87fb74";i:205;s:8:"9d019d24";i:206;s:8:"05d5ce2e";i:207;s:8:"ed69bcfe";i:208;s:8:"f83a8d70";i:209;s:8:"750b10bd";i:210;s:8:"c0df892c";i:211;s:8:"df41f215";i:212;s:8:"03df46e3";i:213;s:8:"4e6dce66";i:214;s:8:"ea45a428";i:215;s:8:"cbbf3ff6";i:216;s:8:"f931c7b2";i:217;s:8:"80d19eab";i:218;s:8:"0e2c13da";i:219;s:8:"4b99ee8b";i:220;s:8:"2311d69e";i:221;s:8:"ca9050a7";i:222;s:8:"a4d9eec1";i:223;s:8:"ee665c77";i:224;s:8:"0714f961";i:225;s:8:"81f5be46";i:226;s:8:"420ea4bf";i:227;s:8:"281c28f0";i:228;s:8:"9936ab3f";i:229;s:8:"e4ca8936";i:230;s:8:"224d247b";i:231;s:8:"a564dffe";i:232;s:8:"d15045d2";i:233;s:8:"97d01e8f";i:234;s:8:"71793232";i:235;s:8:"43fe461e";i:236;s:8:"3b50916b";i:237;s:8:"ff242439";i:238;s:8:"a748a0a9";i:239;s:8:"ff51a2a6";i:240;s:8:"dec0ad0d";i:241;s:8:"4bcf2a2e";i:242;s:8:"2be6a97f";i:243;s:8:"eb3e636a";i:244;s:8:"81e31d64";i:245;s:8:"6ca4db9d";i:246;s:8:"bc5bd290";i:247;s:8:"ed2d2ba4";i:248;s:8:"00c46d55";i:249;s:8:"27578407";i:250;s:8:"bedbbcd8";i:251;s:8:"18172abc";i:252;s:8:"eaa5b9cf";i:253;s:8:"9e87ab84";i:254;s:8:"a0e2741c";i:255;s:8:"3bb931ae";i:256;s:8:"3a7b75cd";i:257;s:8:"1052cbf5";i:258;s:8:"b7afd060";i:259;s:8:"1d143d51";i:260;s:8:"17fb7422";i:261;s:8:"523fd346";i:262;s:8:"50429afd";i:263;s:8:"308ece7b";i:264;s:8:"285aa5c1";i:265;s:8:"d8afd736";i:266;s:8:"2e30512e";i:267;s:8:"af78ce36";i:268;s:8:"5967e738";i:269;s:8:"e19795de";i:270;s:8:"6d416e39";i:271;s:8:"23570261";i:272;s:8:"23106924";i:273;s:8:"a4b9add9";i:274;s:8:"baa83e79";i:275;s:8:"97ca48d3";i:276;s:8:"f369a004";i:277;s:8:"fa521bf6";i:278;s:8:"312e9e5e";i:279;s:8:"3acdb850";i:280;s:8:"485cbad7";i:281;s:8:"ddc2d365";i:282;s:8:"d8b87c13";i:283;s:8:"51f6aa7a";i:284;s:8:"b1c231ce";i:285;s:8:"926b9e57";i:286;s:8:"32bd5241";i:287;s:8:"b72cf0a0";i:288;s:8:"0cd99f51";i:289;s:8:"80815c0e";i:290;s:8:"a3459115";i:291;s:8:"5bb05439";i:292;s:8:"ee67a282";i:293;s:8:"65e533c5";i:294;s:8:"62e57b7a";i:295;s:8:"0f4a42fe";i:296;s:8:"ff5b8045";i:297;s:8:"cb9d60cf";i:298;s:8:"ffc891cd";i:299;s:8:"514d6027";i:300;s:8:"5b92df3b";i:301;s:8:"1fb47b1a";i:302;s:8:"a2382db8";i:303;s:8:"6f8b23cd";i:304;s:8:"db72737a";i:305;s:8:"d2d5022b";i:306;s:8:"eef762a7";i:307;s:8:"771fc2ed";i:308;s:8:"6581afb1";i:309;s:8:"64d7ffbd";i:310;s:8:"93a15a65";i:311;s:8:"fdc8b81b";i:312;s:8:"6369357b";i:313;s:8:"a8a58d2e";i:314;s:8:"d9ab2ed6";i:315;s:8:"0465340d";i:316;s:8:"eed4e3f1";i:317;s:8:"7e15ef9d";i:318;s:8:"99444e57";i:319;s:8:"959a6881";i:320;s:8:"e7498e10";i:321;s:8:"d7d0699e";i:322;s:8:"12372566";i:323;s:8:"b9f97c89";i:324;s:8:"5e688172";i:325;s:8:"8105e3b8";i:326;s:8:"627e9227";i:327;s:8:"67edb47d";i:328;s:8:"74e69d5f";i:329;s:8:"b8c5df2c";i:330;s:8:"14f06e80";i:331;s:8:"1a0af27f";i:332;s:8:"fa6ad68b";i:333;s:8:"d5938b0d";i:334;s:8:"2df9b8cc";i:335;s:8:"d90bd16c";i:336;s:8:"18779d24";i:337;s:8:"e1b81866";i:338;s:8:"dc51e106";i:339;s:8:"5078c0ce";i:340;s:8:"8fde3be3";i:341;s:8:"85939b08";i:342;s:8:"50f5565d";i:343;s:8:"281ec5f0";i:344;s:8:"ee2c4dfb";i:345;s:8:"89df2863";i:346;s:8:"0444ef85";i:347;s:8:"d52671b6";i:348;s:8:"84695c5d";i:349;s:8:"ceb19fc9";i:350;s:8:"8cd19595";i:351;s:8:"9773504b";i:352;s:8:"72031351";i:353;s:8:"285de56c";i:354;s:8:"08d949a1";i:355;s:8:"d1d24d60";i:356;s:8:"41c57eff";i:357;s:8:"ded22dfc";i:358;s:8:"9f799eb2";i:359;s:8:"ac14c164";i:360;s:8:"23ab3dac";i:361;s:8:"76de10e0";i:362;s:8:"72c2ac0b";i:363;s:8:"cce93127";i:364;s:8:"32bbb7e5";i:365;s:8:"b8af671a";i:366;s:8:"24dfc65a";i:367;s:8:"d7c8431f";i:368;s:8:"5cf3dffd";i:369;s:8:"7a93645c";i:370;s:8:"36bb66f8";i:371;s:8:"dc055709";i:372;s:8:"93c58efc";i:373;s:8:"11b9a1e6";i:374;s:8:"e487f36b";i:375;s:8:"7c3bcb46";i:376;s:8:"e4d724a3";i:377;s:8:"b732d653";i:378;s:8:"afc9c219";i:379;s:8:"ea658830";i:380;s:8:"b9052af6";i:381;s:8:"aa46a473";i:382;s:8:"1b37a35e";i:383;s:8:"0ba14ee9";i:384;s:8:"c7e150ac";i:385;s:8:"055ffa96";i:386;s:8:"e2bf88fb";i:387;s:8:"88f1f936";i:388;s:8:"488c7bdb";i:389;s:8:"a9dacbd1";i:390;s:8:"aaeea26f";i:391;s:8:"237af1cb";i:392;s:8:"e3dbdb50";i:393;s:8:"c8e5949e";i:394;s:8:"e70a989a";i:395;s:8:"fa540d6d";i:396;s:8:"f055b2f2";i:397;s:8:"1fc8acd4";i:398;s:8:"accb1a9b";i:399;s:8:"bedfb89c";i:400;s:8:"3d243ec0";i:401;s:8:"d2f3f2d8";i:402;s:8:"d83e7c53";i:403;s:8:"4f12e12d";i:404;s:8:"f48f33d1";i:405;s:8:"9555d943";i:406;s:8:"db853a55";i:407;s:8:"506a95b4";i:408;s:8:"408155d1";i:409;s:8:"32a384a0";i:410;s:8:"21c34eb4";i:411;s:8:"93e2e1ae";i:412;s:8:"88582a10";i:413;s:8:"1f065648";i:414;s:8:"96c3c81b";i:415;s:8:"412bc358";i:416;s:8:"11a4e990";i:417;s:8:"805ead73";i:418;s:8:"ec8ca56e";i:419;s:8:"a2ed4bdc";i:420;s:8:"ac408a10";i:421;s:8:"4ca98f96";i:422;s:8:"0686b6df";i:423;s:8:"9e9f7ae4";i:424;s:8:"07d5f658";i:425;s:8:"1c121a0c";i:426;s:8:"c11c8e82";i:427;s:8:"13f2c6d7";i:428;s:8:"e9f6ad9c";i:429;s:8:"bc1dc285";i:430;s:8:"e271fe4b";i:431;s:8:"34114ee5";i:432;s:8:"92ad1c39";i:433;s:8:"5ab5504b";i:434;s:8:"4f7118a7";i:435;s:8:"d1ceec2f";i:436;s:8:"adfd7622";i:437;s:8:"f4f4a9c0";i:438;s:8:"2d4f21e3";i:439;s:8:"3b4bed9e";i:440;s:8:"42ac5810";i:441;s:8:"7eae8db5";i:442;s:8:"09dc329e";i:443;s:8:"3c723314";i:444;s:8:"7fb50c08";i:445;s:8:"71fd69dd";i:446;s:8:"013ce542";i:447;s:8:"0add0d73";i:448;s:8:"465d495a";i:449;s:8:"9f8ddb9d";i:450;s:8:"f293e79e";i:451;s:8:"d6f59d72";i:452;s:8:"ac22e38f";i:453;s:8:"e96d5751";i:454;s:8:"fba79717";i:455;s:8:"39fedf2f";i:456;s:8:"3fb25196";i:457;s:8:"fcdaa825";i:458;s:8:"9a960022";i:459;s:8:"5371af3d";i:460;s:8:"df7faf0a";i:461;s:8:"82c22c85";i:462;s:8:"dfbbae9f";i:463;s:8:"403a4b84";i:464;s:8:"bc938282";i:465;s:8:"d2355fbc";i:466;s:8:"8d72b179";i:467;s:8:"dced02b2";i:468;s:8:"227b82e3";i:469;s:8:"24c60db6";i:470;s:8:"45092b73";i:471;s:8:"767c0e1d";i:472;s:8:"7eb5c592";i:473;s:8:"d0b356d9";i:474;s:8:"dc95ee45";i:475;s:8:"39aa5820";i:476;s:8:"9e6e1868";i:477;s:8:"ffe72d78";i:478;s:8:"82ae0503";i:479;s:8:"2ea981ad";i:480;s:8:"6935faba";i:481;s:8:"69c2ba98";i:482;s:8:"69dd219f";i:483;s:8:"860e0d0d";i:484;s:8:"5f451aa3";i:485;s:8:"a9d5f07d";i:486;s:8:"ec623682";i:487;s:8:"04d8adba";i:488;s:8:"717e8c76";i:489;s:8:"f9c1fb75";i:490;s:8:"ab4c9e06";i:491;s:8:"3895ef4d";i:492;s:8:"37c09060";i:493;s:8:"f3b7c652";i:494;s:8:"74dc421e";i:495;s:8:"97d458be";i:496;s:8:"1a1ddea1";i:497;s:8:"001c68ad";i:498;s:8:"680f033f";i:499;s:8:"b2e9bd38";i:500;s:8:"54192958";i:501;s:8:"b6dd0693";i:502;s:8:"9d149906";i:503;s:8:"9ba5479a";i:504;s:8:"18ba25e8";i:505;s:8:"16fa3e51";i:506;s:8:"1e74b698";i:507;s:8:"c5932028";i:508;s:8:"5a6cf6cd";i:509;s:8:"6fa90e13";i:510;s:8:"bcabdecb";i:511;s:8:"ae23af9a";i:512;s:8:"76b297eb";i:513;s:8:"d1332632";i:514;s:8:"693a55c3";i:515;s:8:"7c4beb9b";i:516;s:8:"409a0a15";i:517;s:8:"60f68335";i:518;s:8:"febcb934";i:519;s:8:"f32c6f8c";i:520;s:8:"aacacf0d";i:521;s:8:"d1f56e99";i:522;s:8:"d65bcf00";i:523;s:8:"361c9633";i:524;s:8:"cd34d7f4";i:525;s:8:"37d38e62";i:526;s:8:"942dee9d";i:527;s:8:"f41c9445";i:528;s:8:"7e9a8b5d";i:529;s:8:"4b941ed7";i:530;s:8:"c6256dce";i:531;s:8:"6c285146";i:532;s:8:"5920147e";i:533;s:8:"934d59ed";i:534;s:8:"5f400a1d";i:535;s:8:"1a5de58c";i:536;s:8:"11e601de";i:537;s:8:"cf4da287";i:538;s:8:"756a54e4";i:539;s:8:"9f2b1015";i:540;s:8:"3a3df642";i:541;s:8:"5d024d64";i:542;s:8:"2d617393";i:543;s:8:"e1b4ec53";i:544;s:8:"24996b5e";i:545;s:8:"7a271bf1";i:546;s:8:"68d7da60";i:547;s:8:"06d3bc73";i:548;s:8:"f21095f7";i:549;s:8:"93e6bfd9";i:550;s:8:"e80b015b";i:551;s:8:"4ddd4ede";i:552;s:8:"cec3d813";i:553;s:8:"281f2a65";i:554;s:8:"ffa068fb";i:555;s:8:"60e712e7";i:556;s:8:"4abcecac";i:557;s:8:"eef01060";i:558;s:8:"8e79e897";i:559;s:8:"b0cd39fe";i:560;s:8:"28cc9604";i:561;s:8:"c7bd58e0";i:562;s:8:"c73b1765";i:563;s:8:"e87d5e07";i:564;s:8:"03b7710d";i:565;s:8:"5f64c5dc";i:566;s:8:"4ae7b6f1";i:567;s:8:"401b9876";i:568;s:8:"9a162522";i:569;s:8:"2a1d6390";i:570;s:8:"c115eeff";i:571;s:8:"e549f7df";i:572;s:8:"a159c579";i:573;s:8:"48a44ff6";i:574;s:8:"e65fd1fc";i:575;s:8:"bb74cd7b";i:576;s:8:"87cc0383";i:577;s:8:"052755ee";i:578;s:8:"eba29b21";i:579;s:8:"88e2efa9";i:580;s:8:"a1a521b9";i:581;s:8:"ffb6f27b";i:582;s:8:"4fea3248";i:583;s:8:"0f46ad03";i:584;s:8:"58902f76";i:585;s:8:"cfb3f87e";i:586;s:8:"efb3d85c";i:587;s:8:"1e0f4648";i:588;s:8:"f95eda47";i:589;s:8:"c5220b0b";i:590;s:8:"e6574ef8";i:591;s:8:"f34b162e";i:592;s:8:"09b08b14";i:593;s:8:"dae53353";i:594;s:8:"ccc600dd";i:595;s:8:"b3ae8f4f";i:596;s:8:"daed379c";i:597;s:8:"113f5973";i:598;s:8:"6a66bb0a";i:599;s:8:"697817f3";i:600;s:8:"00b78167";i:601;s:8:"1e7c2ed9";i:602;s:8:"65f8a3c5";i:603;s:8:"c50f5c14";i:604;s:8:"a1665ca7";i:605;s:8:"d31c5017";i:606;s:8:"2e421193";i:607;s:8:"cb8d29a9";i:608;s:8:"fa9723b5";i:609;s:8:"8a4d18e4";i:610;s:8:"88081a19";i:611;s:8:"242623e4";i:612;s:8:"86202155";i:613;s:8:"ab55982f";i:614;s:8:"f1a3c261";i:615;s:8:"c44eaa91";i:616;s:8:"06c4716f";i:617;s:8:"60a25216";i:618;s:8:"dcce86a3";i:619;s:8:"bfcec0cd";i:620;s:8:"fb4170ed";i:621;s:8:"9bf5e563";i:622;s:8:"04fa51af";i:623;s:8:"dd86eeb1";i:624;i:0;i:625;i:0;}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } // invalid hex try { var_dump(unserialize('O:21:"Random\Engine\Mt19937":2:{i:0;a:0:{}i:1;a:626:{i:0;s:8:"5aa6b98g";i:1;s:8:"8660cc14";i:2;s:8:"c0b631ca";i:3;s:8:"e85464ad";i:4;s:8:"70fa6108";i:5;s:8:"c5ed9c3c";i:6;s:8:"b05b7ff1";i:7;s:8:"faf33a3a";i:8;s:8:"ab7c0e61";i:9;s:8:"2d4c9c37";i:10;s:8:"daffe918";i:11;s:8:"644f25b9";i:12;s:8:"fdb352e5";i:13;s:8:"434dafa9";i:14;s:8:"a3c9826e";i:15;s:8:"923dfd8c";i:16;s:8:"f641a225";i:17;s:8:"d87134b3";i:18;s:8:"c3b7926e";i:19;s:8:"c880b60d";i:20;s:8:"975f362d";i:21;s:8:"48192b77";i:22;s:8:"6f7dd08b";i:23;s:8:"7d4ad4f8";i:24;s:8:"d805b910";i:25;s:8:"8c98b365";i:26;s:8:"89e54af9";i:27;s:8:"e5257a3c";i:28;s:8:"8f596624";i:29;s:8:"3f42f88a";i:30;s:8:"6a7e95cc";i:31;s:8:"e1349e4d";i:32;s:8:"4539bc92";i:33;s:8:"045a3148";i:34;s:8:"c27cf7b9";i:35;s:8:"c64e8009";i:36;s:8:"dc5ed02e";i:37;s:8:"5753c741";i:38;s:8:"50be0a82";i:39;s:8:"822da0ee";i:40;s:8:"42fdb3c6";i:41;s:8:"c668fc80";i:42;s:8:"262376c6";i:43;s:8:"17b998c6";i:44;s:8:"1f3aac02";i:45;s:8:"6f939c7e";i:46;s:8:"21c099f4";i:47;s:8:"0f4b5c76";i:48;s:8:"64799ac0";i:49;s:8:"45d3bb99";i:50;s:8:"8ff3eb79";i:51;s:8:"61996264";i:52;s:8:"2b9ab1f4";i:53;s:8:"a0d0c50f";i:54;s:8:"f08713ce";i:55;s:8:"6b1cf9d8";i:56;s:8:"52d92cc5";i:57;s:8:"34bcec6f";i:58;s:8:"83ffa063";i:59;s:8:"a002321d";i:60;s:8:"386c46d9";i:61;s:8:"45e2c63e";i:62;s:8:"f481bdf4";i:63;s:8:"df58facb";i:64;s:8:"1781e49b";i:65;s:8:"1d968a6b";i:66;s:8:"8aa7fdd2";i:67;s:8:"631ac8cd";i:68;s:8:"8090ff8e";i:69;s:8:"4ddd4a5d";i:70;s:8:"ff6d8193";i:71;s:8:"39e18244";i:72;s:8:"4efe15db";i:73;s:8:"3fe64cd5";i:74;s:8:"e693a97f";i:75;s:8:"807a34e9";i:76;s:8:"6dc16ae7";i:77;s:8:"a1e1ed1d";i:78;s:8:"605bdc86";i:79;s:8:"abb1830e";i:80;s:8:"2baabeda";i:81;s:8:"fc0f66ad";i:82;s:8:"9cf4fb96";i:83;s:8:"b50ff764";i:84;s:8:"67c37a3d";i:85;s:8:"15253035";i:86;s:8:"387fce47";i:87;s:8:"5c3299a5";i:88;s:8:"125602b9";i:89;s:8:"daeb445c";i:90;s:8:"289e5a8d";i:91;s:8:"b47cd48c";i:92;s:8:"8664db23";i:93;s:8:"b9352af8";i:94;s:8:"51684d88";i:95;s:8:"b204cbc9";i:96;s:8:"e1b6becc";i:97;s:8:"dbbe0ee6";i:98;s:8:"89e54027";i:99;s:8:"a6512564";i:100;s:8:"3aab8d17";i:101;s:8:"7cab5272";i:102;s:8:"1804e981";i:103;s:8:"0bfebe2c";i:104;s:8:"7c082a4c";i:105;s:8:"06bc80c3";i:106;s:8:"c63db839";i:107;s:8:"59edb59d";i:108;s:8:"b52d9655";i:109;s:8:"efce041b";i:110;s:8:"57c1f890";i:111;s:8:"15499697";i:112;s:8:"e0ad3e3a";i:113;s:8:"408d4c16";i:114;s:8:"e53cf468";i:115;s:8:"6ea3d84f";i:116;s:8:"0a2bc4f2";i:117;s:8:"27b59259";i:118;s:8:"d223514b";i:119;s:8:"434c4185";i:120;s:8:"999c71df";i:121;s:8:"46134706";i:122;s:8:"f7f048d0";i:123;s:8:"7f5cfe34";i:124;s:8:"9bdc475c";i:125;s:8:"c1cf42ea";i:126;s:8:"65be324b";i:127;s:8:"68c7a1dc";i:128;s:8:"a7c8c5a2";i:129;s:8:"ecc4cd8a";i:130;s:8:"a761615c";i:131;s:8:"718ec534";i:132;s:8:"c8b086fc";i:133;s:8:"ead759f9";i:134;s:8:"eb9df4a0";i:135;s:8:"ec5b25f9";i:136;s:8:"3a6ff94e";i:137;s:8:"4511a3de";i:138;s:8:"9034f1c6";i:139;s:8:"5c1c6d14";i:140;s:8:"a228ed46";i:141;s:8:"ffe19f2f";i:142;s:8:"f21f68cf";i:143;s:8:"6c2235a4";i:144;s:8:"e0aed51a";i:145;s:8:"2ade527b";i:146;s:8:"65f3c758";i:147;s:8:"f6e868b7";i:148;s:8:"49b770a5";i:149;s:8:"48ab9158";i:150;s:8:"ab07a671";i:151;s:8:"4ef74251";i:152;s:8:"f4cad644";i:153;s:8:"1576c59e";i:154;s:8:"3882bbd1";i:155;s:8:"e49f32c0";i:156;s:8:"c67b757c";i:157;s:8:"3528c5d8";i:158;s:8:"371c3e34";i:159;s:8:"7f1d614f";i:160;s:8:"b9e19e66";i:161;s:8:"80a1d97f";i:162;s:8:"7f93c9f3";i:163;s:8:"4e82ea48";i:164;s:8:"9675e170";i:165;s:8:"aa54caef";i:166;s:8:"3bb9838e";i:167;s:8:"9c0d0a2b";i:168;s:8:"2595d91f";i:169;s:8:"84cc7ff2";i:170;s:8:"9457c4ee";i:171;s:8:"405b6bc8";i:172;s:8:"5aa668a4";i:173;s:8:"e94dfca2";i:174;s:8:"89c0d739";i:175;s:8:"459f8eb3";i:176;s:8:"76b95b42";i:177;s:8:"0e5ceafb";i:178;s:8:"55d4eaee";i:179;s:8:"a55a4784";i:180;s:8:"8c23e133";i:181;s:8:"0994f794";i:182;s:8:"a8d4d1b7";i:183;s:8:"0a50b177";i:184;s:8:"65409f44";i:185;s:8:"acf34e81";i:186;s:8:"e32f278e";i:187;s:8:"7aa21660";i:188;s:8:"9da66881";i:189;s:8:"5c4df7c5";i:190;s:8:"b21f8a4e";i:191;s:8:"d2cc6756";i:192;s:8:"8716f97d";i:193;s:8:"aabd84c5";i:194;s:8:"2e0a965a";i:195;s:8:"b4acc29c";i:196;s:8:"ed3be992";i:197;s:8:"867d9400";i:198;s:8:"a696ba3e";i:199;s:8:"8e2af3d9";i:200;s:8:"8fd95ea9";i:201;s:8:"930903d8";i:202;s:8:"4508dbb1";i:203;s:8:"80598d21";i:204;s:8:"df87fb74";i:205;s:8:"9d019d24";i:206;s:8:"05d5ce2e";i:207;s:8:"ed69bcfe";i:208;s:8:"f83a8d70";i:209;s:8:"750b10bd";i:210;s:8:"c0df892c";i:211;s:8:"df41f215";i:212;s:8:"03df46e3";i:213;s:8:"4e6dce66";i:214;s:8:"ea45a428";i:215;s:8:"cbbf3ff6";i:216;s:8:"f931c7b2";i:217;s:8:"80d19eab";i:218;s:8:"0e2c13da";i:219;s:8:"4b99ee8b";i:220;s:8:"2311d69e";i:221;s:8:"ca9050a7";i:222;s:8:"a4d9eec1";i:223;s:8:"ee665c77";i:224;s:8:"0714f961";i:225;s:8:"81f5be46";i:226;s:8:"420ea4bf";i:227;s:8:"281c28f0";i:228;s:8:"9936ab3f";i:229;s:8:"e4ca8936";i:230;s:8:"224d247b";i:231;s:8:"a564dffe";i:232;s:8:"d15045d2";i:233;s:8:"97d01e8f";i:234;s:8:"71793232";i:235;s:8:"43fe461e";i:236;s:8:"3b50916b";i:237;s:8:"ff242439";i:238;s:8:"a748a0a9";i:239;s:8:"ff51a2a6";i:240;s:8:"dec0ad0d";i:241;s:8:"4bcf2a2e";i:242;s:8:"2be6a97f";i:243;s:8:"eb3e636a";i:244;s:8:"81e31d64";i:245;s:8:"6ca4db9d";i:246;s:8:"bc5bd290";i:247;s:8:"ed2d2ba4";i:248;s:8:"00c46d55";i:249;s:8:"27578407";i:250;s:8:"bedbbcd8";i:251;s:8:"18172abc";i:252;s:8:"eaa5b9cf";i:253;s:8:"9e87ab84";i:254;s:8:"a0e2741c";i:255;s:8:"3bb931ae";i:256;s:8:"3a7b75cd";i:257;s:8:"1052cbf5";i:258;s:8:"b7afd060";i:259;s:8:"1d143d51";i:260;s:8:"17fb7422";i:261;s:8:"523fd346";i:262;s:8:"50429afd";i:263;s:8:"308ece7b";i:264;s:8:"285aa5c1";i:265;s:8:"d8afd736";i:266;s:8:"2e30512e";i:267;s:8:"af78ce36";i:268;s:8:"5967e738";i:269;s:8:"e19795de";i:270;s:8:"6d416e39";i:271;s:8:"23570261";i:272;s:8:"23106924";i:273;s:8:"a4b9add9";i:274;s:8:"baa83e79";i:275;s:8:"97ca48d3";i:276;s:8:"f369a004";i:277;s:8:"fa521bf6";i:278;s:8:"312e9e5e";i:279;s:8:"3acdb850";i:280;s:8:"485cbad7";i:281;s:8:"ddc2d365";i:282;s:8:"d8b87c13";i:283;s:8:"51f6aa7a";i:284;s:8:"b1c231ce";i:285;s:8:"926b9e57";i:286;s:8:"32bd5241";i:287;s:8:"b72cf0a0";i:288;s:8:"0cd99f51";i:289;s:8:"80815c0e";i:290;s:8:"a3459115";i:291;s:8:"5bb05439";i:292;s:8:"ee67a282";i:293;s:8:"65e533c5";i:294;s:8:"62e57b7a";i:295;s:8:"0f4a42fe";i:296;s:8:"ff5b8045";i:297;s:8:"cb9d60cf";i:298;s:8:"ffc891cd";i:299;s:8:"514d6027";i:300;s:8:"5b92df3b";i:301;s:8:"1fb47b1a";i:302;s:8:"a2382db8";i:303;s:8:"6f8b23cd";i:304;s:8:"db72737a";i:305;s:8:"d2d5022b";i:306;s:8:"eef762a7";i:307;s:8:"771fc2ed";i:308;s:8:"6581afb1";i:309;s:8:"64d7ffbd";i:310;s:8:"93a15a65";i:311;s:8:"fdc8b81b";i:312;s:8:"6369357b";i:313;s:8:"a8a58d2e";i:314;s:8:"d9ab2ed6";i:315;s:8:"0465340d";i:316;s:8:"eed4e3f1";i:317;s:8:"7e15ef9d";i:318;s:8:"99444e57";i:319;s:8:"959a6881";i:320;s:8:"e7498e10";i:321;s:8:"d7d0699e";i:322;s:8:"12372566";i:323;s:8:"b9f97c89";i:324;s:8:"5e688172";i:325;s:8:"8105e3b8";i:326;s:8:"627e9227";i:327;s:8:"67edb47d";i:328;s:8:"74e69d5f";i:329;s:8:"b8c5df2c";i:330;s:8:"14f06e80";i:331;s:8:"1a0af27f";i:332;s:8:"fa6ad68b";i:333;s:8:"d5938b0d";i:334;s:8:"2df9b8cc";i:335;s:8:"d90bd16c";i:336;s:8:"18779d24";i:337;s:8:"e1b81866";i:338;s:8:"dc51e106";i:339;s:8:"5078c0ce";i:340;s:8:"8fde3be3";i:341;s:8:"85939b08";i:342;s:8:"50f5565d";i:343;s:8:"281ec5f0";i:344;s:8:"ee2c4dfb";i:345;s:8:"89df2863";i:346;s:8:"0444ef85";i:347;s:8:"d52671b6";i:348;s:8:"84695c5d";i:349;s:8:"ceb19fc9";i:350;s:8:"8cd19595";i:351;s:8:"9773504b";i:352;s:8:"72031351";i:353;s:8:"285de56c";i:354;s:8:"08d949a1";i:355;s:8:"d1d24d60";i:356;s:8:"41c57eff";i:357;s:8:"ded22dfc";i:358;s:8:"9f799eb2";i:359;s:8:"ac14c164";i:360;s:8:"23ab3dac";i:361;s:8:"76de10e0";i:362;s:8:"72c2ac0b";i:363;s:8:"cce93127";i:364;s:8:"32bbb7e5";i:365;s:8:"b8af671a";i:366;s:8:"24dfc65a";i:367;s:8:"d7c8431f";i:368;s:8:"5cf3dffd";i:369;s:8:"7a93645c";i:370;s:8:"36bb66f8";i:371;s:8:"dc055709";i:372;s:8:"93c58efc";i:373;s:8:"11b9a1e6";i:374;s:8:"e487f36b";i:375;s:8:"7c3bcb46";i:376;s:8:"e4d724a3";i:377;s:8:"b732d653";i:378;s:8:"afc9c219";i:379;s:8:"ea658830";i:380;s:8:"b9052af6";i:381;s:8:"aa46a473";i:382;s:8:"1b37a35e";i:383;s:8:"0ba14ee9";i:384;s:8:"c7e150ac";i:385;s:8:"055ffa96";i:386;s:8:"e2bf88fb";i:387;s:8:"88f1f936";i:388;s:8:"488c7bdb";i:389;s:8:"a9dacbd1";i:390;s:8:"aaeea26f";i:391;s:8:"237af1cb";i:392;s:8:"e3dbdb50";i:393;s:8:"c8e5949e";i:394;s:8:"e70a989a";i:395;s:8:"fa540d6d";i:396;s:8:"f055b2f2";i:397;s:8:"1fc8acd4";i:398;s:8:"accb1a9b";i:399;s:8:"bedfb89c";i:400;s:8:"3d243ec0";i:401;s:8:"d2f3f2d8";i:402;s:8:"d83e7c53";i:403;s:8:"4f12e12d";i:404;s:8:"f48f33d1";i:405;s:8:"9555d943";i:406;s:8:"db853a55";i:407;s:8:"506a95b4";i:408;s:8:"408155d1";i:409;s:8:"32a384a0";i:410;s:8:"21c34eb4";i:411;s:8:"93e2e1ae";i:412;s:8:"88582a10";i:413;s:8:"1f065648";i:414;s:8:"96c3c81b";i:415;s:8:"412bc358";i:416;s:8:"11a4e990";i:417;s:8:"805ead73";i:418;s:8:"ec8ca56e";i:419;s:8:"a2ed4bdc";i:420;s:8:"ac408a10";i:421;s:8:"4ca98f96";i:422;s:8:"0686b6df";i:423;s:8:"9e9f7ae4";i:424;s:8:"07d5f658";i:425;s:8:"1c121a0c";i:426;s:8:"c11c8e82";i:427;s:8:"13f2c6d7";i:428;s:8:"e9f6ad9c";i:429;s:8:"bc1dc285";i:430;s:8:"e271fe4b";i:431;s:8:"34114ee5";i:432;s:8:"92ad1c39";i:433;s:8:"5ab5504b";i:434;s:8:"4f7118a7";i:435;s:8:"d1ceec2f";i:436;s:8:"adfd7622";i:437;s:8:"f4f4a9c0";i:438;s:8:"2d4f21e3";i:439;s:8:"3b4bed9e";i:440;s:8:"42ac5810";i:441;s:8:"7eae8db5";i:442;s:8:"09dc329e";i:443;s:8:"3c723314";i:444;s:8:"7fb50c08";i:445;s:8:"71fd69dd";i:446;s:8:"013ce542";i:447;s:8:"0add0d73";i:448;s:8:"465d495a";i:449;s:8:"9f8ddb9d";i:450;s:8:"f293e79e";i:451;s:8:"d6f59d72";i:452;s:8:"ac22e38f";i:453;s:8:"e96d5751";i:454;s:8:"fba79717";i:455;s:8:"39fedf2f";i:456;s:8:"3fb25196";i:457;s:8:"fcdaa825";i:458;s:8:"9a960022";i:459;s:8:"5371af3d";i:460;s:8:"df7faf0a";i:461;s:8:"82c22c85";i:462;s:8:"dfbbae9f";i:463;s:8:"403a4b84";i:464;s:8:"bc938282";i:465;s:8:"d2355fbc";i:466;s:8:"8d72b179";i:467;s:8:"dced02b2";i:468;s:8:"227b82e3";i:469;s:8:"24c60db6";i:470;s:8:"45092b73";i:471;s:8:"767c0e1d";i:472;s:8:"7eb5c592";i:473;s:8:"d0b356d9";i:474;s:8:"dc95ee45";i:475;s:8:"39aa5820";i:476;s:8:"9e6e1868";i:477;s:8:"ffe72d78";i:478;s:8:"82ae0503";i:479;s:8:"2ea981ad";i:480;s:8:"6935faba";i:481;s:8:"69c2ba98";i:482;s:8:"69dd219f";i:483;s:8:"860e0d0d";i:484;s:8:"5f451aa3";i:485;s:8:"a9d5f07d";i:486;s:8:"ec623682";i:487;s:8:"04d8adba";i:488;s:8:"717e8c76";i:489;s:8:"f9c1fb75";i:490;s:8:"ab4c9e06";i:491;s:8:"3895ef4d";i:492;s:8:"37c09060";i:493;s:8:"f3b7c652";i:494;s:8:"74dc421e";i:495;s:8:"97d458be";i:496;s:8:"1a1ddea1";i:497;s:8:"001c68ad";i:498;s:8:"680f033f";i:499;s:8:"b2e9bd38";i:500;s:8:"54192958";i:501;s:8:"b6dd0693";i:502;s:8:"9d149906";i:503;s:8:"9ba5479a";i:504;s:8:"18ba25e8";i:505;s:8:"16fa3e51";i:506;s:8:"1e74b698";i:507;s:8:"c5932028";i:508;s:8:"5a6cf6cd";i:509;s:8:"6fa90e13";i:510;s:8:"bcabdecb";i:511;s:8:"ae23af9a";i:512;s:8:"76b297eb";i:513;s:8:"d1332632";i:514;s:8:"693a55c3";i:515;s:8:"7c4beb9b";i:516;s:8:"409a0a15";i:517;s:8:"60f68335";i:518;s:8:"febcb934";i:519;s:8:"f32c6f8c";i:520;s:8:"aacacf0d";i:521;s:8:"d1f56e99";i:522;s:8:"d65bcf00";i:523;s:8:"361c9633";i:524;s:8:"cd34d7f4";i:525;s:8:"37d38e62";i:526;s:8:"942dee9d";i:527;s:8:"f41c9445";i:528;s:8:"7e9a8b5d";i:529;s:8:"4b941ed7";i:530;s:8:"c6256dce";i:531;s:8:"6c285146";i:532;s:8:"5920147e";i:533;s:8:"934d59ed";i:534;s:8:"5f400a1d";i:535;s:8:"1a5de58c";i:536;s:8:"11e601de";i:537;s:8:"cf4da287";i:538;s:8:"756a54e4";i:539;s:8:"9f2b1015";i:540;s:8:"3a3df642";i:541;s:8:"5d024d64";i:542;s:8:"2d617393";i:543;s:8:"e1b4ec53";i:544;s:8:"24996b5e";i:545;s:8:"7a271bf1";i:546;s:8:"68d7da60";i:547;s:8:"06d3bc73";i:548;s:8:"f21095f7";i:549;s:8:"93e6bfd9";i:550;s:8:"e80b015b";i:551;s:8:"4ddd4ede";i:552;s:8:"cec3d813";i:553;s:8:"281f2a65";i:554;s:8:"ffa068fb";i:555;s:8:"60e712e7";i:556;s:8:"4abcecac";i:557;s:8:"eef01060";i:558;s:8:"8e79e897";i:559;s:8:"b0cd39fe";i:560;s:8:"28cc9604";i:561;s:8:"c7bd58e0";i:562;s:8:"c73b1765";i:563;s:8:"e87d5e07";i:564;s:8:"03b7710d";i:565;s:8:"5f64c5dc";i:566;s:8:"4ae7b6f1";i:567;s:8:"401b9876";i:568;s:8:"9a162522";i:569;s:8:"2a1d6390";i:570;s:8:"c115eeff";i:571;s:8:"e549f7df";i:572;s:8:"a159c579";i:573;s:8:"48a44ff6";i:574;s:8:"e65fd1fc";i:575;s:8:"bb74cd7b";i:576;s:8:"87cc0383";i:577;s:8:"052755ee";i:578;s:8:"eba29b21";i:579;s:8:"88e2efa9";i:580;s:8:"a1a521b9";i:581;s:8:"ffb6f27b";i:582;s:8:"4fea3248";i:583;s:8:"0f46ad03";i:584;s:8:"58902f76";i:585;s:8:"cfb3f87e";i:586;s:8:"efb3d85c";i:587;s:8:"1e0f4648";i:588;s:8:"f95eda47";i:589;s:8:"c5220b0b";i:590;s:8:"e6574ef8";i:591;s:8:"f34b162e";i:592;s:8:"09b08b14";i:593;s:8:"dae53353";i:594;s:8:"ccc600dd";i:595;s:8:"b3ae8f4f";i:596;s:8:"daed379c";i:597;s:8:"113f5973";i:598;s:8:"6a66bb0a";i:599;s:8:"697817f3";i:600;s:8:"00b78167";i:601;s:8:"1e7c2ed9";i:602;s:8:"65f8a3c5";i:603;s:8:"c50f5c14";i:604;s:8:"a1665ca7";i:605;s:8:"d31c5017";i:606;s:8:"2e421193";i:607;s:8:"cb8d29a9";i:608;s:8:"fa9723b5";i:609;s:8:"8a4d18e4";i:610;s:8:"88081a19";i:611;s:8:"242623e4";i:612;s:8:"86202155";i:613;s:8:"ab55982f";i:614;s:8:"f1a3c261";i:615;s:8:"c44eaa91";i:616;s:8:"06c4716f";i:617;s:8:"60a25216";i:618;s:8:"dcce86a3";i:619;s:8:"bfcec0cd";i:620;s:8:"fb4170ed";i:621;s:8:"9bf5e563";i:622;s:8:"04fa51af";i:623;s:8:"dd86eeb1";i:624;i:0;i:625;i:0;}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } // invalid count try { var_dump(unserialize('O:21:"Random\Engine\Mt19937":2:{i:0;a:0:{}i:1;a:626:{i:0;s:8:"5aa6b986";i:1;s:8:"8660cc14";i:2;s:8:"c0b631ca";i:3;s:8:"e85464ad";i:4;s:8:"70fa6108";i:5;s:8:"c5ed9c3c";i:6;s:8:"b05b7ff1";i:7;s:8:"faf33a3a";i:8;s:8:"ab7c0e61";i:9;s:8:"2d4c9c37";i:10;s:8:"daffe918";i:11;s:8:"644f25b9";i:12;s:8:"fdb352e5";i:13;s:8:"434dafa9";i:14;s:8:"a3c9826e";i:15;s:8:"923dfd8c";i:16;s:8:"f641a225";i:17;s:8:"d87134b3";i:18;s:8:"c3b7926e";i:19;s:8:"c880b60d";i:20;s:8:"975f362d";i:21;s:8:"48192b77";i:22;s:8:"6f7dd08b";i:23;s:8:"7d4ad4f8";i:24;s:8:"d805b910";i:25;s:8:"8c98b365";i:26;s:8:"89e54af9";i:27;s:8:"e5257a3c";i:28;s:8:"8f596624";i:29;s:8:"3f42f88a";i:30;s:8:"6a7e95cc";i:31;s:8:"e1349e4d";i:32;s:8:"4539bc92";i:33;s:8:"045a3148";i:34;s:8:"c27cf7b9";i:35;s:8:"c64e8009";i:36;s:8:"dc5ed02e";i:37;s:8:"5753c741";i:38;s:8:"50be0a82";i:39;s:8:"822da0ee";i:40;s:8:"42fdb3c6";i:41;s:8:"c668fc80";i:42;s:8:"262376c6";i:43;s:8:"17b998c6";i:44;s:8:"1f3aac02";i:45;s:8:"6f939c7e";i:46;s:8:"21c099f4";i:47;s:8:"0f4b5c76";i:48;s:8:"64799ac0";i:49;s:8:"45d3bb99";i:50;s:8:"8ff3eb79";i:51;s:8:"61996264";i:52;s:8:"2b9ab1f4";i:53;s:8:"a0d0c50f";i:54;s:8:"f08713ce";i:55;s:8:"6b1cf9d8";i:56;s:8:"52d92cc5";i:57;s:8:"34bcec6f";i:58;s:8:"83ffa063";i:59;s:8:"a002321d";i:60;s:8:"386c46d9";i:61;s:8:"45e2c63e";i:62;s:8:"f481bdf4";i:63;s:8:"df58facb";i:64;s:8:"1781e49b";i:65;s:8:"1d968a6b";i:66;s:8:"8aa7fdd2";i:67;s:8:"631ac8cd";i:68;s:8:"8090ff8e";i:69;s:8:"4ddd4a5d";i:70;s:8:"ff6d8193";i:71;s:8:"39e18244";i:72;s:8:"4efe15db";i:73;s:8:"3fe64cd5";i:74;s:8:"e693a97f";i:75;s:8:"807a34e9";i:76;s:8:"6dc16ae7";i:77;s:8:"a1e1ed1d";i:78;s:8:"605bdc86";i:79;s:8:"abb1830e";i:80;s:8:"2baabeda";i:81;s:8:"fc0f66ad";i:82;s:8:"9cf4fb96";i:83;s:8:"b50ff764";i:84;s:8:"67c37a3d";i:85;s:8:"15253035";i:86;s:8:"387fce47";i:87;s:8:"5c3299a5";i:88;s:8:"125602b9";i:89;s:8:"daeb445c";i:90;s:8:"289e5a8d";i:91;s:8:"b47cd48c";i:92;s:8:"8664db23";i:93;s:8:"b9352af8";i:94;s:8:"51684d88";i:95;s:8:"b204cbc9";i:96;s:8:"e1b6becc";i:97;s:8:"dbbe0ee6";i:98;s:8:"89e54027";i:99;s:8:"a6512564";i:100;s:8:"3aab8d17";i:101;s:8:"7cab5272";i:102;s:8:"1804e981";i:103;s:8:"0bfebe2c";i:104;s:8:"7c082a4c";i:105;s:8:"06bc80c3";i:106;s:8:"c63db839";i:107;s:8:"59edb59d";i:108;s:8:"b52d9655";i:109;s:8:"efce041b";i:110;s:8:"57c1f890";i:111;s:8:"15499697";i:112;s:8:"e0ad3e3a";i:113;s:8:"408d4c16";i:114;s:8:"e53cf468";i:115;s:8:"6ea3d84f";i:116;s:8:"0a2bc4f2";i:117;s:8:"27b59259";i:118;s:8:"d223514b";i:119;s:8:"434c4185";i:120;s:8:"999c71df";i:121;s:8:"46134706";i:122;s:8:"f7f048d0";i:123;s:8:"7f5cfe34";i:124;s:8:"9bdc475c";i:125;s:8:"c1cf42ea";i:126;s:8:"65be324b";i:127;s:8:"68c7a1dc";i:128;s:8:"a7c8c5a2";i:129;s:8:"ecc4cd8a";i:130;s:8:"a761615c";i:131;s:8:"718ec534";i:132;s:8:"c8b086fc";i:133;s:8:"ead759f9";i:134;s:8:"eb9df4a0";i:135;s:8:"ec5b25f9";i:136;s:8:"3a6ff94e";i:137;s:8:"4511a3de";i:138;s:8:"9034f1c6";i:139;s:8:"5c1c6d14";i:140;s:8:"a228ed46";i:141;s:8:"ffe19f2f";i:142;s:8:"f21f68cf";i:143;s:8:"6c2235a4";i:144;s:8:"e0aed51a";i:145;s:8:"2ade527b";i:146;s:8:"65f3c758";i:147;s:8:"f6e868b7";i:148;s:8:"49b770a5";i:149;s:8:"48ab9158";i:150;s:8:"ab07a671";i:151;s:8:"4ef74251";i:152;s:8:"f4cad644";i:153;s:8:"1576c59e";i:154;s:8:"3882bbd1";i:155;s:8:"e49f32c0";i:156;s:8:"c67b757c";i:157;s:8:"3528c5d8";i:158;s:8:"371c3e34";i:159;s:8:"7f1d614f";i:160;s:8:"b9e19e66";i:161;s:8:"80a1d97f";i:162;s:8:"7f93c9f3";i:163;s:8:"4e82ea48";i:164;s:8:"9675e170";i:165;s:8:"aa54caef";i:166;s:8:"3bb9838e";i:167;s:8:"9c0d0a2b";i:168;s:8:"2595d91f";i:169;s:8:"84cc7ff2";i:170;s:8:"9457c4ee";i:171;s:8:"405b6bc8";i:172;s:8:"5aa668a4";i:173;s:8:"e94dfca2";i:174;s:8:"89c0d739";i:175;s:8:"459f8eb3";i:176;s:8:"76b95b42";i:177;s:8:"0e5ceafb";i:178;s:8:"55d4eaee";i:179;s:8:"a55a4784";i:180;s:8:"8c23e133";i:181;s:8:"0994f794";i:182;s:8:"a8d4d1b7";i:183;s:8:"0a50b177";i:184;s:8:"65409f44";i:185;s:8:"acf34e81";i:186;s:8:"e32f278e";i:187;s:8:"7aa21660";i:188;s:8:"9da66881";i:189;s:8:"5c4df7c5";i:190;s:8:"b21f8a4e";i:191;s:8:"d2cc6756";i:192;s:8:"8716f97d";i:193;s:8:"aabd84c5";i:194;s:8:"2e0a965a";i:195;s:8:"b4acc29c";i:196;s:8:"ed3be992";i:197;s:8:"867d9400";i:198;s:8:"a696ba3e";i:199;s:8:"8e2af3d9";i:200;s:8:"8fd95ea9";i:201;s:8:"930903d8";i:202;s:8:"4508dbb1";i:203;s:8:"80598d21";i:204;s:8:"df87fb74";i:205;s:8:"9d019d24";i:206;s:8:"05d5ce2e";i:207;s:8:"ed69bcfe";i:208;s:8:"f83a8d70";i:209;s:8:"750b10bd";i:210;s:8:"c0df892c";i:211;s:8:"df41f215";i:212;s:8:"03df46e3";i:213;s:8:"4e6dce66";i:214;s:8:"ea45a428";i:215;s:8:"cbbf3ff6";i:216;s:8:"f931c7b2";i:217;s:8:"80d19eab";i:218;s:8:"0e2c13da";i:219;s:8:"4b99ee8b";i:220;s:8:"2311d69e";i:221;s:8:"ca9050a7";i:222;s:8:"a4d9eec1";i:223;s:8:"ee665c77";i:224;s:8:"0714f961";i:225;s:8:"81f5be46";i:226;s:8:"420ea4bf";i:227;s:8:"281c28f0";i:228;s:8:"9936ab3f";i:229;s:8:"e4ca8936";i:230;s:8:"224d247b";i:231;s:8:"a564dffe";i:232;s:8:"d15045d2";i:233;s:8:"97d01e8f";i:234;s:8:"71793232";i:235;s:8:"43fe461e";i:236;s:8:"3b50916b";i:237;s:8:"ff242439";i:238;s:8:"a748a0a9";i:239;s:8:"ff51a2a6";i:240;s:8:"dec0ad0d";i:241;s:8:"4bcf2a2e";i:242;s:8:"2be6a97f";i:243;s:8:"eb3e636a";i:244;s:8:"81e31d64";i:245;s:8:"6ca4db9d";i:246;s:8:"bc5bd290";i:247;s:8:"ed2d2ba4";i:248;s:8:"00c46d55";i:249;s:8:"27578407";i:250;s:8:"bedbbcd8";i:251;s:8:"18172abc";i:252;s:8:"eaa5b9cf";i:253;s:8:"9e87ab84";i:254;s:8:"a0e2741c";i:255;s:8:"3bb931ae";i:256;s:8:"3a7b75cd";i:257;s:8:"1052cbf5";i:258;s:8:"b7afd060";i:259;s:8:"1d143d51";i:260;s:8:"17fb7422";i:261;s:8:"523fd346";i:262;s:8:"50429afd";i:263;s:8:"308ece7b";i:264;s:8:"285aa5c1";i:265;s:8:"d8afd736";i:266;s:8:"2e30512e";i:267;s:8:"af78ce36";i:268;s:8:"5967e738";i:269;s:8:"e19795de";i:270;s:8:"6d416e39";i:271;s:8:"23570261";i:272;s:8:"23106924";i:273;s:8:"a4b9add9";i:274;s:8:"baa83e79";i:275;s:8:"97ca48d3";i:276;s:8:"f369a004";i:277;s:8:"fa521bf6";i:278;s:8:"312e9e5e";i:279;s:8:"3acdb850";i:280;s:8:"485cbad7";i:281;s:8:"ddc2d365";i:282;s:8:"d8b87c13";i:283;s:8:"51f6aa7a";i:284;s:8:"b1c231ce";i:285;s:8:"926b9e57";i:286;s:8:"32bd5241";i:287;s:8:"b72cf0a0";i:288;s:8:"0cd99f51";i:289;s:8:"80815c0e";i:290;s:8:"a3459115";i:291;s:8:"5bb05439";i:292;s:8:"ee67a282";i:293;s:8:"65e533c5";i:294;s:8:"62e57b7a";i:295;s:8:"0f4a42fe";i:296;s:8:"ff5b8045";i:297;s:8:"cb9d60cf";i:298;s:8:"ffc891cd";i:299;s:8:"514d6027";i:300;s:8:"5b92df3b";i:301;s:8:"1fb47b1a";i:302;s:8:"a2382db8";i:303;s:8:"6f8b23cd";i:304;s:8:"db72737a";i:305;s:8:"d2d5022b";i:306;s:8:"eef762a7";i:307;s:8:"771fc2ed";i:308;s:8:"6581afb1";i:309;s:8:"64d7ffbd";i:310;s:8:"93a15a65";i:311;s:8:"fdc8b81b";i:312;s:8:"6369357b";i:313;s:8:"a8a58d2e";i:314;s:8:"d9ab2ed6";i:315;s:8:"0465340d";i:316;s:8:"eed4e3f1";i:317;s:8:"7e15ef9d";i:318;s:8:"99444e57";i:319;s:8:"959a6881";i:320;s:8:"e7498e10";i:321;s:8:"d7d0699e";i:322;s:8:"12372566";i:323;s:8:"b9f97c89";i:324;s:8:"5e688172";i:325;s:8:"8105e3b8";i:326;s:8:"627e9227";i:327;s:8:"67edb47d";i:328;s:8:"74e69d5f";i:329;s:8:"b8c5df2c";i:330;s:8:"14f06e80";i:331;s:8:"1a0af27f";i:332;s:8:"fa6ad68b";i:333;s:8:"d5938b0d";i:334;s:8:"2df9b8cc";i:335;s:8:"d90bd16c";i:336;s:8:"18779d24";i:337;s:8:"e1b81866";i:338;s:8:"dc51e106";i:339;s:8:"5078c0ce";i:340;s:8:"8fde3be3";i:341;s:8:"85939b08";i:342;s:8:"50f5565d";i:343;s:8:"281ec5f0";i:344;s:8:"ee2c4dfb";i:345;s:8:"89df2863";i:346;s:8:"0444ef85";i:347;s:8:"d52671b6";i:348;s:8:"84695c5d";i:349;s:8:"ceb19fc9";i:350;s:8:"8cd19595";i:351;s:8:"9773504b";i:352;s:8:"72031351";i:353;s:8:"285de56c";i:354;s:8:"08d949a1";i:355;s:8:"d1d24d60";i:356;s:8:"41c57eff";i:357;s:8:"ded22dfc";i:358;s:8:"9f799eb2";i:359;s:8:"ac14c164";i:360;s:8:"23ab3dac";i:361;s:8:"76de10e0";i:362;s:8:"72c2ac0b";i:363;s:8:"cce93127";i:364;s:8:"32bbb7e5";i:365;s:8:"b8af671a";i:366;s:8:"24dfc65a";i:367;s:8:"d7c8431f";i:368;s:8:"5cf3dffd";i:369;s:8:"7a93645c";i:370;s:8:"36bb66f8";i:371;s:8:"dc055709";i:372;s:8:"93c58efc";i:373;s:8:"11b9a1e6";i:374;s:8:"e487f36b";i:375;s:8:"7c3bcb46";i:376;s:8:"e4d724a3";i:377;s:8:"b732d653";i:378;s:8:"afc9c219";i:379;s:8:"ea658830";i:380;s:8:"b9052af6";i:381;s:8:"aa46a473";i:382;s:8:"1b37a35e";i:383;s:8:"0ba14ee9";i:384;s:8:"c7e150ac";i:385;s:8:"055ffa96";i:386;s:8:"e2bf88fb";i:387;s:8:"88f1f936";i:388;s:8:"488c7bdb";i:389;s:8:"a9dacbd1";i:390;s:8:"aaeea26f";i:391;s:8:"237af1cb";i:392;s:8:"e3dbdb50";i:393;s:8:"c8e5949e";i:394;s:8:"e70a989a";i:395;s:8:"fa540d6d";i:396;s:8:"f055b2f2";i:397;s:8:"1fc8acd4";i:398;s:8:"accb1a9b";i:399;s:8:"bedfb89c";i:400;s:8:"3d243ec0";i:401;s:8:"d2f3f2d8";i:402;s:8:"d83e7c53";i:403;s:8:"4f12e12d";i:404;s:8:"f48f33d1";i:405;s:8:"9555d943";i:406;s:8:"db853a55";i:407;s:8:"506a95b4";i:408;s:8:"408155d1";i:409;s:8:"32a384a0";i:410;s:8:"21c34eb4";i:411;s:8:"93e2e1ae";i:412;s:8:"88582a10";i:413;s:8:"1f065648";i:414;s:8:"96c3c81b";i:415;s:8:"412bc358";i:416;s:8:"11a4e990";i:417;s:8:"805ead73";i:418;s:8:"ec8ca56e";i:419;s:8:"a2ed4bdc";i:420;s:8:"ac408a10";i:421;s:8:"4ca98f96";i:422;s:8:"0686b6df";i:423;s:8:"9e9f7ae4";i:424;s:8:"07d5f658";i:425;s:8:"1c121a0c";i:426;s:8:"c11c8e82";i:427;s:8:"13f2c6d7";i:428;s:8:"e9f6ad9c";i:429;s:8:"bc1dc285";i:430;s:8:"e271fe4b";i:431;s:8:"34114ee5";i:432;s:8:"92ad1c39";i:433;s:8:"5ab5504b";i:434;s:8:"4f7118a7";i:435;s:8:"d1ceec2f";i:436;s:8:"adfd7622";i:437;s:8:"f4f4a9c0";i:438;s:8:"2d4f21e3";i:439;s:8:"3b4bed9e";i:440;s:8:"42ac5810";i:441;s:8:"7eae8db5";i:442;s:8:"09dc329e";i:443;s:8:"3c723314";i:444;s:8:"7fb50c08";i:445;s:8:"71fd69dd";i:446;s:8:"013ce542";i:447;s:8:"0add0d73";i:448;s:8:"465d495a";i:449;s:8:"9f8ddb9d";i:450;s:8:"f293e79e";i:451;s:8:"d6f59d72";i:452;s:8:"ac22e38f";i:453;s:8:"e96d5751";i:454;s:8:"fba79717";i:455;s:8:"39fedf2f";i:456;s:8:"3fb25196";i:457;s:8:"fcdaa825";i:458;s:8:"9a960022";i:459;s:8:"5371af3d";i:460;s:8:"df7faf0a";i:461;s:8:"82c22c85";i:462;s:8:"dfbbae9f";i:463;s:8:"403a4b84";i:464;s:8:"bc938282";i:465;s:8:"d2355fbc";i:466;s:8:"8d72b179";i:467;s:8:"dced02b2";i:468;s:8:"227b82e3";i:469;s:8:"24c60db6";i:470;s:8:"45092b73";i:471;s:8:"767c0e1d";i:472;s:8:"7eb5c592";i:473;s:8:"d0b356d9";i:474;s:8:"dc95ee45";i:475;s:8:"39aa5820";i:476;s:8:"9e6e1868";i:477;s:8:"ffe72d78";i:478;s:8:"82ae0503";i:479;s:8:"2ea981ad";i:480;s:8:"6935faba";i:481;s:8:"69c2ba98";i:482;s:8:"69dd219f";i:483;s:8:"860e0d0d";i:484;s:8:"5f451aa3";i:485;s:8:"a9d5f07d";i:486;s:8:"ec623682";i:487;s:8:"04d8adba";i:488;s:8:"717e8c76";i:489;s:8:"f9c1fb75";i:490;s:8:"ab4c9e06";i:491;s:8:"3895ef4d";i:492;s:8:"37c09060";i:493;s:8:"f3b7c652";i:494;s:8:"74dc421e";i:495;s:8:"97d458be";i:496;s:8:"1a1ddea1";i:497;s:8:"001c68ad";i:498;s:8:"680f033f";i:499;s:8:"b2e9bd38";i:500;s:8:"54192958";i:501;s:8:"b6dd0693";i:502;s:8:"9d149906";i:503;s:8:"9ba5479a";i:504;s:8:"18ba25e8";i:505;s:8:"16fa3e51";i:506;s:8:"1e74b698";i:507;s:8:"c5932028";i:508;s:8:"5a6cf6cd";i:509;s:8:"6fa90e13";i:510;s:8:"bcabdecb";i:511;s:8:"ae23af9a";i:512;s:8:"76b297eb";i:513;s:8:"d1332632";i:514;s:8:"693a55c3";i:515;s:8:"7c4beb9b";i:516;s:8:"409a0a15";i:517;s:8:"60f68335";i:518;s:8:"febcb934";i:519;s:8:"f32c6f8c";i:520;s:8:"aacacf0d";i:521;s:8:"d1f56e99";i:522;s:8:"d65bcf00";i:523;s:8:"361c9633";i:524;s:8:"cd34d7f4";i:525;s:8:"37d38e62";i:526;s:8:"942dee9d";i:527;s:8:"f41c9445";i:528;s:8:"7e9a8b5d";i:529;s:8:"4b941ed7";i:530;s:8:"c6256dce";i:531;s:8:"6c285146";i:532;s:8:"5920147e";i:533;s:8:"934d59ed";i:534;s:8:"5f400a1d";i:535;s:8:"1a5de58c";i:536;s:8:"11e601de";i:537;s:8:"cf4da287";i:538;s:8:"756a54e4";i:539;s:8:"9f2b1015";i:540;s:8:"3a3df642";i:541;s:8:"5d024d64";i:542;s:8:"2d617393";i:543;s:8:"e1b4ec53";i:544;s:8:"24996b5e";i:545;s:8:"7a271bf1";i:546;s:8:"68d7da60";i:547;s:8:"06d3bc73";i:548;s:8:"f21095f7";i:549;s:8:"93e6bfd9";i:550;s:8:"e80b015b";i:551;s:8:"4ddd4ede";i:552;s:8:"cec3d813";i:553;s:8:"281f2a65";i:554;s:8:"ffa068fb";i:555;s:8:"60e712e7";i:556;s:8:"4abcecac";i:557;s:8:"eef01060";i:558;s:8:"8e79e897";i:559;s:8:"b0cd39fe";i:560;s:8:"28cc9604";i:561;s:8:"c7bd58e0";i:562;s:8:"c73b1765";i:563;s:8:"e87d5e07";i:564;s:8:"03b7710d";i:565;s:8:"5f64c5dc";i:566;s:8:"4ae7b6f1";i:567;s:8:"401b9876";i:568;s:8:"9a162522";i:569;s:8:"2a1d6390";i:570;s:8:"c115eeff";i:571;s:8:"e549f7df";i:572;s:8:"a159c579";i:573;s:8:"48a44ff6";i:574;s:8:"e65fd1fc";i:575;s:8:"bb74cd7b";i:576;s:8:"87cc0383";i:577;s:8:"052755ee";i:578;s:8:"eba29b21";i:579;s:8:"88e2efa9";i:580;s:8:"a1a521b9";i:581;s:8:"ffb6f27b";i:582;s:8:"4fea3248";i:583;s:8:"0f46ad03";i:584;s:8:"58902f76";i:585;s:8:"cfb3f87e";i:586;s:8:"efb3d85c";i:587;s:8:"1e0f4648";i:588;s:8:"f95eda47";i:589;s:8:"c5220b0b";i:590;s:8:"e6574ef8";i:591;s:8:"f34b162e";i:592;s:8:"09b08b14";i:593;s:8:"dae53353";i:594;s:8:"ccc600dd";i:595;s:8:"b3ae8f4f";i:596;s:8:"daed379c";i:597;s:8:"113f5973";i:598;s:8:"6a66bb0a";i:599;s:8:"697817f3";i:600;s:8:"00b78167";i:601;s:8:"1e7c2ed9";i:602;s:8:"65f8a3c5";i:603;s:8:"c50f5c14";i:604;s:8:"a1665ca7";i:605;s:8:"d31c5017";i:606;s:8:"2e421193";i:607;s:8:"cb8d29a9";i:608;s:8:"fa9723b5";i:609;s:8:"8a4d18e4";i:610;s:8:"88081a19";i:611;s:8:"242623e4";i:612;s:8:"86202155";i:613;s:8:"ab55982f";i:614;s:8:"f1a3c261";i:615;s:8:"c44eaa91";i:616;s:8:"06c4716f";i:617;s:8:"60a25216";i:618;s:8:"dcce86a3";i:619;s:8:"bfcec0cd";i:620;s:8:"fb4170ed";i:621;s:8:"9bf5e563";i:622;s:8:"04fa51af";i:623;s:8:"dd86eeb1";i:624;i:1000;i:625;i:0;}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } // invalid mode try { var_dump(unserialize('O:21:"Random\Engine\Mt19937":2:{i:0;a:0:{}i:1;a:626:{i:0;s:8:"5aa6b986";i:1;s:8:"8660cc14";i:2;s:8:"c0b631ca";i:3;s:8:"e85464ad";i:4;s:8:"70fa6108";i:5;s:8:"c5ed9c3c";i:6;s:8:"b05b7ff1";i:7;s:8:"faf33a3a";i:8;s:8:"ab7c0e61";i:9;s:8:"2d4c9c37";i:10;s:8:"daffe918";i:11;s:8:"644f25b9";i:12;s:8:"fdb352e5";i:13;s:8:"434dafa9";i:14;s:8:"a3c9826e";i:15;s:8:"923dfd8c";i:16;s:8:"f641a225";i:17;s:8:"d87134b3";i:18;s:8:"c3b7926e";i:19;s:8:"c880b60d";i:20;s:8:"975f362d";i:21;s:8:"48192b77";i:22;s:8:"6f7dd08b";i:23;s:8:"7d4ad4f8";i:24;s:8:"d805b910";i:25;s:8:"8c98b365";i:26;s:8:"89e54af9";i:27;s:8:"e5257a3c";i:28;s:8:"8f596624";i:29;s:8:"3f42f88a";i:30;s:8:"6a7e95cc";i:31;s:8:"e1349e4d";i:32;s:8:"4539bc92";i:33;s:8:"045a3148";i:34;s:8:"c27cf7b9";i:35;s:8:"c64e8009";i:36;s:8:"dc5ed02e";i:37;s:8:"5753c741";i:38;s:8:"50be0a82";i:39;s:8:"822da0ee";i:40;s:8:"42fdb3c6";i:41;s:8:"c668fc80";i:42;s:8:"262376c6";i:43;s:8:"17b998c6";i:44;s:8:"1f3aac02";i:45;s:8:"6f939c7e";i:46;s:8:"21c099f4";i:47;s:8:"0f4b5c76";i:48;s:8:"64799ac0";i:49;s:8:"45d3bb99";i:50;s:8:"8ff3eb79";i:51;s:8:"61996264";i:52;s:8:"2b9ab1f4";i:53;s:8:"a0d0c50f";i:54;s:8:"f08713ce";i:55;s:8:"6b1cf9d8";i:56;s:8:"52d92cc5";i:57;s:8:"34bcec6f";i:58;s:8:"83ffa063";i:59;s:8:"a002321d";i:60;s:8:"386c46d9";i:61;s:8:"45e2c63e";i:62;s:8:"f481bdf4";i:63;s:8:"df58facb";i:64;s:8:"1781e49b";i:65;s:8:"1d968a6b";i:66;s:8:"8aa7fdd2";i:67;s:8:"631ac8cd";i:68;s:8:"8090ff8e";i:69;s:8:"4ddd4a5d";i:70;s:8:"ff6d8193";i:71;s:8:"39e18244";i:72;s:8:"4efe15db";i:73;s:8:"3fe64cd5";i:74;s:8:"e693a97f";i:75;s:8:"807a34e9";i:76;s:8:"6dc16ae7";i:77;s:8:"a1e1ed1d";i:78;s:8:"605bdc86";i:79;s:8:"abb1830e";i:80;s:8:"2baabeda";i:81;s:8:"fc0f66ad";i:82;s:8:"9cf4fb96";i:83;s:8:"b50ff764";i:84;s:8:"67c37a3d";i:85;s:8:"15253035";i:86;s:8:"387fce47";i:87;s:8:"5c3299a5";i:88;s:8:"125602b9";i:89;s:8:"daeb445c";i:90;s:8:"289e5a8d";i:91;s:8:"b47cd48c";i:92;s:8:"8664db23";i:93;s:8:"b9352af8";i:94;s:8:"51684d88";i:95;s:8:"b204cbc9";i:96;s:8:"e1b6becc";i:97;s:8:"dbbe0ee6";i:98;s:8:"89e54027";i:99;s:8:"a6512564";i:100;s:8:"3aab8d17";i:101;s:8:"7cab5272";i:102;s:8:"1804e981";i:103;s:8:"0bfebe2c";i:104;s:8:"7c082a4c";i:105;s:8:"06bc80c3";i:106;s:8:"c63db839";i:107;s:8:"59edb59d";i:108;s:8:"b52d9655";i:109;s:8:"efce041b";i:110;s:8:"57c1f890";i:111;s:8:"15499697";i:112;s:8:"e0ad3e3a";i:113;s:8:"408d4c16";i:114;s:8:"e53cf468";i:115;s:8:"6ea3d84f";i:116;s:8:"0a2bc4f2";i:117;s:8:"27b59259";i:118;s:8:"d223514b";i:119;s:8:"434c4185";i:120;s:8:"999c71df";i:121;s:8:"46134706";i:122;s:8:"f7f048d0";i:123;s:8:"7f5cfe34";i:124;s:8:"9bdc475c";i:125;s:8:"c1cf42ea";i:126;s:8:"65be324b";i:127;s:8:"68c7a1dc";i:128;s:8:"a7c8c5a2";i:129;s:8:"ecc4cd8a";i:130;s:8:"a761615c";i:131;s:8:"718ec534";i:132;s:8:"c8b086fc";i:133;s:8:"ead759f9";i:134;s:8:"eb9df4a0";i:135;s:8:"ec5b25f9";i:136;s:8:"3a6ff94e";i:137;s:8:"4511a3de";i:138;s:8:"9034f1c6";i:139;s:8:"5c1c6d14";i:140;s:8:"a228ed46";i:141;s:8:"ffe19f2f";i:142;s:8:"f21f68cf";i:143;s:8:"6c2235a4";i:144;s:8:"e0aed51a";i:145;s:8:"2ade527b";i:146;s:8:"65f3c758";i:147;s:8:"f6e868b7";i:148;s:8:"49b770a5";i:149;s:8:"48ab9158";i:150;s:8:"ab07a671";i:151;s:8:"4ef74251";i:152;s:8:"f4cad644";i:153;s:8:"1576c59e";i:154;s:8:"3882bbd1";i:155;s:8:"e49f32c0";i:156;s:8:"c67b757c";i:157;s:8:"3528c5d8";i:158;s:8:"371c3e34";i:159;s:8:"7f1d614f";i:160;s:8:"b9e19e66";i:161;s:8:"80a1d97f";i:162;s:8:"7f93c9f3";i:163;s:8:"4e82ea48";i:164;s:8:"9675e170";i:165;s:8:"aa54caef";i:166;s:8:"3bb9838e";i:167;s:8:"9c0d0a2b";i:168;s:8:"2595d91f";i:169;s:8:"84cc7ff2";i:170;s:8:"9457c4ee";i:171;s:8:"405b6bc8";i:172;s:8:"5aa668a4";i:173;s:8:"e94dfca2";i:174;s:8:"89c0d739";i:175;s:8:"459f8eb3";i:176;s:8:"76b95b42";i:177;s:8:"0e5ceafb";i:178;s:8:"55d4eaee";i:179;s:8:"a55a4784";i:180;s:8:"8c23e133";i:181;s:8:"0994f794";i:182;s:8:"a8d4d1b7";i:183;s:8:"0a50b177";i:184;s:8:"65409f44";i:185;s:8:"acf34e81";i:186;s:8:"e32f278e";i:187;s:8:"7aa21660";i:188;s:8:"9da66881";i:189;s:8:"5c4df7c5";i:190;s:8:"b21f8a4e";i:191;s:8:"d2cc6756";i:192;s:8:"8716f97d";i:193;s:8:"aabd84c5";i:194;s:8:"2e0a965a";i:195;s:8:"b4acc29c";i:196;s:8:"ed3be992";i:197;s:8:"867d9400";i:198;s:8:"a696ba3e";i:199;s:8:"8e2af3d9";i:200;s:8:"8fd95ea9";i:201;s:8:"930903d8";i:202;s:8:"4508dbb1";i:203;s:8:"80598d21";i:204;s:8:"df87fb74";i:205;s:8:"9d019d24";i:206;s:8:"05d5ce2e";i:207;s:8:"ed69bcfe";i:208;s:8:"f83a8d70";i:209;s:8:"750b10bd";i:210;s:8:"c0df892c";i:211;s:8:"df41f215";i:212;s:8:"03df46e3";i:213;s:8:"4e6dce66";i:214;s:8:"ea45a428";i:215;s:8:"cbbf3ff6";i:216;s:8:"f931c7b2";i:217;s:8:"80d19eab";i:218;s:8:"0e2c13da";i:219;s:8:"4b99ee8b";i:220;s:8:"2311d69e";i:221;s:8:"ca9050a7";i:222;s:8:"a4d9eec1";i:223;s:8:"ee665c77";i:224;s:8:"0714f961";i:225;s:8:"81f5be46";i:226;s:8:"420ea4bf";i:227;s:8:"281c28f0";i:228;s:8:"9936ab3f";i:229;s:8:"e4ca8936";i:230;s:8:"224d247b";i:231;s:8:"a564dffe";i:232;s:8:"d15045d2";i:233;s:8:"97d01e8f";i:234;s:8:"71793232";i:235;s:8:"43fe461e";i:236;s:8:"3b50916b";i:237;s:8:"ff242439";i:238;s:8:"a748a0a9";i:239;s:8:"ff51a2a6";i:240;s:8:"dec0ad0d";i:241;s:8:"4bcf2a2e";i:242;s:8:"2be6a97f";i:243;s:8:"eb3e636a";i:244;s:8:"81e31d64";i:245;s:8:"6ca4db9d";i:246;s:8:"bc5bd290";i:247;s:8:"ed2d2ba4";i:248;s:8:"00c46d55";i:249;s:8:"27578407";i:250;s:8:"bedbbcd8";i:251;s:8:"18172abc";i:252;s:8:"eaa5b9cf";i:253;s:8:"9e87ab84";i:254;s:8:"a0e2741c";i:255;s:8:"3bb931ae";i:256;s:8:"3a7b75cd";i:257;s:8:"1052cbf5";i:258;s:8:"b7afd060";i:259;s:8:"1d143d51";i:260;s:8:"17fb7422";i:261;s:8:"523fd346";i:262;s:8:"50429afd";i:263;s:8:"308ece7b";i:264;s:8:"285aa5c1";i:265;s:8:"d8afd736";i:266;s:8:"2e30512e";i:267;s:8:"af78ce36";i:268;s:8:"5967e738";i:269;s:8:"e19795de";i:270;s:8:"6d416e39";i:271;s:8:"23570261";i:272;s:8:"23106924";i:273;s:8:"a4b9add9";i:274;s:8:"baa83e79";i:275;s:8:"97ca48d3";i:276;s:8:"f369a004";i:277;s:8:"fa521bf6";i:278;s:8:"312e9e5e";i:279;s:8:"3acdb850";i:280;s:8:"485cbad7";i:281;s:8:"ddc2d365";i:282;s:8:"d8b87c13";i:283;s:8:"51f6aa7a";i:284;s:8:"b1c231ce";i:285;s:8:"926b9e57";i:286;s:8:"32bd5241";i:287;s:8:"b72cf0a0";i:288;s:8:"0cd99f51";i:289;s:8:"80815c0e";i:290;s:8:"a3459115";i:291;s:8:"5bb05439";i:292;s:8:"ee67a282";i:293;s:8:"65e533c5";i:294;s:8:"62e57b7a";i:295;s:8:"0f4a42fe";i:296;s:8:"ff5b8045";i:297;s:8:"cb9d60cf";i:298;s:8:"ffc891cd";i:299;s:8:"514d6027";i:300;s:8:"5b92df3b";i:301;s:8:"1fb47b1a";i:302;s:8:"a2382db8";i:303;s:8:"6f8b23cd";i:304;s:8:"db72737a";i:305;s:8:"d2d5022b";i:306;s:8:"eef762a7";i:307;s:8:"771fc2ed";i:308;s:8:"6581afb1";i:309;s:8:"64d7ffbd";i:310;s:8:"93a15a65";i:311;s:8:"fdc8b81b";i:312;s:8:"6369357b";i:313;s:8:"a8a58d2e";i:314;s:8:"d9ab2ed6";i:315;s:8:"0465340d";i:316;s:8:"eed4e3f1";i:317;s:8:"7e15ef9d";i:318;s:8:"99444e57";i:319;s:8:"959a6881";i:320;s:8:"e7498e10";i:321;s:8:"d7d0699e";i:322;s:8:"12372566";i:323;s:8:"b9f97c89";i:324;s:8:"5e688172";i:325;s:8:"8105e3b8";i:326;s:8:"627e9227";i:327;s:8:"67edb47d";i:328;s:8:"74e69d5f";i:329;s:8:"b8c5df2c";i:330;s:8:"14f06e80";i:331;s:8:"1a0af27f";i:332;s:8:"fa6ad68b";i:333;s:8:"d5938b0d";i:334;s:8:"2df9b8cc";i:335;s:8:"d90bd16c";i:336;s:8:"18779d24";i:337;s:8:"e1b81866";i:338;s:8:"dc51e106";i:339;s:8:"5078c0ce";i:340;s:8:"8fde3be3";i:341;s:8:"85939b08";i:342;s:8:"50f5565d";i:343;s:8:"281ec5f0";i:344;s:8:"ee2c4dfb";i:345;s:8:"89df2863";i:346;s:8:"0444ef85";i:347;s:8:"d52671b6";i:348;s:8:"84695c5d";i:349;s:8:"ceb19fc9";i:350;s:8:"8cd19595";i:351;s:8:"9773504b";i:352;s:8:"72031351";i:353;s:8:"285de56c";i:354;s:8:"08d949a1";i:355;s:8:"d1d24d60";i:356;s:8:"41c57eff";i:357;s:8:"ded22dfc";i:358;s:8:"9f799eb2";i:359;s:8:"ac14c164";i:360;s:8:"23ab3dac";i:361;s:8:"76de10e0";i:362;s:8:"72c2ac0b";i:363;s:8:"cce93127";i:364;s:8:"32bbb7e5";i:365;s:8:"b8af671a";i:366;s:8:"24dfc65a";i:367;s:8:"d7c8431f";i:368;s:8:"5cf3dffd";i:369;s:8:"7a93645c";i:370;s:8:"36bb66f8";i:371;s:8:"dc055709";i:372;s:8:"93c58efc";i:373;s:8:"11b9a1e6";i:374;s:8:"e487f36b";i:375;s:8:"7c3bcb46";i:376;s:8:"e4d724a3";i:377;s:8:"b732d653";i:378;s:8:"afc9c219";i:379;s:8:"ea658830";i:380;s:8:"b9052af6";i:381;s:8:"aa46a473";i:382;s:8:"1b37a35e";i:383;s:8:"0ba14ee9";i:384;s:8:"c7e150ac";i:385;s:8:"055ffa96";i:386;s:8:"e2bf88fb";i:387;s:8:"88f1f936";i:388;s:8:"488c7bdb";i:389;s:8:"a9dacbd1";i:390;s:8:"aaeea26f";i:391;s:8:"237af1cb";i:392;s:8:"e3dbdb50";i:393;s:8:"c8e5949e";i:394;s:8:"e70a989a";i:395;s:8:"fa540d6d";i:396;s:8:"f055b2f2";i:397;s:8:"1fc8acd4";i:398;s:8:"accb1a9b";i:399;s:8:"bedfb89c";i:400;s:8:"3d243ec0";i:401;s:8:"d2f3f2d8";i:402;s:8:"d83e7c53";i:403;s:8:"4f12e12d";i:404;s:8:"f48f33d1";i:405;s:8:"9555d943";i:406;s:8:"db853a55";i:407;s:8:"506a95b4";i:408;s:8:"408155d1";i:409;s:8:"32a384a0";i:410;s:8:"21c34eb4";i:411;s:8:"93e2e1ae";i:412;s:8:"88582a10";i:413;s:8:"1f065648";i:414;s:8:"96c3c81b";i:415;s:8:"412bc358";i:416;s:8:"11a4e990";i:417;s:8:"805ead73";i:418;s:8:"ec8ca56e";i:419;s:8:"a2ed4bdc";i:420;s:8:"ac408a10";i:421;s:8:"4ca98f96";i:422;s:8:"0686b6df";i:423;s:8:"9e9f7ae4";i:424;s:8:"07d5f658";i:425;s:8:"1c121a0c";i:426;s:8:"c11c8e82";i:427;s:8:"13f2c6d7";i:428;s:8:"e9f6ad9c";i:429;s:8:"bc1dc285";i:430;s:8:"e271fe4b";i:431;s:8:"34114ee5";i:432;s:8:"92ad1c39";i:433;s:8:"5ab5504b";i:434;s:8:"4f7118a7";i:435;s:8:"d1ceec2f";i:436;s:8:"adfd7622";i:437;s:8:"f4f4a9c0";i:438;s:8:"2d4f21e3";i:439;s:8:"3b4bed9e";i:440;s:8:"42ac5810";i:441;s:8:"7eae8db5";i:442;s:8:"09dc329e";i:443;s:8:"3c723314";i:444;s:8:"7fb50c08";i:445;s:8:"71fd69dd";i:446;s:8:"013ce542";i:447;s:8:"0add0d73";i:448;s:8:"465d495a";i:449;s:8:"9f8ddb9d";i:450;s:8:"f293e79e";i:451;s:8:"d6f59d72";i:452;s:8:"ac22e38f";i:453;s:8:"e96d5751";i:454;s:8:"fba79717";i:455;s:8:"39fedf2f";i:456;s:8:"3fb25196";i:457;s:8:"fcdaa825";i:458;s:8:"9a960022";i:459;s:8:"5371af3d";i:460;s:8:"df7faf0a";i:461;s:8:"82c22c85";i:462;s:8:"dfbbae9f";i:463;s:8:"403a4b84";i:464;s:8:"bc938282";i:465;s:8:"d2355fbc";i:466;s:8:"8d72b179";i:467;s:8:"dced02b2";i:468;s:8:"227b82e3";i:469;s:8:"24c60db6";i:470;s:8:"45092b73";i:471;s:8:"767c0e1d";i:472;s:8:"7eb5c592";i:473;s:8:"d0b356d9";i:474;s:8:"dc95ee45";i:475;s:8:"39aa5820";i:476;s:8:"9e6e1868";i:477;s:8:"ffe72d78";i:478;s:8:"82ae0503";i:479;s:8:"2ea981ad";i:480;s:8:"6935faba";i:481;s:8:"69c2ba98";i:482;s:8:"69dd219f";i:483;s:8:"860e0d0d";i:484;s:8:"5f451aa3";i:485;s:8:"a9d5f07d";i:486;s:8:"ec623682";i:487;s:8:"04d8adba";i:488;s:8:"717e8c76";i:489;s:8:"f9c1fb75";i:490;s:8:"ab4c9e06";i:491;s:8:"3895ef4d";i:492;s:8:"37c09060";i:493;s:8:"f3b7c652";i:494;s:8:"74dc421e";i:495;s:8:"97d458be";i:496;s:8:"1a1ddea1";i:497;s:8:"001c68ad";i:498;s:8:"680f033f";i:499;s:8:"b2e9bd38";i:500;s:8:"54192958";i:501;s:8:"b6dd0693";i:502;s:8:"9d149906";i:503;s:8:"9ba5479a";i:504;s:8:"18ba25e8";i:505;s:8:"16fa3e51";i:506;s:8:"1e74b698";i:507;s:8:"c5932028";i:508;s:8:"5a6cf6cd";i:509;s:8:"6fa90e13";i:510;s:8:"bcabdecb";i:511;s:8:"ae23af9a";i:512;s:8:"76b297eb";i:513;s:8:"d1332632";i:514;s:8:"693a55c3";i:515;s:8:"7c4beb9b";i:516;s:8:"409a0a15";i:517;s:8:"60f68335";i:518;s:8:"febcb934";i:519;s:8:"f32c6f8c";i:520;s:8:"aacacf0d";i:521;s:8:"d1f56e99";i:522;s:8:"d65bcf00";i:523;s:8:"361c9633";i:524;s:8:"cd34d7f4";i:525;s:8:"37d38e62";i:526;s:8:"942dee9d";i:527;s:8:"f41c9445";i:528;s:8:"7e9a8b5d";i:529;s:8:"4b941ed7";i:530;s:8:"c6256dce";i:531;s:8:"6c285146";i:532;s:8:"5920147e";i:533;s:8:"934d59ed";i:534;s:8:"5f400a1d";i:535;s:8:"1a5de58c";i:536;s:8:"11e601de";i:537;s:8:"cf4da287";i:538;s:8:"756a54e4";i:539;s:8:"9f2b1015";i:540;s:8:"3a3df642";i:541;s:8:"5d024d64";i:542;s:8:"2d617393";i:543;s:8:"e1b4ec53";i:544;s:8:"24996b5e";i:545;s:8:"7a271bf1";i:546;s:8:"68d7da60";i:547;s:8:"06d3bc73";i:548;s:8:"f21095f7";i:549;s:8:"93e6bfd9";i:550;s:8:"e80b015b";i:551;s:8:"4ddd4ede";i:552;s:8:"cec3d813";i:553;s:8:"281f2a65";i:554;s:8:"ffa068fb";i:555;s:8:"60e712e7";i:556;s:8:"4abcecac";i:557;s:8:"eef01060";i:558;s:8:"8e79e897";i:559;s:8:"b0cd39fe";i:560;s:8:"28cc9604";i:561;s:8:"c7bd58e0";i:562;s:8:"c73b1765";i:563;s:8:"e87d5e07";i:564;s:8:"03b7710d";i:565;s:8:"5f64c5dc";i:566;s:8:"4ae7b6f1";i:567;s:8:"401b9876";i:568;s:8:"9a162522";i:569;s:8:"2a1d6390";i:570;s:8:"c115eeff";i:571;s:8:"e549f7df";i:572;s:8:"a159c579";i:573;s:8:"48a44ff6";i:574;s:8:"e65fd1fc";i:575;s:8:"bb74cd7b";i:576;s:8:"87cc0383";i:577;s:8:"052755ee";i:578;s:8:"eba29b21";i:579;s:8:"88e2efa9";i:580;s:8:"a1a521b9";i:581;s:8:"ffb6f27b";i:582;s:8:"4fea3248";i:583;s:8:"0f46ad03";i:584;s:8:"58902f76";i:585;s:8:"cfb3f87e";i:586;s:8:"efb3d85c";i:587;s:8:"1e0f4648";i:588;s:8:"f95eda47";i:589;s:8:"c5220b0b";i:590;s:8:"e6574ef8";i:591;s:8:"f34b162e";i:592;s:8:"09b08b14";i:593;s:8:"dae53353";i:594;s:8:"ccc600dd";i:595;s:8:"b3ae8f4f";i:596;s:8:"daed379c";i:597;s:8:"113f5973";i:598;s:8:"6a66bb0a";i:599;s:8:"697817f3";i:600;s:8:"00b78167";i:601;s:8:"1e7c2ed9";i:602;s:8:"65f8a3c5";i:603;s:8:"c50f5c14";i:604;s:8:"a1665ca7";i:605;s:8:"d31c5017";i:606;s:8:"2e421193";i:607;s:8:"cb8d29a9";i:608;s:8:"fa9723b5";i:609;s:8:"8a4d18e4";i:610;s:8:"88081a19";i:611;s:8:"242623e4";i:612;s:8:"86202155";i:613;s:8:"ab55982f";i:614;s:8:"f1a3c261";i:615;s:8:"c44eaa91";i:616;s:8:"06c4716f";i:617;s:8:"60a25216";i:618;s:8:"dcce86a3";i:619;s:8:"bfcec0cd";i:620;s:8:"fb4170ed";i:621;s:8:"9bf5e563";i:622;s:8:"04fa51af";i:623;s:8:"dd86eeb1";i:624;i:0;i:625;i:2;}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo PHP_EOL, PHP_EOL; @@ -38,14 +38,14 @@ echo \Random\Engine\PcgOneseq128XslRr64::class, PHP_EOL; try { var_dump(unserialize('O:33:"Random\Engine\PcgOneseq128XslRr64":2:{i:0;a:0:{}i:1;a:2:{i:0;s:15:"c6d571c37c41a8d";i:1;s:16:"345e7e82265d6e27";}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } // invalid hex try { var_dump(unserialize('O:33:"Random\Engine\PcgOneseq128XslRr64":2:{i:0;a:0:{}i:1;a:2:{i:0;s:16:"c6d571c37c41a8d1";i:1;s:16:"345e7e82265d6e2g";}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo PHP_EOL, PHP_EOL; @@ -54,46 +54,46 @@ echo \Random\Engine\Xoshiro256StarStar::class, PHP_EOL; try { var_dump(unserialize('O:32:"Random\Engine\Xoshiro256StarStar":2:{i:0;a:0:{}i:1;a:4:{i:0;s:15:"db1c182f1bf60cb";i:1;s:16:"2465f04d36a1c797";i:2;s:16:"da25c09be4fabe33";i:3;s:16:"33a0d052f241624e";}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } // invalid hex try { var_dump(unserialize('O:32:"Random\Engine\Xoshiro256StarStar":2:{i:0;a:0:{}i:1;a:4:{i:0;s:16:"db1c182f1bf60cbb";i:1;s:16:"2465f04d36a1c797";i:2;s:16:"da25c09be4fabe33";i:3;s:16:"33a0d052f241624g";}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } // additional array values (1) try { var_dump(unserialize('O:32:"Random\Engine\Xoshiro256StarStar":3:{i:0;a:0:{}i:1;a:4:{i:0;s:16:"db1c182f1bf60cbb";i:1;s:16:"2465f04d36a1c797";i:2;s:16:"da25c09be4fabe33";i:3;s:16:"33a0d052f241624e";}i:2;N;}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } // additional array values (2) try { var_dump(unserialize('O:32:"Random\Engine\Xoshiro256StarStar":2:{i:0;a:0:{}i:1;a:5:{i:0;s:16:"db1c182f1bf60cbb";i:1;s:16:"2465f04d36a1c797";i:2;s:16:"da25c09be4fabe33";i:3;s:16:"33a0d052f241624e";i:4;N;}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- Random\Engine\Mt19937 -Invalid serialization data for Random\Engine\Mt19937 object -Invalid serialization data for Random\Engine\Mt19937 object -Invalid serialization data for Random\Engine\Mt19937 object -Invalid serialization data for Random\Engine\Mt19937 object +Exception: Invalid serialization data for Random\Engine\Mt19937 object +Exception: Invalid serialization data for Random\Engine\Mt19937 object +Exception: Invalid serialization data for Random\Engine\Mt19937 object +Exception: Invalid serialization data for Random\Engine\Mt19937 object Random\Engine\PcgOneseq128XslRr64 -Invalid serialization data for Random\Engine\PcgOneseq128XslRr64 object -Invalid serialization data for Random\Engine\PcgOneseq128XslRr64 object +Exception: Invalid serialization data for Random\Engine\PcgOneseq128XslRr64 object +Exception: Invalid serialization data for Random\Engine\PcgOneseq128XslRr64 object Random\Engine\Xoshiro256StarStar -Invalid serialization data for Random\Engine\Xoshiro256StarStar object -Invalid serialization data for Random\Engine\Xoshiro256StarStar object -Invalid serialization data for Random\Engine\Xoshiro256StarStar object -Invalid serialization data for Random\Engine\Xoshiro256StarStar object +Exception: Invalid serialization data for Random\Engine\Xoshiro256StarStar object +Exception: Invalid serialization data for Random\Engine\Xoshiro256StarStar object +Exception: Invalid serialization data for Random\Engine\Xoshiro256StarStar object +Exception: Invalid serialization data for Random\Engine\Xoshiro256StarStar object diff --git a/ext/random/tests/02_engine/mt19937_error.phpt b/ext/random/tests/02_engine/mt19937_error.phpt index dcbc21aa6bed..adbbe63c27ad 100644 --- a/ext/random/tests/02_engine/mt19937_error.phpt +++ b/ext/random/tests/02_engine/mt19937_error.phpt @@ -8,9 +8,9 @@ use Random\Engine\Mt19937; try { new Mt19937(1234, 2); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Random\Engine\Mt19937::__construct(): Argument #2 ($mode) must be either MT_RAND_MT19937 or MT_RAND_PHP +ValueError: Random\Engine\Mt19937::__construct(): Argument #2 ($mode) must be either MT_RAND_MT19937 or MT_RAND_PHP diff --git a/ext/random/tests/02_engine/pcgoneseq128xslrr64_jump_error.phpt b/ext/random/tests/02_engine/pcgoneseq128xslrr64_jump_error.phpt index cbc6e370b173..e8815d272a89 100644 --- a/ext/random/tests/02_engine/pcgoneseq128xslrr64_jump_error.phpt +++ b/ext/random/tests/02_engine/pcgoneseq128xslrr64_jump_error.phpt @@ -11,7 +11,7 @@ $referenceEngine = new PcgOneseq128XslRr64(1234); try { $engine->jump(-1); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } for ($i = 0; $i < 10_000; $i++) { @@ -24,5 +24,5 @@ die('success'); ?> --EXPECT-- -Random\Engine\PcgOneseq128XslRr64::jump(): Argument #1 ($advance) must be greater than or equal to 0 +ValueError: Random\Engine\PcgOneseq128XslRr64::jump(): Argument #1 ($advance) must be greater than or equal to 0 success diff --git a/ext/random/tests/02_engine/pcgoneseq128xslrr64_seed.phpt b/ext/random/tests/02_engine/pcgoneseq128xslrr64_seed.phpt index b31177fba017..9e790a162fed 100644 --- a/ext/random/tests/02_engine/pcgoneseq128xslrr64_seed.phpt +++ b/ext/random/tests/02_engine/pcgoneseq128xslrr64_seed.phpt @@ -17,7 +17,7 @@ echo "Invalid data type", PHP_EOL; try { $engine = new PcgOneseq128XslRr64(1.0); } catch (TypeError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo PHP_EOL, PHP_EOL; @@ -25,7 +25,7 @@ echo "Invalid string seed length", PHP_EOL; try { $engine = new PcgOneseq128XslRr64('foobar'); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo PHP_EOL, PHP_EOL; @@ -49,11 +49,11 @@ Random string seed Invalid data type -Random\Engine\PcgOneseq128XslRr64::__construct(): Argument #1 ($seed) must be of type string|int|null, float given +TypeError: Random\Engine\PcgOneseq128XslRr64::__construct(): Argument #1 ($seed) must be of type string|int|null, float given Invalid string seed length -Random\Engine\PcgOneseq128XslRr64::__construct(): Argument #1 ($seed) must be a 16 byte (128 bit) string +ValueError: Random\Engine\PcgOneseq128XslRr64::__construct(): Argument #1 ($seed) must be a 16 byte (128 bit) string Valid string seed diff --git a/ext/random/tests/02_engine/xoshiro256starstar_seed.phpt b/ext/random/tests/02_engine/xoshiro256starstar_seed.phpt index ec31c358fd68..ded9a01734d5 100644 --- a/ext/random/tests/02_engine/xoshiro256starstar_seed.phpt +++ b/ext/random/tests/02_engine/xoshiro256starstar_seed.phpt @@ -17,7 +17,7 @@ echo "Invalid data type", PHP_EOL; try { $engine = new Xoshiro256StarStar(1.0); } catch (Throwable $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo PHP_EOL, PHP_EOL; @@ -25,7 +25,7 @@ echo "Invalid string seed length", PHP_EOL; try { $engine = new Xoshiro256StarStar('foobar'); } catch (Throwable $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo PHP_EOL, PHP_EOL; @@ -33,7 +33,7 @@ echo "Null seed", PHP_EOL; try { $engine = new Xoshiro256StarStar(str_repeat("\x00", 32)); } catch (Throwable $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo PHP_EOL, PHP_EOL; @@ -57,15 +57,15 @@ Random string seed Invalid data type -Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be of type string|int|null, float given +TypeError: Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be of type string|int|null, float given Invalid string seed length -Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be a 32 byte (256 bit) string +ValueError: Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be a 32 byte (256 bit) string Null seed -Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must not consist entirely of NUL bytes +ValueError: Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must not consist entirely of NUL bytes Valid string seed diff --git a/ext/random/tests/02_engine/xoshiro256starstar_unserialize_zero_state.phpt b/ext/random/tests/02_engine/xoshiro256starstar_unserialize_zero_state.phpt index 6ebcd03e8570..22e7ccc737f7 100644 --- a/ext/random/tests/02_engine/xoshiro256starstar_unserialize_zero_state.phpt +++ b/ext/random/tests/02_engine/xoshiro256starstar_unserialize_zero_state.phpt @@ -6,9 +6,9 @@ GH-21731: Xoshiro256StarStar::__unserialize() must reject the all-zero state try { var_dump(unserialize('O:32:"Random\Engine\Xoshiro256StarStar":2:{i:0;a:0:{}i:1;a:4:{i:0;s:16:"0000000000000000";i:1;s:16:"0000000000000000";i:2;s:16:"0000000000000000";i:3;s:16:"0000000000000000";}}')); } catch (\Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Invalid serialization data for Random\Engine\Xoshiro256StarStar object +Exception: Invalid serialization data for Random\Engine\Xoshiro256StarStar object diff --git a/ext/random/tests/03_randomizer/construct_twice.phpt b/ext/random/tests/03_randomizer/construct_twice.phpt index 7128338ade97..ae06a09a403e 100644 --- a/ext/random/tests/03_randomizer/construct_twice.phpt +++ b/ext/random/tests/03_randomizer/construct_twice.phpt @@ -14,28 +14,28 @@ require __DIR__ . "/../engines.inc"; try { (new Randomizer())->__construct(); } catch (Error $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $randomizer = new Randomizer(new Xoshiro256StarStar()); $randomizer->__construct(new PcgOneseq128XslRr64()); } catch (Error $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $randomizer = new Randomizer(new TestShaEngine("1234")); $randomizer->__construct(new TestShaEngine("1234")); } catch (Error $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $randomizer = new Randomizer(new Xoshiro256StarStar()); $randomizer->__construct(new TestShaEngine("1234")); } catch (Error $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($randomizer->engine::class); @@ -44,9 +44,9 @@ die('success'); ?> --EXPECT-- -Cannot modify readonly property Random\Randomizer::$engine -Cannot modify readonly property Random\Randomizer::$engine -Cannot modify readonly property Random\Randomizer::$engine -Cannot modify readonly property Random\Randomizer::$engine +Error: Cannot modify readonly property Random\Randomizer::$engine +Error: Cannot modify readonly property Random\Randomizer::$engine +Error: Cannot modify readonly property Random\Randomizer::$engine +Error: Cannot modify readonly property Random\Randomizer::$engine string(32) "Random\Engine\Xoshiro256StarStar" success diff --git a/ext/random/tests/03_randomizer/engine_unsafe_biased.phpt b/ext/random/tests/03_randomizer/engine_unsafe_biased.phpt index 2cfe68a46789..e8d6e69768b2 100644 --- a/ext/random/tests/03_randomizer/engine_unsafe_biased.phpt +++ b/ext/random/tests/03_randomizer/engine_unsafe_biased.phpt @@ -22,65 +22,65 @@ function randomizer(): Randomizer try { var_dump(randomizer()->getInt(0, 1234)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->nextInt()); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(bin2hex(randomizer()->getBytes(1))); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->shuffleArray(range(1, 1234))); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 1234), 1)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 1234), 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->shuffleBytes('foobar')); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getBytesFromString('123', 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getBytesFromString(str_repeat('a', 500), 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts int(%d) string(2) "ff" -Failed to generate an acceptable random number in 50 attempts -Failed to generate an acceptable random number in 50 attempts -Failed to generate an acceptable random number in 50 attempts -Failed to generate an acceptable random number in 50 attempts -Failed to generate an acceptable random number in 50 attempts -Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts diff --git a/ext/random/tests/03_randomizer/engine_unsafe_empty_string.phpt b/ext/random/tests/03_randomizer/engine_unsafe_empty_string.phpt index fe402b82b57b..e0ff0a14f52c 100644 --- a/ext/random/tests/03_randomizer/engine_unsafe_empty_string.phpt +++ b/ext/random/tests/03_randomizer/engine_unsafe_empty_string.phpt @@ -23,65 +23,65 @@ function randomizer(): Randomizer try { var_dump(randomizer()->getInt(0, 1234)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->nextInt()); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(bin2hex(randomizer()->getBytes(1))); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->shuffleArray(range(1, 1234))); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 1234), 1)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 1234), 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->shuffleBytes('foobar')); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getBytesFromString('123', 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getBytesFromString(str_repeat('a', 500), 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -A random engine must return a non-empty string -A random engine must return a non-empty string -A random engine must return a non-empty string -A random engine must return a non-empty string -A random engine must return a non-empty string -A random engine must return a non-empty string -A random engine must return a non-empty string -A random engine must return a non-empty string -A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string +Random\BrokenRandomEngineError: A random engine must return a non-empty string diff --git a/ext/random/tests/03_randomizer/engine_unsafe_nul.phpt b/ext/random/tests/03_randomizer/engine_unsafe_nul.phpt index ff53b83b207a..9f6f1b76bfa6 100644 --- a/ext/random/tests/03_randomizer/engine_unsafe_nul.phpt +++ b/ext/random/tests/03_randomizer/engine_unsafe_nul.phpt @@ -22,55 +22,55 @@ function randomizer(): Randomizer try { var_dump(randomizer()->getInt(0, 1234)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->nextInt()); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(bin2hex(randomizer()->getBytes(1))); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->shuffleArray(range(1, 123))); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 123), 1)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 123), 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->shuffleBytes('foobar')); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getBytesFromString('123', 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getBytesFromString(str_repeat('a', 500), 10)); } catch (Random\BrokenRandomEngineError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -330,7 +330,7 @@ array(1) { [0]=> int(0) } -Failed to generate an acceptable random number in 50 attempts +Random\BrokenRandomEngineError: Failed to generate an acceptable random number in 50 attempts string(6) "oobarf" string(10) "1111111111" string(10) "aaaaaaaaaa" diff --git a/ext/random/tests/03_randomizer/gh_19765_unserialize.phpt b/ext/random/tests/03_randomizer/gh_19765_unserialize.phpt index 24abfca293fc..e023632cadd4 100644 --- a/ext/random/tests/03_randomizer/gh_19765_unserialize.phpt +++ b/ext/random/tests/03_randomizer/gh_19765_unserialize.phpt @@ -11,11 +11,11 @@ try { $r = new Randomizer(new Mt19937()); $r->__unserialize([['engine' => new PcgOneseq128XslRr64()]]); } catch (Exception $error) { - echo $error->getMessage() . "\n"; + echo $error::class, ': ', $error->getMessage(), PHP_EOL; } var_dump($r->engine::class); ?> --EXPECT-- -Invalid serialization data for Random\Randomizer object +Exception: Invalid serialization data for Random\Randomizer object string(21) "Random\Engine\Mt19937" diff --git a/ext/random/tests/03_randomizer/gh_9186_unserialize.phpt b/ext/random/tests/03_randomizer/gh_9186_unserialize.phpt index edadb7380bd1..9a430282abd6 100644 --- a/ext/random/tests/03_randomizer/gh_9186_unserialize.phpt +++ b/ext/random/tests/03_randomizer/gh_9186_unserialize.phpt @@ -6,9 +6,9 @@ GH-9186: @strict-properties can be bypassed using unserialization try { unserialize('O:17:"Random\Randomizer":1:{i:0;a:2:{s:3:"foo";N;s:6:"engine";O:32:"Random\Engine\Xoshiro256StarStar":2:{i:0;a:0:{}i:1;a:4:{i:0;s:16:"7520fbc2d6f8de46";i:1;s:16:"84d2d2b9d7ba0a34";i:2;s:16:"d975f36db6490b32";i:3;s:16:"c19991ee16785b94";}}}}'); } catch (Exception $error) { - echo $error->getMessage() . "\n"; + echo $error::class, ': ', $error->getMessage(), PHP_EOL; } ?> --EXPECT-- -Invalid serialization data for Random\Randomizer object +Exception: Invalid serialization data for Random\Randomizer object diff --git a/ext/random/tests/03_randomizer/methods/getBytesFromString_error.phpt b/ext/random/tests/03_randomizer/methods/getBytesFromString_error.phpt index 29c845353630..05439f3cb384 100644 --- a/ext/random/tests/03_randomizer/methods/getBytesFromString_error.phpt +++ b/ext/random/tests/03_randomizer/methods/getBytesFromString_error.phpt @@ -13,16 +13,16 @@ function randomizer(): Randomizer try { var_dump(randomizer()->getBytesFromString("", 2)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getBytesFromString("abc", 0)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -Random\Randomizer::getBytesFromString(): Argument #1 ($string) must not be empty -Random\Randomizer::getBytesFromString(): Argument #2 ($length) must be greater than 0 +ValueError: Random\Randomizer::getBytesFromString(): Argument #1 ($string) must not be empty +ValueError: Random\Randomizer::getBytesFromString(): Argument #2 ($length) must be greater than 0 diff --git a/ext/random/tests/03_randomizer/methods/getFloat_error.phpt b/ext/random/tests/03_randomizer/methods/getFloat_error.phpt index 42e933cbefb2..68bfd262e38b 100644 --- a/ext/random/tests/03_randomizer/methods/getFloat_error.phpt +++ b/ext/random/tests/03_randomizer/methods/getFloat_error.phpt @@ -22,109 +22,109 @@ foreach ([ try { var_dump(randomizer()->getFloat(NAN, 0.0, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getFloat(INF, 0.0, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getFloat(-INF, 0.0, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getFloat(0.0, NAN, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getFloat(0.0, INF, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getFloat(0.0, -INF, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getFloat(0.0, -0.1, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->getFloat(0.0, 0.0, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { // Both values round to the same float. var_dump(randomizer()->getFloat(100_000_000_000_000_000.0, 100_000_000_000_000_000.1, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { // There is no float between the two parameters, thus making the OpenOpen interval empty. var_dump(randomizer()->getFloat(1.0, 1 + PHP_FLOAT_EPSILON, $boundary)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } } ?> --EXPECTF-- ClosedClosed -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) float(0) float(1.0E+17) float(%f) ClosedOpen -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) float(1) OpenClosed -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) float(1.0000000000000002) OpenOpen -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #1 ($min) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be finite -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) -Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) -The given interval is empty, there are no floats between argument #1 ($min) and argument #2 ($max) +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #1 ($min) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be finite +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: Random\Randomizer::getFloat(): Argument #2 ($max) must be greater than argument #1 ($min) +ValueError: The given interval is empty, there are no floats between argument #1 ($min) and argument #2 ($max) diff --git a/ext/random/tests/03_randomizer/methods/pickArrayKeys_error.phpt b/ext/random/tests/03_randomizer/methods/pickArrayKeys_error.phpt index cbd0495676c1..1d058813276e 100644 --- a/ext/random/tests/03_randomizer/methods/pickArrayKeys_error.phpt +++ b/ext/random/tests/03_randomizer/methods/pickArrayKeys_error.phpt @@ -13,37 +13,37 @@ function randomizer(): Randomizer try { var_dump(randomizer()->pickArrayKeys("foo", 2)); } catch (TypeError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys([], 0)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 3), 0)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 3), -1)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { var_dump(randomizer()->pickArrayKeys(range(1, 3), 10)); } catch (ValueError $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- -Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must be of type array, string given -Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must not be empty -Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) -Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) -Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) +TypeError: Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must be of type array, string given +ValueError: Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must not be empty +ValueError: Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) +ValueError: Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) +ValueError: Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements in argument #1 ($array) diff --git a/ext/random/tests/03_randomizer/readonly.phpt b/ext/random/tests/03_randomizer/readonly.phpt index f5cf7cc0dd5b..a8eb299b48fd 100644 --- a/ext/random/tests/03_randomizer/readonly.phpt +++ b/ext/random/tests/03_randomizer/readonly.phpt @@ -13,7 +13,7 @@ $referenceRandomizer = new Randomizer(new PcgOneseq128XslRr64(1234)); try { $randomizer->engine = new Xoshiro256StarStar(1234); } catch (Throwable $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } for ($i = 0; $i < 10_000; $i++) { @@ -26,5 +26,5 @@ die('success'); ?> --EXPECT-- -Cannot modify readonly property Random\Randomizer::$engine +Error: Cannot modify readonly property Random\Randomizer::$engine success diff --git a/ext/random/tests/03_randomizer/serialize_disallowed.phpt b/ext/random/tests/03_randomizer/serialize_disallowed.phpt index 06f8ea2cb09a..58ecd8f41da7 100644 --- a/ext/random/tests/03_randomizer/serialize_disallowed.phpt +++ b/ext/random/tests/03_randomizer/serialize_disallowed.phpt @@ -9,9 +9,9 @@ use Random\Randomizer; try { serialize(new Randomizer(new Secure())); } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Serialization of 'Random\Engine\Secure' is not allowed +Exception: Serialization of 'Random\Engine\Secure' is not allowed diff --git a/ext/uri/tests/004.phpt b/ext/uri/tests/004.phpt index d22f52f30c48..2054bed82645 100644 --- a/ext/uri/tests/004.phpt +++ b/ext/uri/tests/004.phpt @@ -11,7 +11,7 @@ var_dump(Uri\Rfc3986\Uri::parse("")); try { new Uri\WhatWg\Url(""); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump(Uri\WhatWg\Url::parse("")); @@ -60,7 +60,7 @@ object(Uri\Rfc3986\Uri)#%d (%d) { ["fragment"]=> NULL } -The specified URI is malformed (MissingSchemeNonRelativeUrl) +Uri\WhatWg\InvalidUrlException: The specified URI is malformed (MissingSchemeNonRelativeUrl) NULL object(Uri\Rfc3986\Uri)#%d (%d) { ["scheme"]=> diff --git a/ext/uri/tests/007.phpt b/ext/uri/tests/007.phpt index 54151f2dfcb1..6c3347b86d70 100644 --- a/ext/uri/tests/007.phpt +++ b/ext/uri/tests/007.phpt @@ -8,13 +8,13 @@ uri try { new Uri\Rfc3986\Uri("https://example.com:8080@username:password/path?q=r#fragment"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { new Uri\WhatWg\Url("https://example.com:8080@username:password/path?q=r#fragment"); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; var_dump($e->errors); } @@ -25,8 +25,8 @@ var_dump($failures); ?> --EXPECTF-- -The specified URI is malformed -The specified URI is malformed (PortInvalid) +Uri\InvalidUriException: The specified URI is malformed +Uri\WhatWg\InvalidUrlException: The specified URI is malformed (PortInvalid) array(%d) { [0]=> object(Uri\WhatWg\UrlValidationError)#%d (%d) { diff --git a/ext/uri/tests/015.phpt b/ext/uri/tests/015.phpt index cf6c09703d2e..f31046185306 100644 --- a/ext/uri/tests/015.phpt +++ b/ext/uri/tests/015.phpt @@ -10,17 +10,17 @@ try { $reflectionClass = new ReflectionClass(Uri\Rfc3986\Uri::class); $reflectionClass->newInstanceWithoutConstructor(); } catch (ReflectionException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $reflectionClass = new ReflectionClass(Uri\WhatWg\Url::class); $reflectionClass->newInstanceWithoutConstructor(); } catch (ReflectionException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Class Uri\Rfc3986\Uri is an internal class marked as final that cannot be instantiated without invoking its constructor -Class Uri\WhatWg\Url is an internal class marked as final that cannot be instantiated without invoking its constructor +ReflectionException: Class Uri\Rfc3986\Uri is an internal class marked as final that cannot be instantiated without invoking its constructor +ReflectionException: Class Uri\WhatWg\Url is an internal class marked as final that cannot be instantiated without invoking its constructor diff --git a/ext/uri/tests/023.phpt b/ext/uri/tests/023.phpt index d1b97eaa9ae5..39ad578e58e5 100644 --- a/ext/uri/tests/023.phpt +++ b/ext/uri/tests/023.phpt @@ -20,13 +20,13 @@ var_dump($uri3->getScheme()); try { $uri3->withScheme(""); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $uri3->withScheme("http%73"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $url1 = Uri\WhatWg\Url::parse("https://example.com"); @@ -38,13 +38,13 @@ var_dump($url2->getScheme()); try { $url2->withScheme(""); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $url2->withScheme("http%73"); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -55,9 +55,9 @@ string(4) "http" string(4) "http" NULL NULL -The specified scheme is malformed -The specified scheme is malformed +Uri\InvalidUriException: The specified scheme is malformed +Uri\InvalidUriException: The specified scheme is malformed string(5) "https" string(4) "http" -The specified scheme is malformed -The specified scheme is malformed +Uri\WhatWg\InvalidUrlException: The specified scheme is malformed +Uri\WhatWg\InvalidUrlException: The specified scheme is malformed diff --git a/ext/uri/tests/026.phpt b/ext/uri/tests/026.phpt index 2f50e41bb8c1..e51cabc3ea31 100644 --- a/ext/uri/tests/026.phpt +++ b/ext/uri/tests/026.phpt @@ -32,25 +32,25 @@ var_dump($uri6->getHost()); try { $uri3->withHost("test.com:8080"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $uri3->withHost("t%3As%2Ft.com"); // t:s/t.com } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $uri3->withHost("t:s/t.com"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $uri2->withHost(""); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $uri1 = Uri\Rfc3986\Uri::parse("ftp://user:pass@foo.com?query=abc#foo"); @@ -62,7 +62,7 @@ var_dump($uri2->getHost()); try { $uri1->withHost(null); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $url1 = Uri\WhatWg\Url::parse("https://example.com"); @@ -80,25 +80,25 @@ var_dump($url5->getAsciiHost()); try { $url3->withHost("test.com:8080"); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $url3->withHost("t%3As%2Ft.com"); // t:s/t.com } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $url3->withHost("t:s/t.com"); // t:s/t.com } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $url2->withHost(null); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $url1 = Uri\WhatWg\Url::parse("ftp://foo.com?query=abc#foo"); @@ -121,19 +121,19 @@ string(11) "192.168.0.1" string(11) "192.168.0.1" string(40) "[2001:db8:3333:4444:5555:6666:7777:8888]" string(40) "[2001:db8:3333:4444:5555:6666:7777:8888]" -The specified host is malformed -The specified host is malformed +Uri\InvalidUriException: The specified host is malformed +Uri\InvalidUriException: The specified host is malformed string(7) "foo.com" string(8) "test.com" -Cannot remove the host from a URI that has a userinfo +Uri\InvalidUriException: Cannot remove the host from a URI that has a userinfo string(11) "example.com" string(8) "test.com" string(8) "test.com" string(11) "192.168.0.1" string(40) "[2001:db8:3333:4444:5555:6666:7777:8888]" -The specified host is malformed -The specified host is malformed (DomainInvalidCodePoint) -The specified host is malformed -The specified host is malformed (HostMissing) +Uri\WhatWg\InvalidUrlException: The specified host is malformed +Uri\WhatWg\InvalidUrlException: The specified host is malformed (DomainInvalidCodePoint) +Uri\WhatWg\InvalidUrlException: The specified host is malformed +Uri\WhatWg\InvalidUrlException: The specified host is malformed (HostMissing) string(7) "foo.com" string(8) "test.com" diff --git a/ext/uri/tests/026_userinfo.phpt b/ext/uri/tests/026_userinfo.phpt index 75f54fccf612..1474ef82926d 100644 --- a/ext/uri/tests/026_userinfo.phpt +++ b/ext/uri/tests/026_userinfo.phpt @@ -28,7 +28,7 @@ var_dump($uri2->getPort()); try { $uri4->withUserInfo("u:s/r"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $uri5 = Uri\Rfc3986\Uri::parse("file:///foo/bar/"); @@ -48,6 +48,6 @@ NULL string(13) "%75s%2Fr:pass" string(11) "us%2Fr:pass" NULL -The specified userinfo is malformed +Uri\InvalidUriException: The specified userinfo is malformed NULL string(9) "user:pass" diff --git a/ext/uri/tests/027.phpt b/ext/uri/tests/027.phpt index 781932f5889e..fbfdadf10085 100644 --- a/ext/uri/tests/027.phpt +++ b/ext/uri/tests/027.phpt @@ -32,7 +32,7 @@ var_dump($uri2->getPort()); try { $uri1->withPort(1); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $url1 = Uri\WhatWg\Url::parse("https://example.com:8080"); @@ -65,7 +65,7 @@ int(8080) NULL int(80) NULL -Cannot set a port without having a host +Uri\InvalidUriException: Cannot set a port without having a host int(8080) int(22) NULL diff --git a/ext/uri/tests/028.phpt b/ext/uri/tests/028.phpt index 9c9c92c00cc0..a071812feaef 100644 --- a/ext/uri/tests/028.phpt +++ b/ext/uri/tests/028.phpt @@ -28,13 +28,13 @@ var_dump($uri5->getPath()); try { $uri5->withPath("test"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $uri5->withPath("/#"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $uri1 = Uri\Rfc3986\Uri::parse("/foo"); @@ -75,8 +75,8 @@ string(10) "/foo%2Fbar" string(10) "/foo%2Fbar" string(0) "" string(0) "" -The specified path is malformed -The specified path is malformed +Uri\InvalidUriException: The specified path is malformed +Uri\InvalidUriException: The specified path is malformed string(4) "/foo" string(3) "bar" string(9) "/foo/bar/" diff --git a/ext/uri/tests/029.phpt b/ext/uri/tests/029.phpt index f7a1a0989910..b965a9fc7427 100644 --- a/ext/uri/tests/029.phpt +++ b/ext/uri/tests/029.phpt @@ -40,7 +40,7 @@ var_dump($uri5->getQuery()); try { $uri5->withQuery("#"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $url1 = Uri\WhatWg\Url::parse("https://example.com?foo=bar"); @@ -83,7 +83,7 @@ string(6) "t%65st" string(4) "test" string(25) "foo=foo%26bar&baz=/qux%3D" string(25) "foo=foo%26bar&baz=/qux%3D" -The specified query is malformed +Uri\InvalidUriException: The specified query is malformed string(7) "foo=bar" string(7) "foo=baz" NULL diff --git a/ext/uri/tests/030.phpt b/ext/uri/tests/030.phpt index 92e99d01f892..f232143f3ad3 100644 --- a/ext/uri/tests/030.phpt +++ b/ext/uri/tests/030.phpt @@ -20,13 +20,13 @@ var_dump($uri3->getFragment()); try { $uri3->withFragment(" "); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $uri1->withFragment("#fragment2"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $uri1 = Uri\Rfc3986\Uri::parse("https://example.com?abc=def"); @@ -59,8 +59,8 @@ string(9) "fragment2" string(9) "fragment2" NULL NULL -The specified fragment is malformed -The specified fragment is malformed +Uri\InvalidUriException: The specified fragment is malformed +Uri\InvalidUriException: The specified fragment is malformed NULL string(8) "fragment" string(9) "fragment1" diff --git a/ext/uri/tests/031.phpt b/ext/uri/tests/031.phpt index a761cf8a4d99..b1d41fac763a 100644 --- a/ext/uri/tests/031.phpt +++ b/ext/uri/tests/031.phpt @@ -15,49 +15,49 @@ var_dump($uri2); try { unserialize('O:15:"Uri\Rfc3986\Uri":1:{i:0;a:0:{}}'); // less than 2 items } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:15:"Uri\Rfc3986\Uri":3:{i:0;a:0:{}i:1;a:0:{}i:2;a:0:{}}'); // more than 2 items } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:15:"Uri\Rfc3986\Uri":2:{i:0;N;i:1;a:0:{}}'); // first item is not an array } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:15:"Uri\Rfc3986\Uri":2:{i:0;a:0:{}i:1;a:0:{}}'); // first array is empty } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:15:"Uri\Rfc3986\Uri":2:{i:0;a:1:{s:3:"uri";i:1;}i:1;a:0:{}}'); // "uri" key in first array is not a string } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:15:"Uri\Rfc3986\Uri":2:{i:0;a:1:{s:3:"uri";s:2:"%1";}i:1;a:0:{}}'); // "uri" key in first array contains invalid URI } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:15:"Uri\Rfc3986\Uri":2:{i:0;a:1:{s:3:"uri";s:4:"/uri";}i:1;s:0:"";}'); // second item in not an array } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:15:"Uri\Rfc3986\Uri":2:{i:0;a:1:{s:3:"uri";s:4:"/uri";}i:1;a:1:{s:5:"prop1";i:123;}}'); // second array contains a property } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $url1 = new Uri\WhatWg\Url("https://username:password@www.google.com:8080/pathname1/pathname2/pathname3?query=true#hash-exists"); @@ -70,55 +70,55 @@ var_dump($url2); try { unserialize('O:14:"Uri\WhatWg\Url":1:{i:0;a:0:{}}'); // less than 2 items } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":3:{i:0;a:0:{}i:1;a:0:{}i:2;a:0:{}}'); // more than 2 items } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":2:{i:0;N;i:1;a:0:{}}'); // first item is not an array } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":2:{i:0;a:0:{}i:1;a:0:{}}'); // first array is empty } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":2:{i:0;a:2:{s:3:"uri";s:19:"https://example.com";s:1:"a";i:1;}i:1;a:0:{}}'); // "uri" key in first array contains more than 1 item } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":2:{i:0;a:1:{s:3:"uri";i:1;}i:1;a:0:{}}'); // "uri" key in first array is not a string } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":2:{i:0;a:1:{s:3:"uri";s:11:"invalid-url";}i:1;a:0:{}}'); // "uri" key in first array contains invalid URL } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":2:{i:0;a:1:{s:3:"uri";s:19:"https://example.com";}i:1;s:0:"";}'); // second item in not an array } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { unserialize('O:14:"Uri\WhatWg\Url":2:{i:0;a:1:{s:3:"uri";s:19:"https://example.com";}i:1;a:1:{s:5:"prop1";i:123;}}'); // second array contains property } catch (Exception $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> @@ -142,14 +142,14 @@ object(Uri\Rfc3986\Uri)#%d (%d) { ["fragment"]=> string(11) "hash-exists" } -Invalid serialization data for Uri\Rfc3986\Uri object -Invalid serialization data for Uri\Rfc3986\Uri object -Invalid serialization data for Uri\Rfc3986\Uri object -Invalid serialization data for Uri\Rfc3986\Uri object -Invalid serialization data for Uri\Rfc3986\Uri object -Invalid serialization data for Uri\Rfc3986\Uri object -Invalid serialization data for Uri\Rfc3986\Uri object -Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object +Exception: Invalid serialization data for Uri\Rfc3986\Uri object string(162) "O:14:"Uri\WhatWg\Url":2:{i:0;a:1:{s:3:"uri";s:98:"https://username:password@www.google.com:8080/pathname1/pathname2/pathname3?query=true#hash-exists";}i:1;a:0:{}}" object(Uri\WhatWg\Url)#%d (%d) { ["scheme"]=> @@ -169,12 +169,12 @@ object(Uri\WhatWg\Url)#%d (%d) { ["fragment"]=> string(11) "hash-exists" } -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object -Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object +Exception: Invalid serialization data for Uri\WhatWg\Url object diff --git a/ext/uri/tests/051.phpt b/ext/uri/tests/051.phpt index 0d60a1ed4246..62cb63eab587 100644 --- a/ext/uri/tests/051.phpt +++ b/ext/uri/tests/051.phpt @@ -10,7 +10,7 @@ $uri = new Uri\Rfc3986\Uri("https://example.com"); try { $uri->resolve("á"); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $url = new Uri\WhatWg\Url("https://example.com"); @@ -18,7 +18,7 @@ $url = new Uri\WhatWg\Url("https://example.com"); try { $url->resolve("https://1.2.3.4.5"); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } $softErrors = []; @@ -28,8 +28,8 @@ var_dump($softErrors); ?> --EXPECTF-- -The specified URI is malformed -The specified URI is malformed (Ipv4TooManyParts) +Uri\InvalidUriException: The specified URI is malformed +Uri\WhatWg\InvalidUrlException: The specified URI is malformed (Ipv4TooManyParts) string(23) "https://example.com/foo" array(%d) { [0]=> diff --git a/ext/uri/tests/052.phpt b/ext/uri/tests/052.phpt index af7d05b893ea..1074a6cc3ce1 100644 --- a/ext/uri/tests/052.phpt +++ b/ext/uri/tests/052.phpt @@ -10,14 +10,14 @@ $r = new Uri\WhatWg\UrlValidationError('foo', Uri\WhatWg\UrlValidationErrorType: try { $r->__construct('bar', Uri\WhatWg\UrlValidationErrorType::HostMissing, false); } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($r); ?> --EXPECTF-- -Cannot modify readonly property Uri\WhatWg\UrlValidationError::$context +Error: Cannot modify readonly property Uri\WhatWg\UrlValidationError::$context object(Uri\WhatWg\UrlValidationError)#%d (%d) { ["context"]=> string(3) "foo" diff --git a/ext/uri/tests/053.phpt b/ext/uri/tests/053.phpt index 2bd02365b09a..a6b2dba48a5f 100644 --- a/ext/uri/tests/053.phpt +++ b/ext/uri/tests/053.phpt @@ -15,25 +15,25 @@ $r = new Uri\WhatWg\InvalidUrlException( try { $r->__construct("foo"); } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $r->__construct("bar", []); } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $r->__construct("baz", [], 0); } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { $r->__construct("qax", [], 0, null); } catch (Error $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($r->getMessage()); @@ -43,10 +43,10 @@ var_dump($r->getPrevious()::class); ?> --EXPECTF-- -Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors -Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors -Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors -Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors +Error: Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors +Error: Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors +Error: Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors +Error: Cannot modify readonly property Uri\WhatWg\InvalidUrlException::$errors string(3) "qax" array(%d) { [%d]=> diff --git a/ext/uri/tests/054.phpt b/ext/uri/tests/054.phpt index 562ba981a12a..e63443e5e18d 100644 --- a/ext/uri/tests/054.phpt +++ b/ext/uri/tests/054.phpt @@ -8,11 +8,11 @@ uri try { new \Uri\WhatWg\Url('http://localhost:99999'); } catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; var_dump($e->errors[0]->type === \Uri\WhatWg\UrlValidationErrorType::PortOutOfRange); } ?> --EXPECT-- -The specified URI is malformed (PortOutOfRange) +Uri\WhatWg\InvalidUrlException: The specified URI is malformed (PortOutOfRange) bool(true) diff --git a/ext/uri/tests/055.phpt b/ext/uri/tests/055.phpt index 1b1684d350b0..de2c3b3c67fc 100644 --- a/ext/uri/tests/055.phpt +++ b/ext/uri/tests/055.phpt @@ -8,8 +8,8 @@ uri try { var_dump(new Uri\Rfc3986\Uri('foo', new Uri\Rfc3986\Uri('bar'))); } catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified base URI must be absolute +Uri\InvalidUriException: The specified base URI must be absolute diff --git a/ext/uri/tests/057.phpt b/ext/uri/tests/057.phpt index 458bdb468e34..9abf9f18ed7e 100644 --- a/ext/uri/tests/057.phpt +++ b/ext/uri/tests/057.phpt @@ -13,7 +13,7 @@ $f = new Foo(); try { Uri\WhatWg\Url::parse(" https://example.org ", errors: $f->x); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/058.phpt b/ext/uri/tests/058.phpt index efca0a0e8aaf..c5a1d5a42337 100644 --- a/ext/uri/tests/058.phpt +++ b/ext/uri/tests/058.phpt @@ -22,7 +22,7 @@ try { new \Uri\Rfc3986\Uri('https://example.com:2147483648'); } } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/065.phpt b/ext/uri/tests/065.phpt index d9a6c905c9ef..9af4b2b2d1fb 100644 --- a/ext/uri/tests/065.phpt +++ b/ext/uri/tests/065.phpt @@ -9,7 +9,7 @@ $uri = new Uri\WhatWg\Url('https://example.com'); try { $uri->__construct('ftp://example.org'); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($uri); @@ -17,7 +17,7 @@ $uri = new Uri\WhatWg\Url('https://example.com'); try { $uri->__unserialize([['uri' => 'ftp://example.org'], []]); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($uri); @@ -25,7 +25,7 @@ $uri = new Uri\Rfc3986\Uri('https://example.com'); try { $uri->__construct('ftp://example.org'); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($uri); @@ -33,7 +33,7 @@ $uri = new Uri\Rfc3986\Uri('https://example.com'); try { $uri->__unserialize([['uri' => 'ftp://example.org'], []]); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } var_dump($uri); diff --git a/ext/uri/tests/101.phpt b/ext/uri/tests/101.phpt index 8a44b376a612..6688317800f7 100644 --- a/ext/uri/tests/101.phpt +++ b/ext/uri/tests/101.phpt @@ -9,13 +9,13 @@ zend_test try { var_dump(zend_test_uri_parser('invalid uri', "Uri\\WhatWg\\Url")); } catch (\Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; var_dump($e->errors); } ?> --EXPECTF-- -The specified URI is malformed (MissingSchemeNonRelativeUrl) +Uri\WhatWg\InvalidUrlException: The specified URI is malformed (MissingSchemeNonRelativeUrl) array(1) { [0]=> object(Uri\WhatWg\UrlValidationError)#%d (3) { diff --git a/ext/uri/tests/gh19780.phpt b/ext/uri/tests/gh19780.phpt index 7271c60e8f93..84c413734bb8 100644 --- a/ext/uri/tests/gh19780.phpt +++ b/ext/uri/tests/gh19780.phpt @@ -12,7 +12,7 @@ use Uri\WhatWg\UrlValidationErrorType; try { new InvalidUrlException('message', ['foo']); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } try { @@ -20,10 +20,10 @@ try { 1 => new UrlValidationError('context', UrlValidationErrorType::HostMissing, true) ]); } catch (ValueError $e) { - echo $e->getMessage(), "\n"; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -Uri\WhatWg\InvalidUrlException::__construct(): Argument #2 ($errors) must be a list of Uri\WhatWg\UrlValidationError -Uri\WhatWg\InvalidUrlException::__construct(): Argument #2 ($errors) must be a list of Uri\WhatWg\UrlValidationError +ValueError: Uri\WhatWg\InvalidUrlException::__construct(): Argument #2 ($errors) must be a list of Uri\WhatWg\UrlValidationError +ValueError: Uri\WhatWg\InvalidUrlException::__construct(): Argument #2 ($errors) must be a list of Uri\WhatWg\UrlValidationError diff --git a/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt index 1afde4151ac6..ac0c28f80a6c 100644 --- a/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withFragment("#fragment"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt b/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt index 5d6cf1198c9c..c0df711d5bb4 100644 --- a/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt +++ b/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withFragment("ő"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt index ca87c1a3ce26..f4f902db4ba4 100644 --- a/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withHost("ex#mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/path_error_null_byte.phpt b/ext/uri/tests/rfc3986/modification/path_error_null_byte.phpt index d02e3e8575f2..a783c16780da 100644 --- a/ext/uri/tests/rfc3986/modification/path_error_null_byte.phpt +++ b/ext/uri/tests/rfc3986/modification/path_error_null_byte.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPath("/\0foo"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt index e883a7daed19..af2e147471ed 100644 --- a/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPath("/[foo]"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt b/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt index 5fc836533ca1..38dd29cb56fe 100644 --- a/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt +++ b/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPath("/ő"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt b/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt index b6f66bdb5e44..d6d6382a32b6 100644 --- a/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt +++ b/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPath("foo"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/port_error_negative.phpt b/ext/uri/tests/rfc3986/modification/port_error_negative.phpt index b8a25ee76667..7b8ff486f66f 100644 --- a/ext/uri/tests/rfc3986/modification/port_error_negative.phpt +++ b/ext/uri/tests/rfc3986/modification/port_error_negative.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPort(-1); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt index d7f9745e9ef7..a6416ddaf45f 100644 --- a/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withQuery("#foo"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt b/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt index 964e6b36d72b..33f1ae5f3d91 100644 --- a/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt +++ b/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withQuery("ő"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt b/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt index 94888c446f69..26dc2da70309 100644 --- a/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt +++ b/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withScheme(""); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt b/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt index e44e8df85ed0..47e8964a58d7 100644 --- a/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt +++ b/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withScheme("http%73"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt index 7d235e56d113..f73a5ce395bd 100644 --- a/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withScheme("https:"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt index c416ea43eb73..096830d762d2 100644 --- a/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withUserInfo("us/r:password"); // us/r:password } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/basic_error_multibyte.phpt b/ext/uri/tests/rfc3986/parsing/basic_error_multibyte.phpt index cb6007c844aa..932112f7e5d7 100644 --- a/ext/uri/tests/rfc3986/parsing/basic_error_multibyte.phpt +++ b/ext/uri/tests/rfc3986/parsing/basic_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - basic - multibyte character try { new Uri\Rfc3986\Uri("🐘"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/basic_error_null_byte.phpt b/ext/uri/tests/rfc3986/parsing/basic_error_null_byte.phpt index 91d194e2ff5e..648ace0b39ed 100644 --- a/ext/uri/tests/rfc3986/parsing/basic_error_null_byte.phpt +++ b/ext/uri/tests/rfc3986/parsing/basic_error_null_byte.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - basic - URI contains null byte try { new Uri\Rfc3986\Uri("https://exam\0ple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/host_error_multibyte.phpt b/ext/uri/tests/rfc3986/parsing/host_error_multibyte.phpt index d901d0fdecbd..bde0d40901f3 100644 --- a/ext/uri/tests/rfc3986/parsing/host_error_multibyte.phpt +++ b/ext/uri/tests/rfc3986/parsing/host_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - host - multibyte character try { new Uri\Rfc3986\Uri("https://exḁmple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/host_error_reserved.phpt b/ext/uri/tests/rfc3986/parsing/host_error_reserved.phpt index 0568a027f5b9..2fc7f05e3100 100644 --- a/ext/uri/tests/rfc3986/parsing/host_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/parsing/host_error_reserved.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - host - reserved character try { new Uri\Rfc3986\Uri("https://ex[a]mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/path_error_multibyte.phpt b/ext/uri/tests/rfc3986/parsing/path_error_multibyte.phpt index ded528d03082..fb7bd3475f6c 100644 --- a/ext/uri/tests/rfc3986/parsing/path_error_multibyte.phpt +++ b/ext/uri/tests/rfc3986/parsing/path_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - path - multibyte character try { new Uri\Rfc3986\Uri("https://example.com/fȎȎ"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/path_error_reserved.phpt b/ext/uri/tests/rfc3986/parsing/path_error_reserved.phpt index 2a7efd702569..d075fafe8220 100644 --- a/ext/uri/tests/rfc3986/parsing/path_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/parsing/path_error_reserved.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - path - reserved character try { new Uri\Rfc3986\Uri("https://example.com/fo[o/ba]r/"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/port_error_multibyte.phpt b/ext/uri/tests/rfc3986/parsing/port_error_multibyte.phpt index 54bcd849e5f3..941f70763ab2 100644 --- a/ext/uri/tests/rfc3986/parsing/port_error_multibyte.phpt +++ b/ext/uri/tests/rfc3986/parsing/port_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - port - multibyte character try { new Uri\Rfc3986\Uri("https://example.com:Ȏ"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/port_error_negative.phpt b/ext/uri/tests/rfc3986/parsing/port_error_negative.phpt index df29c2767f05..12d130916cf6 100644 --- a/ext/uri/tests/rfc3986/parsing/port_error_negative.phpt +++ b/ext/uri/tests/rfc3986/parsing/port_error_negative.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - port - negative value try { var_dump(new Uri\Rfc3986\Uri("http://example.com:-1")); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/port_error_percent_encoded.phpt b/ext/uri/tests/rfc3986/parsing/port_error_percent_encoded.phpt index e38ad85b5758..9a6bc11f60fe 100644 --- a/ext/uri/tests/rfc3986/parsing/port_error_percent_encoded.phpt +++ b/ext/uri/tests/rfc3986/parsing/port_error_percent_encoded.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - port - percent encoded character try { new Uri\Rfc3986\Uri("https://example.com:%30"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/port_error_user_info_wrong_place.phpt b/ext/uri/tests/rfc3986/parsing/port_error_user_info_wrong_place.phpt index d2632a6f2806..28e6cd6e3711 100644 --- a/ext/uri/tests/rfc3986/parsing/port_error_user_info_wrong_place.phpt +++ b/ext/uri/tests/rfc3986/parsing/port_error_user_info_wrong_place.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - port - user info component is in wrong place try { var_dump(new Uri\Rfc3986\Uri("https://example.com:8080@username:password")); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/scheme_error_empty.phpt b/ext/uri/tests/rfc3986/parsing/scheme_error_empty.phpt index ba686e7fafca..0815dc45b9cf 100644 --- a/ext/uri/tests/rfc3986/parsing/scheme_error_empty.phpt +++ b/ext/uri/tests/rfc3986/parsing/scheme_error_empty.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - scheme - empty try { new Uri\Rfc3986\Uri("://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/scheme_error_multibyte.phpt b/ext/uri/tests/rfc3986/parsing/scheme_error_multibyte.phpt index f638ca80e0cd..88e2d9cc8099 100644 --- a/ext/uri/tests/rfc3986/parsing/scheme_error_multibyte.phpt +++ b/ext/uri/tests/rfc3986/parsing/scheme_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - scheme - multibyte characters try { new Uri\Rfc3986\Uri("ƕŢŢƤƨ://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/scheme_error_percent_encoded.phpt b/ext/uri/tests/rfc3986/parsing/scheme_error_percent_encoded.phpt index d4dba6f260ad..42c86422053c 100644 --- a/ext/uri/tests/rfc3986/parsing/scheme_error_percent_encoded.phpt +++ b/ext/uri/tests/rfc3986/parsing/scheme_error_percent_encoded.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - scheme - percent encoded character try { new Uri\Rfc3986\Uri("http%2F://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/scheme_error_reserved.phpt b/ext/uri/tests/rfc3986/parsing/scheme_error_reserved.phpt index 99dfb664ea05..e54084444839 100644 --- a/ext/uri/tests/rfc3986/parsing/scheme_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/parsing/scheme_error_reserved.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - scheme - reserved character try { new Uri\Rfc3986\Uri("http&://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/userinfo_error_extended_ascii.phpt b/ext/uri/tests/rfc3986/parsing/userinfo_error_extended_ascii.phpt index 61ea8ecc3c28..34b4ad3540e2 100644 --- a/ext/uri/tests/rfc3986/parsing/userinfo_error_extended_ascii.phpt +++ b/ext/uri/tests/rfc3986/parsing/userinfo_error_extended_ascii.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - userinfo - extended ASCII character try { new Uri\Rfc3986\Uri("http://úzör@example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/userinfo_error_multibyte.phpt b/ext/uri/tests/rfc3986/parsing/userinfo_error_multibyte.phpt index fbceea77b1cd..098b673e76fa 100644 --- a/ext/uri/tests/rfc3986/parsing/userinfo_error_multibyte.phpt +++ b/ext/uri/tests/rfc3986/parsing/userinfo_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - userinfo - multibyte character try { new Uri\Rfc3986\Uri("http://usĕr:pąss@example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/parsing/userinfo_error_reserved.phpt b/ext/uri/tests/rfc3986/parsing/userinfo_error_reserved.phpt index 3b6caeb7a0ed..c10c660ed894 100644 --- a/ext/uri/tests/rfc3986/parsing/userinfo_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/parsing/userinfo_error_reserved.phpt @@ -6,7 +6,7 @@ Test Uri\Rfc3986\Uri parsing - userinfo - reserved character try { new Uri\Rfc3986\Uri("http://us[er]:pass@example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/rfc3986/reference_resolution/resolve_error_null_byte.phpt b/ext/uri/tests/rfc3986/reference_resolution/resolve_error_null_byte.phpt index 16b2f61dce78..07eced07c019 100644 --- a/ext/uri/tests/rfc3986/reference_resolution/resolve_error_null_byte.phpt +++ b/ext/uri/tests/rfc3986/reference_resolution/resolve_error_null_byte.phpt @@ -10,7 +10,7 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->resolve("/f\0o"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/host_error_empty.phpt b/ext/uri/tests/whatwg/modification/host_error_empty.phpt index 7ce0fa9dff2b..f7cfa39d85a1 100644 --- a/ext/uri/tests/whatwg/modification/host_error_empty.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_empty.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withHost(""); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt index a6ef7e6a5d5d..51460c8d68c6 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("foo://example.com"); try { $url = $url->withHost("ex@mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt index d06234d949b8..5afcdb6d185d 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost("ex@mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt index 4413802fdb9e..67556288210a 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost("ex:mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt index 4413802fdb9e..67556288210a 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost("ex:mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/host_error_null_byte.phpt b/ext/uri/tests/whatwg/modification/host_error_null_byte.phpt index 84a6bc1ebdbc..1acb1bbac776 100644 --- a/ext/uri/tests/whatwg/modification/host_error_null_byte.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_null_byte.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withHost("h\0st"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt b/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt index 627fe8d3e588..50ef6ceb9a24 100644 --- a/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost(null); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/multiple_error_with_warnings.phpt b/ext/uri/tests/whatwg/modification/multiple_error_with_warnings.phpt index b5dd89446601..7aa2eae4b00e 100644 --- a/ext/uri/tests/whatwg/modification/multiple_error_with_warnings.phpt +++ b/ext/uri/tests/whatwg/modification/multiple_error_with_warnings.phpt @@ -12,7 +12,7 @@ $url = new Uri\WhatWg\Url("https://example.com") try { $url->withScheme("0"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; var_dump($e->errors); } diff --git a/ext/uri/tests/whatwg/modification/port_error_negative.phpt b/ext/uri/tests/whatwg/modification/port_error_negative.phpt index 27e29995ce35..db5f44122217 100644 --- a/ext/uri/tests/whatwg/modification/port_error_negative.phpt +++ b/ext/uri/tests/whatwg/modification/port_error_negative.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withPort(-1); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/port_error_too_large.phpt b/ext/uri/tests/whatwg/modification/port_error_too_large.phpt index f530b3672163..060ce688d9bd 100644 --- a/ext/uri/tests/whatwg/modification/port_error_too_large.phpt +++ b/ext/uri/tests/whatwg/modification/port_error_too_large.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withPort(65536); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt b/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt index 5e3525de7d94..c8d8dcd17551 100644 --- a/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt +++ b/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withScheme(""); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt b/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt index bda1ac497e25..d00e1acb8069 100644 --- a/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt +++ b/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withScheme("http%73"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt b/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt index ad98af24e4af..19cdccb3a571 100644 --- a/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt +++ b/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withScheme("http?"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/modification/scheme_error_null_byte.phpt b/ext/uri/tests/whatwg/modification/scheme_error_null_byte.phpt index ab2845ae6493..88a9268f7aec 100644 --- a/ext/uri/tests/whatwg/modification/scheme_error_null_byte.phpt +++ b/ext/uri/tests/whatwg/modification/scheme_error_null_byte.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withScheme("sch\0me"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/basic_error_empty.phpt b/ext/uri/tests/whatwg/parsing/basic_error_empty.phpt index 2b7114baa738..eba55502b707 100644 --- a/ext/uri/tests/whatwg/parsing/basic_error_empty.phpt +++ b/ext/uri/tests/whatwg/parsing/basic_error_empty.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - basic - empty string try { new Uri\WhatWg\Url(""); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/host_error_Invalid.phpt b/ext/uri/tests/whatwg/parsing/host_error_Invalid.phpt index 8444ee9e3e96..d4f3fbe78a11 100644 --- a/ext/uri/tests/whatwg/parsing/host_error_Invalid.phpt +++ b/ext/uri/tests/whatwg/parsing/host_error_Invalid.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - host - invalid code point try { new Uri\WhatWg\Url("https://ex[a]mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/host_error_empty1.phpt b/ext/uri/tests/whatwg/parsing/host_error_empty1.phpt index 92b317078ebb..5089fa8580f7 100644 --- a/ext/uri/tests/whatwg/parsing/host_error_empty1.phpt +++ b/ext/uri/tests/whatwg/parsing/host_error_empty1.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - host - empty try { new Uri\WhatWg\Url("https://"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/host_error_empty2.phpt b/ext/uri/tests/whatwg/parsing/host_error_empty2.phpt index 726241674fae..bcd42a7a925c 100644 --- a/ext/uri/tests/whatwg/parsing/host_error_empty2.phpt +++ b/ext/uri/tests/whatwg/parsing/host_error_empty2.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - host - empty try { new Uri\WhatWg\Url("https://user:pass@"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/host_error_empty3.phpt b/ext/uri/tests/whatwg/parsing/host_error_empty3.phpt index 90f2738148f4..95b040fe8ec8 100644 --- a/ext/uri/tests/whatwg/parsing/host_error_empty3.phpt +++ b/ext/uri/tests/whatwg/parsing/host_error_empty3.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - host - empty try { new Uri\WhatWg\Url("/"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/host_error_ipvfuture.phpt b/ext/uri/tests/whatwg/parsing/host_error_ipvfuture.phpt index 959aa0c4442b..b9305abe16b4 100644 --- a/ext/uri/tests/whatwg/parsing/host_error_ipvfuture.phpt +++ b/ext/uri/tests/whatwg/parsing/host_error_ipvfuture.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - host - IPvFuture try { new Uri\WhatWg\Url("https://[v7.host]"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/host_error_null_byte.phpt b/ext/uri/tests/whatwg/parsing/host_error_null_byte.phpt index f450d26c4164..21928b9b265b 100644 --- a/ext/uri/tests/whatwg/parsing/host_error_null_byte.phpt +++ b/ext/uri/tests/whatwg/parsing/host_error_null_byte.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - basic - URL contains null byte try { new Uri\WhatWg\Url("https://exam\0ple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/host_success_empty4.phpt b/ext/uri/tests/whatwg/parsing/host_success_empty4.phpt index 25a28a9750c4..760bd1c7ce36 100644 --- a/ext/uri/tests/whatwg/parsing/host_success_empty4.phpt +++ b/ext/uri/tests/whatwg/parsing/host_success_empty4.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - host - empty try { new Uri\WhatWg\Url("///"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/path_error_relative_reference.phpt b/ext/uri/tests/whatwg/parsing/path_error_relative_reference.phpt index 8e6c6fd3842e..51d41e569874 100644 --- a/ext/uri/tests/whatwg/parsing/path_error_relative_reference.phpt +++ b/ext/uri/tests/whatwg/parsing/path_error_relative_reference.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - path - relative reference try { new Uri\WhatWg\Url("foo"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/path_error_relative_reference_absolute.phpt b/ext/uri/tests/whatwg/parsing/path_error_relative_reference_absolute.phpt index 01d549210d9f..22a790691492 100644 --- a/ext/uri/tests/whatwg/parsing/path_error_relative_reference_absolute.phpt +++ b/ext/uri/tests/whatwg/parsing/path_error_relative_reference_absolute.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - path - relative reference try { new Uri\WhatWg\Url("/foo"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/path_error_relative_reference_only_query_fragment.phpt b/ext/uri/tests/whatwg/parsing/path_error_relative_reference_only_query_fragment.phpt index 9c6a7a7906b2..2a19cc3ce4c0 100644 --- a/ext/uri/tests/whatwg/parsing/path_error_relative_reference_only_query_fragment.phpt +++ b/ext/uri/tests/whatwg/parsing/path_error_relative_reference_only_query_fragment.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - path - relative reference try { new Uri\WhatWg\Url("?query#fragment"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/port_error_multibyte.phpt b/ext/uri/tests/whatwg/parsing/port_error_multibyte.phpt index 8175f2ca992a..01a5e2c5e2f4 100644 --- a/ext/uri/tests/whatwg/parsing/port_error_multibyte.phpt +++ b/ext/uri/tests/whatwg/parsing/port_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - port - multibyte try { new Uri\WhatWg\Url("https://example.com:Ȏ"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/port_error_negative.phpt b/ext/uri/tests/whatwg/parsing/port_error_negative.phpt index bb23476db57c..30b23b3aaa19 100644 --- a/ext/uri/tests/whatwg/parsing/port_error_negative.phpt +++ b/ext/uri/tests/whatwg/parsing/port_error_negative.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - port - negative value try { new Uri\WhatWg\Url("http://example.com:-1"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/port_error_percent_encoded.phpt b/ext/uri/tests/whatwg/parsing/port_error_percent_encoded.phpt index 874211ccb1cf..315257fe13cf 100644 --- a/ext/uri/tests/whatwg/parsing/port_error_percent_encoded.phpt +++ b/ext/uri/tests/whatwg/parsing/port_error_percent_encoded.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - port - percent encoded character try { new Uri\WhatWg\Url("https://example.com:%30"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/port_error_user_info_wrong_place.phpt b/ext/uri/tests/whatwg/parsing/port_error_user_info_wrong_place.phpt index f0f79670230d..8eaf9b72e19c 100644 --- a/ext/uri/tests/whatwg/parsing/port_error_user_info_wrong_place.phpt +++ b/ext/uri/tests/whatwg/parsing/port_error_user_info_wrong_place.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - port - user info component is in wrong place try { var_dump(new Uri\WhatWg\Url("https://example.com:8080@username:password")); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_empty.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_empty.phpt index 023c1d3fab9d..f6aa7cb3e878 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_empty.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_empty.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - empty try { new Uri\WhatWg\Url("://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_invalid.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_invalid.phpt index 9c69b08161ef..7ba59cb0cf6f 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_invalid.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_invalid.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - invalid character try { new Uri\WhatWg\Url("http&://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_multibyte.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_multibyte.phpt index 0d6601e718ea..aad5e3b963da 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_multibyte.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_multibyte.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - multibyte codepoint try { new Uri\WhatWg\Url("ƕŢŢƤƨ://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_null_byte.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_null_byte.phpt index 5674c1f33093..4f98412718b1 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_null_byte.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_null_byte.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - null byte try { new Uri\WhatWg\Url("ht\0tp://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_only1.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_only1.phpt index 92832f65a019..311ca4145fa6 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_only1.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_only1.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - only scheme try { new Uri\WhatWg\Url("http:"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_only2.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_only2.phpt index 22ab6fc53515..00cac5fcf3bf 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_only2.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_only2.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - only scheme try { new Uri\WhatWg\Url("http:/"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_percent_encoded.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_percent_encoded.phpt index a0324edd3701..a1a3e2f2fd2b 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_percent_encoded.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_percent_encoded.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - percent encoded character try { new Uri\WhatWg\Url("http%2F://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/parsing/scheme_error_special.phpt b/ext/uri/tests/whatwg/parsing/scheme_error_special.phpt index 9966ad6248e5..485a024a4a17 100644 --- a/ext/uri/tests/whatwg/parsing/scheme_error_special.phpt +++ b/ext/uri/tests/whatwg/parsing/scheme_error_special.phpt @@ -6,7 +6,7 @@ Test Uri\WhatWg\Url parsing - scheme - invalid character try { new Uri\WhatWg\Url("hÁttp://example.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> diff --git a/ext/uri/tests/whatwg/reference_resolution/resolve_error_host_null_byte.phpt b/ext/uri/tests/whatwg/reference_resolution/resolve_error_host_null_byte.phpt index ed31e0e5daea..25e24d8faa24 100644 --- a/ext/uri/tests/whatwg/reference_resolution/resolve_error_host_null_byte.phpt +++ b/ext/uri/tests/whatwg/reference_resolution/resolve_error_host_null_byte.phpt @@ -10,7 +10,7 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->resolve("https://ex\0mple.com"); } catch (Throwable $e) { - echo $e::class, ": ", $e->getMessage(), PHP_EOL; + echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?>