Bug #70112 [PATCH]: [RFE] Allow "dirname" to go up various time

From: Date: Wed, 22 Jul 2015 11:46:26 +0000
Subject: Bug #70112 [PATCH]: [RFE] Allow "dirname" to go up various time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194615@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70112&edit=1 ID: 70112 Patch added by: remi@php.net Reported by: remi@php.net Summary: [RFE] Allow "dirname" to go up various time Status: Open Type: Bug Package: Unknown/Other Function Operating System: irrevelant PHP Version: 7.0.0beta1 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: 0001-Fix-70112-RFE-Allow-dirname-to-go-up-various-time.patch Revision: 1437565586 URL: https://bugs.php.net/patch-display.php?bug=70112&patch=0001-Fix-70112-RFE-Allow-dirname-to-go-up-various-time.patch&revision=1437565586 Previous Comments: ------------------------------------------------------------------------ [2015-07-22 11:44:06] remi@php.net Description: ------------ We can find tons of code with $a = dirname(dirname($b)); $c = dirname(dirname(dirname(__DIR__))); etc Could be nice to be able to write $a = dirname($b, 2); $c = dirname(__DIR__, 3); etc Proposal: Add a new "nb" optional parameter. Function [ <internal:standard> function dirname ] { - Parameters [2] { Parameter #0 [ <required> $path ] Parameter #1 [ <optional> $nb ] } } As a minor, self-contained change, could probably target 7.0 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70112&edit=1

« previous php.bugs (#194615) next »