note 56385 deleted from function.eval by danbrown

From: Date: Sun, 17 May 2009 19:58:34 +0000
Subject: note 56385 deleted from function.eval by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155303@lists.php.net to get a copy of this message
Note Submitter: Nick Johnson - Pixelrific ---- In reference to Nick's functions below (which didn’t work for me as is) and TfM's comment, this is fixed with a simple change to the pattern used by preg_replace_callback. The pattern should be changed from /\?>((.|\n)*?)<\?/ to /\?>((.|\n)*?)<\?(php)?/ Making that small change will remove a "php" that is leftover in the string to be evaled, which eval trips on and complains about.

« previous php.notes (#155303) next »