Author Topic: Codeblocks:: PHP ??  (Read 5509 times)

crazy_fox

  • Guest
Codeblocks:: PHP ??
« on: February 11, 2006, 08:16:49 pm »
Is it possible to have Codeblocks used for PHP development? If not, is it in plans?

sethjackson

  • Guest
Re: Codeblocks:: PHP ??
« Reply #1 on: February 11, 2006, 10:22:40 pm »
Is it possible to have Codeblocks used for PHP development? If not, is it in plans?

Well there is no lexer yet if that is what you mean........ I'm not sure it is in the plans...... A developer will have to answer that question....

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Codeblocks:: PHP ??
« Reply #2 on: February 11, 2006, 10:30:06 pm »
C::B is currently being developed towards C/C++ usage.
But, after the compiler framework is redesigned, support for other languages should be easy enough to add.
Be patient!
This bug will be fixed soon...

crazy_fox

  • Guest
Re: Codeblocks:: PHP ??
« Reply #3 on: February 11, 2006, 10:36:56 pm »
Thanks.. Any estimations about the time this will be done?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Codeblocks:: PHP ??
« Reply #4 on: February 11, 2006, 10:40:41 pm »
Basically every text editor is good enough to develop php if you make a few preparations. If you want syntax styling, you'll have to make a lexer though (bluntly said, PHP is C++ with a few keywords left out and with a $ in front of variables, so there is not that much to do, luckily. Ok, seriously... it is of course a bit more different, but you got the idea :lol:). It should not take you too long to get a working lexer together.

Adding preview support should not be too hard, either.

For example, you can set up a web server and export var/www/html (or whatever your document root is) via SMB. Then deny cbp files from everywhere, and you can just create a project file in your document root, add the php files to it and preview your pages in the browser.

Another solution would be to use the php interpreter instead. You could configure the interpreter as "Tool" and pass the current editor's filename variable as argument.

A complete out-of-the-box solution (with integrated interpreter and/or preview) does not exist, but hey, what about writing a plugin for that? ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

takeshimiya

  • Guest
Re: Codeblocks:: PHP ??
« Reply #5 on: February 11, 2006, 10:54:22 pm »
Basically every text editor is good enough to develop php if you make a few preparations. If you want syntax styling, you'll have to make a lexer though (bluntly said, PHP is C++ with a few keywords left out and with a $ in front of variables, so there is not that much to do, luckily. Ok, seriously... it is of course a bit more different, but you got the idea :lol:). It should not take you too long to get a working lexer together.

Actually it's even easier because Scintilla includes support for PHP.
The only problem is that I don't see how can I do some things with the C::B, for things like PHP/ASP/VBScript/JavaScript embedded in HTML (Scintilla can handle those kind of things).
SciTE supports that, by putting all the related things in one lexer: xml, html, php, etc in only one lexer.