Jump to content

Recommended Posts

Tis probably a bit more picky than anything, but I think it'd be good if the code highlighting when posting code picked up on short opening tags (<?) as well as normal (<?php) ones.

[code]
<?
echo 'an example of unhighlighted code. Though Im still valid PHP!!';
?>
[/code]

[code]
<?php
echo 'wahey look at me all colourful and stuff!';
?>
[/code]

reason being, i've seen a handful over the last few days where there's been plenty of HTML mixed with PHP which has all displayed in plain black text. it's cool on short snippets, but when code examples are longer....
Link to comment
https://forums.phpfreaks.com/topic/35119-php-short-tags-code-highlighting/
Share on other sites

Well, I agree with you. I was a little confused on why they wouldn't highlight the short tags when I first started posting here.

I wouldn't mind seeing this happen, since it would make things easier to read.

And I know there are going to be a few people saying don't use short tags blah blah... ([url=http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html]They are still going to be in php6... so hush.[/url]) ;)
[quote author=Nameless12 link=topic=123396.msg509976#msg509976 date=1169415089]
Does anyone know short tags are no longer default in php5.20?
[/quote]
It is on by default in PHP5.2.

Also, I do think that code highlighting on code with short tags would be a good idea.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.