From:             nadir dot hajiyani at gmail dot com
Operating system: Mac OS X version 10.8.2
PHP version:      5.3.18
Package:          PHP options/info functions
Bug Type:         Bug
Bug description:The program does not give the correct output

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);


-- 
Edit bug report at https://bugs.php.net/bug.php?id=63470&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63470&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63470&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63470&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63470&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63470&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63470&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63470&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63470&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63470&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63470&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63470&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63470&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63470&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63470&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63470&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63470&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63470&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63470&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63470&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63470&r=mysqlcfg

Reply via email to