3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $c = Collator::class; $rc = new ReflectionClass($c); foreach ($rc->getMethods(ReflectionMethod::IS_PUBLIC) as $rm) { printf("- %s::%s:\n%d\n%d\n", $c, $rm->getName(), $rm->getNumberOfParameters(), $rm->getNumberOfRequiredParameters()); foreach ($rm->getParameters() as $param) { printf("Parameter #%d (%s) %s OPTIONAL\n", $param->getPosition(), $param->getName(), $param->isOptional() ? "IS" : "IS NOT"); } echo PHP_EOL; }
based on Shcd8
Output for 7.1.7 - 7.3.1
- Collator::__construct: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::create: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::compare: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL - Collator::sort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (flags) IS OPTIONAL - Collator::sortWithSortKeys: 1 1 Parameter #0 (arr) IS NOT OPTIONAL - Collator::asort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (flags) IS OPTIONAL - Collator::getAttribute: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::setAttribute: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL - Collator::getStrength: 0 0 - Collator::setStrength: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::getLocale: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::getErrorCode: 0 0 - Collator::getErrorMessage: 0 0 - Collator::getSortKey: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL
Output for 7.0.20, 7.1.6
- Collator::__construct: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::create: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::compare: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL - Collator::sort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (flags) IS OPTIONAL - Collator::sortWithSortKeys: 1 1 Parameter #0 (arr) IS NOT OPTIONAL - Collator::asort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (flags) IS OPTIONAL - Collator::getAttribute: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::setAttribute: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL - Collator::getStrength: 0 0 - Collator::setStrength: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::getLocale: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::getErrorCode: 0 0 - Collator::getErrorMessage: 0 0 - Collator::getSortKey: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.18, 7.1.0 - 7.1.5
- Collator::__construct: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::create: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::compare: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL - Collator::sort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (flags) IS OPTIONAL - Collator::sortWithSortKeys: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (flags) IS OPTIONAL - Collator::asort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (flags) IS OPTIONAL - Collator::getAttribute: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::setAttribute: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL - Collator::getStrength: 0 0 - Collator::setStrength: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::getLocale: 1 1 Parameter #0 (arg1) IS NOT OPTIONAL - Collator::getErrorCode: 0 0 - Collator::getErrorMessage: 0 0 - Collator::getSortKey: 2 2 Parameter #0 (arg1) IS NOT OPTIONAL Parameter #1 (arg2) IS NOT OPTIONAL
Output for hhvm-3.12.14 - 3.17.3
- Collator::__construct: 1 1 Parameter #0 (locale) IS NOT OPTIONAL - Collator::asort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (sort_flag) IS OPTIONAL - Collator::compare: 2 2 Parameter #0 (str1) IS NOT OPTIONAL Parameter #1 (str2) IS NOT OPTIONAL - Collator::create: 1 1 Parameter #0 (locale) IS NOT OPTIONAL - Collator::getAttribute: 1 1 Parameter #0 (attr) IS NOT OPTIONAL - Collator::getErrorCode: 0 0 - Collator::getErrorMessage: 0 0 - Collator::getLocale: 1 1 Parameter #0 (type) IS NOT OPTIONAL - Collator::getSortKey: 1 1 Parameter #0 (str) IS NOT OPTIONAL - Collator::getStrength: 0 0 - Collator::setAttribute: 2 2 Parameter #0 (attr) IS NOT OPTIONAL Parameter #1 (val) IS NOT OPTIONAL - Collator::setStrength: 1 1 Parameter #0 (strength) IS NOT OPTIONAL - Collator::sortWithSortKeys: 1 1 Parameter #0 (arr) IS NOT OPTIONAL - Collator::sort: 2 1 Parameter #0 (arr) IS NOT OPTIONAL Parameter #1 (sort_flag) IS OPTIONAL