Req #35250 [Opn->Wfx]: string variable expansion on demand

From: Date: Thu, 08 Jan 2015 23:52:44 +0000
Subject: Req #35250 [Opn->Wfx]: string variable expansion on demand
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189790@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=35250&edit=1 ID: 35250 Updated by: ajf@php.net Reported by: jellicle at gmail dot com Summary: string variable expansion on demand -Status: Open +Status: Wont fix Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: Linux PHP Version: 5.0.5 Block user comment: N Private report: N New Comment: This is basically eval(), and eval() is rather evil so I don't see this being added. Previous Comments: ------------------------------------------------------------------------ [2005-11-17 03:11:51] jellicle at gmail dot com Description: ------------ Wishlist: ability to expand variables in an arbitrary string, which does not seem to be possible currently. (well, not easily, anyway). Reproduce code: --------------- $cat = 'calico'; $hat = 'chapeau'; $string = 'The $cat in the $hat.'; //note single quotes $string = expand_var($string); //this wishlist function echo $string; Expected result: ---------------- The calico in the chapeau. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=35250&edit=1

« previous php.bugs (#189790) next »