From: leestevens318 at msn dot com
Operating system: Windows
PHP version: 4.4.2
PHP Bug Type: *Programming Data Structures
Bug description: Syntax Highlighting: Error
Description:
------------
Syntax Highlighting Error, i'm useing you syntax highlighting, and get a
error when i use speach marks inside brackets.
Reproduce code:
---------------
function highlight($code='') {
if(!$this->preprocess($code)) {
$code = '<code>' . $code . '</code>';
} else {
$code = str_replace('< ?php', '<?php', $code);
$code = str_replace('<br />', '', $code);
ob_start();
highlight_string($code);
$code = ob_get_contents();
ob_end_clean();
}
return stripslashes($code);
}
Expected result:
----------------
Should of Printed out:
$wpdb->get_var(hSELECT COUNT(*) FROM $wpdb->comments WHERE
comment_approved = 0);
With Syntax Highlighting.
Actual result:
--------------
When it's read and went throught the Syntax Highlighting, it comes out
like this:
$wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->comments WHERE
comment_approved = 0”);
--
Edit bug report at http://bugs.php.net/?id=38167&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38167&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38167&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38167&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38167&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38167&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38167&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38167&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38167&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38167&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38167&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38167&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38167&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38167&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38167&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38167&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38167&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38167&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38167&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38167&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38167&r=mysqlcfg