#49488 [Opn->Bgs]: Problem in "pathinfo"

From: Date: Mon, 07 Sep 2009 08:40:02 +0000
Subject: #49488 [Opn->Bgs]: Problem in "pathinfo"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-142052@lists.php.net to get a copy of this message
ID: 49488 Updated by: jani@php.net Reported By: rasviar at gmail dot com -Status: Open +Status: Bogus Bug Type: URL related Operating System: Windows Xp PHP Version: 5.3.0 New Comment: pathinfo() is filesystem function. It's not meant for URLs. RTFM.. Previous Comments: ------------------------------------------------------------------------ [2009-09-07 07:24:12] rasviar at gmail dot com Description: ------------ Try to use "pathinfo" function for retrieving filename from URL with only a base URL. For example 'http://www.abc.com/'. It must return a null value, but returning 'www.abc' which is wrong not a file. Reproduce code: --------------- <?php $url="http://www.abc.com/"; echo pathinfo($url,PATHINFO_FILENAME); ?> Expected result: ---------------- null Actual result: -------------- www.abc ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49488&edit=1

« previous php.bugs (#142052) next »