php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39298 Removing "/" slash works bad
Submitted: 2006-10-29 14:37 UTC Modified: 2006-10-29 14:40 UTC
From: dankeris at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.1.6 OS: Kubuntu 6.10
Private report: No CVE-ID: None
 [2006-10-29 14:37 UTC] dankeris at gmail dot com
Description:
------------
Instead of deleteting "/" char it makes a mysterious character (ord returns 000). ="" =null =false makes all the same thing

Reproduce code:
---------------
<?
function return_url()
{
$url = "labas/";

if(strpos($url,"/")===0) $url[0]="";
$len = (strlen($url)-1);
if(strrpos($url,"/")===$len) $url[$len]="";
return $url;
}
var_dump(return_url());
?>

Expected result:
----------------
string(6) "labas{strange char here}"

Actual result:
--------------
s

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-29 14:40 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 03:00:02 2025 UTC