php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63470 The program does not give the correct output
Submitted: 2012-11-09 02:59 UTC Modified: 2012-11-09 16:02 UTC
From: nadir dot hajiyani at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.18 OS: Mac OS X version 10.8.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nadir dot hajiyani at gmail dot com
New email:
PHP Version: OS:

 

 [2012-11-09 02:59 UTC] nadir dot hajiyani at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.str-replace#refsect1-function.str-
replace-examples
---
// Provides: <body text='black'>
$bodytag = str_replace("%body%", "black", "<body text='%body%'>");

This is not printed as mentioned in the code instead the code in test script 
works.

Test script:
---------------
// Provides body text='black'>
$phrase  = "body text='%body%'>";
$healthy = "%body%";
$yummy   = "black";

echo $newphrase = str_replace($healthy, $yummy, $phrase);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-09 03:35 UTC] rasmus@php.net
I bet hitting "view source" would clear this one up for you.
 [2012-11-09 03:35 UTC] rasmus@php.net
-Status: Open +Status: Not a bug
 [2012-11-09 16:02 UTC] nadir dot hajiyani at gmail dot com
Ya that is correct, this is not a bug. Just that the output is not visible unless 
from view source.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC