Skip to content

Instantly share code, notes, and snippets.

@apphp-snippets
Created May 20, 2012 20:53
Show Gist options
  • Save apphp-snippets/2759493 to your computer and use it in GitHub Desktop.
Save apphp-snippets/2759493 to your computer and use it in GitHub Desktop.
This function highlight_string() outputs or returns a syntax highlighted version of the given PHP code using the colors defined in the built-in syntax highlighter for PHP
<?php
/* Source: http://www.apphp.com/index.php?snippet=php-get-remote-ip-address */
highlight_string('<?php phpinfo(); ?>');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment