4 comments

Hi Dan,

I may be wrong, but can you make sure that you do not have any specific color setup for backgound here:
File | Settings | Editor | Colors & Fonts | PHP  --  now look for  "PHP code" entry (should be the very first).

P.S.
Would be good to see a screenshot, especially one with PHP & HTML mix (that may clearup some things).

0

you were correct there was a background setting for php and it is working correctly now, should i remove all those settings, will it then only use the theme settings? why would of that been set?

0

The themes listed on  http://devnet.jetbrains.net/docs/DOC-1154 are made for RubyMine and will have only HTML, XML, JS and General colors tuned when applied for PhpStorm.

You might be interested in http://devnet.jetbrains.net/message/5262490 and http://youtrack.jetbrains.net/issue/WI-333

0

Why there are settings for this ? :)

I do not know about you or other PHP programmers, but I'm tying to separate logic (PHP, JS) from presentation (HTML, CSS) by using Smarty. It's not always possible to separate them completely (as you still have to use some logic even in Smarty templates, like cycles .. or for styling the elements (zebra styling) or sometimes you need to pass some variable from main script/DB to a JavaScript code etc), but you can do it to a some degree. So, my PHP file is one single <?php code_here ?> tag (just plain code/class declaration). For such scenario this "PHP code" settings (background colour) means nothing. But what if you use mix of PHP and HTML (and/or CSS, JS etc) on the same page (the fastest in terms of performance, since it does not include template engine initialisation/parsing)? In this case you can use this setting to easily visually separate PHP code from the rest text on the page (so you can easily see where PHP and where HTML is -- just setup suitable background colour). BTW, this mix of PHP and HTML approach you will find virtually in any PHP book, especially aimed for beginners (at the end of the day that's is how PHP was intended to be used in first place).

As to the question -- why it was not set when you applied a theme -- I don't really know, except that this was not part of the theme (I'm basic on the fact that this is a theme for Ruby .. which does not include PHP support).

0

Please sign in to leave a comment.