Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Using php in Brackets - am I missing something? #9856

Closed
atomcreativemedia opened this issue Nov 7, 2014 · 8 comments
Closed

Using php in Brackets - am I missing something? #9856

atomcreativemedia opened this issue Nov 7, 2014 · 8 comments

Comments

@atomcreativemedia
Copy link

I like to use some php in many of my projects - however there doesn't seem to be any obvious way that php code is supported in brackets - auto-indent, code highlighting, open/close tag & parentheses highlighting would be extremely useful.

Do these features already exist somewhere, am I missing something or do you think they could be considered as a feature in a future release?

@redmunds
Copy link
Contributor

redmunds commented Nov 7, 2014

@alexconnor7 Brackets is focused on designers and front-end devs, so there's not much server-side support in core Brackets. But there are many extensions for PHP so search the registry. Closing.

@redmunds redmunds closed this as completed Nov 7, 2014
@peterflynn
Copy link
Member

@alexconnor7 Are you opening files ending in the extension .php? If so, you should get the following functionality out of the box:

  • Syntax coloring (aka code highlighting)
  • Auto indent
  • Code hints for HTML tags
  • Auto closing of HTML tags
  • Highlighting of matching parentheses in PHP code

More advanced things like code hints for PHP code & APIs will require extensions, but the list above should be built into Brackets. Reopening since it's definitely a problem if you're not seeing those built-in features.

@peterflynn peterflynn reopened this Nov 7, 2014
@peterflynn
Copy link
Member

Can you provide a sample piece of code (with filename) that doesn't work properly for you? Here's a sample where all the features on the above list work fine for me:

(filename test.php)

<html>
<body>
<?php
function hello($who) {
    return "Hello " . $who;
}
?>
<p>The program says <?= hello("World") ?>.</p>
</body>
</html>

@atomcreativemedia
Copy link
Author

Hi Peter, thanks for your support on this.
You're right - I am indeed seeing some code coloring, code hints and parentheses highlighting in brackets - looks like it's working as it should.

However, there seems to be no recognition, highlighting or auto indenting of the opening/closing <?php tags themselves - just the script within seems to be working as recognised php. Is this correct?

I appreciate that Brackets is focused mainly on designers and front end - I'm not much of a backend developer myself but I do like to use simple php functions here and there to minimise workload (just some simple echos and includes mostly). I have installed a few php extentions already.

Many thanks,

Alex

@pthiess
Copy link
Contributor

pthiess commented Nov 21, 2014

Adding needs review as we need more info from @alexconnor7 to determine the feature area.

@peterflynn
Copy link
Member

@alexconnor7 Can you say more about what you're expecting Brackets to do with <?php open-tags that it's not currently doing?

@ghost
Copy link

ghost commented Nov 23, 2014

Using Brackets in Linux Mint Debian edition, PHP, and other languages work just fine, indenting, closing tags, and I should note, that I didn't add any of the addons, except themes.

@redmunds
Copy link
Contributor

redmunds commented Dec 2, 2014

Closing this issue as a duplicate of #10038 (which is newer, but has more details).

@alexconnor7 Let us know if you were referring to something else.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants