note 38428 deleted from function.highlight-string by nlopess

From: Date: Wed, 24 Dec 2003 14:10:26 +0000
Subject: note 38428 deleted from function.highlight-string by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62421@lists.php.net to get a copy of this message
Note Submitter: Carsten Klapp ---- Wrapper for capturing output of highlight_string() into a string under phpversion < 4.2: <?php if (!function_exists('version_compare') || version_compare(phpversion(), '4.2.0', 'lt')) { $has_old_php = true; } if (!empty($has_old_php)) { ob_start(); highlight_string($source); $str = ob_get_contents(); ob_end_clean(); } else $str = highlight_string($source, true); ?>

« previous php.notes (#62421) next »