Doc #80440 [Opn->Csd]: base_convert doesn't take named arguments

From: Date: Mon, 28 Dec 2020 14:20:00 +0000
Subject: Doc #80440 [Opn->Csd]: base_convert doesn't take named arguments
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18330@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80440&edit=1 ID: 80440 Updated by: cmb@php.net Reported by: zevio at dougherty dot se Summary: base_convert doesn't take named arguments -Status: Open +Status: Closed Type: Documentation Problem Package: *Math Functions Operating System: Mac OS 11.0.1 PHP Version: 8.0.0 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: The documentation has been updated in the meantime. Previous Comments: ------------------------------------------------------------------------ [2020-11-28 23:53:03] cmb@php.net Oh, they do: <https://3v4l.org/VgaFY>. However, the documentation is not yet up to date regarding the parameters names; we're working on that[1]. For the time being, consider to use reflection to retrieve the proper parameters, e.g. php --rf base_convert [1] <https://github.com/php/doc-en/pulls?q=is%3Apr+is%3Aopen+label%3Amethodsynopses> ------------------------------------------------------------------------ [2020-11-28 23:16:19] zevio at dougherty dot se Description: ------------ Named arguments do not work with base_convert. base_convert(number: 'a37334', frombase: 16, tobase: 2) throws error. Test script: --------------- <?php declare(strict_types = 1); echo base_convert(number: 'a37334', frombase: 16, tobase: 2); Expected result: ---------------- 101000110111001100110100 Actual result: -------------- PHP Fatal error: Uncaught Error: Unknown named parameter $number in… ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80440&edit=1

« previous php.doc.bugs (#18330) next »