Doc #79050 [NEW]: Levenshteins third argument not implemented and typed as string
| From: | php at conscribo dot nl | Date: | Tue, 31 Dec 2019 12:54:34 +0000 |
| Subject: | Doc #79050 [NEW]: Levenshteins third argument not implemented and typed as string | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-17174@lists.php.net to get a copy of this message | ||
From: php at conscribo dot nl
Operating system: Debian
PHP version: 7.3.13
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Levenshteins third argument not implemented and typed as string
Description:
------------
---
From manual page: https://php.net/function.levenshtein
---
The documentation states that arguments 3 to 5 support weights for
various actions. These are not implemented (not documented).
The documentation states the weights should be integers. Running with
php strict_types reveals it only accepts strings.
Test script:
---------------
<?php
declare(strict_types=1);
$str1 = 'abc';
$str2 = 'abcd';
echo levenshtein($str1, $str2, 0);
//output:
//PHP Fatal error: Uncaught TypeError: levenshtein() expects parameter
3 to be //string, integer given
------
<?php
declare(strict_types=1);
$str1 = 'abc';
$str2 = 'abcd';
echo levenshtein($str1, $str2, '0');
//output:
// PHP Warning: levenshtein(): The general Levenshtein support is not
there yet
--
Edit bug report at https://bugs.php.net/bug.php?id=79050&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79050&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79050&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79050&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79050&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79050&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79050&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79050&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79050&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79050&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79050&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79050&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79050&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79050&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79050&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79050&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79050&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79050&r=mysqlcfg