Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I truly love VIM - it's one of only a handful of applications I've every come across that make you feel warm and fuzzy inside. However, for PHP development, I still use PDT Eclipse although I would love to switch.
The reason I can't quite at the moment is the CTRL+SPACE code-assist functionality that I rely on so much - it's so useful, especially when type hinting, or using PHPDoc variable comment blocks.
I know there are cool plugins for VIM out there that can probably replicate this functionality and then some - but what are they?
Vim has OmniCompletion built in, you should add this to your .vimrc:
filetype plugin on
au FileType php set omnifunc=phpcomplete#CompletePHP
In addition I recommend you this plugins:
VTreeExplorer
snippetsEmu
and also take a look to this article about php debugging in Vim, and this paper, it has many useful tips for using Vim in PHP Development.
Code assist it's a new feature of VIM 7
[Ctrl+x] [Ctrl+o] will auto complete your code or open a popup of options
More features of VIM 7 can be found in this blogpost
Btw, I too like vim, but the PDT (and other IDEs) has much more features than code assist that make me preffer them over it.
Look at SuperTab for making tab-autocompletion in Vim a bit easier to use than the standard bindings. You may also want to look into ctags, if you're into code indexing. Google "php vim ctags" and you'll see plenty of articles describing how to set it up.
The official Vim Wiki has a PHP section with some good tips, like integrating the official PHP documentation.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am new to PHP and was wondering whether there is a tool which checks the PHP code syntax and validity.
For example if I have:
class myClass
{
public function function1()
{
$this->myvariable++;
$this->function2();
}
private $myVariable;
}
I would like the tool to highlight that the variable myvariable and the function function2 does not exist within that class.
I have searched online and found http://www.icosaedro.it/phplint/index.html however when I tried it in my PHP project it did not work correctly. I know that php has the -l option, however that only checks for syntax not validity.
Any help would be greatly appreciated.
It sounds like you're looking for an IDE.
PHPStorm is a popular paid IDE for PHP. (~99$/~99€)
Netbeans is also popular, as well as being free.
I've also heard of phpDesigner, Komodo IDE, and Zend Studio. Also, you can find a list of PHP Editors here.
The kind of tool you're looking for, strictly speaking, is a static analysis tool such as PHP Mess Detector. An even simpler (and faster) check can be run from PHP itself using the -l switch, but will only warn against syntax errors.
More advanced checks against code smells, which are somewhat less than bugs but have been found to often evolve into those, can be run by tools such as CodeSniffer for PHP.
That said, the tools above (and many more) are either already bundled, or can be easily integrated, into various IDEs such as Eclipse for PHP. These also supply useful integrations such as code highlighting and inline error highlighting, so that you can quickly "zoom in" on the various bugs. Also, they come with a ton of useful features such as code completion, lookups, insight, templating, and refactoring. More advanced IDEs also "know" about the most popular frameworks and so can be a great help in using them.
You are searching for Integrated Development Environment or shortly IDE, which is software with a lot built in functions to help you to write, test, develop, debug etc... your software.
If we are talking about PHP programming language I prefer them in the following order:
Netbeans
PhpStorm
phpDesigner
Zend Studio
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
ok ok i know SO is full of this kind of question,
but there's a catch:
here's what i need:
a fast and light PHP/HTML/CSS/JS (jquery support ?) IDE
Onestly i'm a PHP devolper AND a web designer so i need something good in both fields (syntax check is a must, web preview would be awesome)
Here's the catch: No Overkill like Eclipse, NetBeans ecc... i'm working almost entirely at 5/10 days projects, i don't really have the time to put up such environments (projects, cvn...). I just need to open the (php,html,js,css) file, modify it and save it in the fastest possible way....
No text-editors (notepad++), they're fine, but i'd like to try something "more"
I'm currently using Dreamweaver cs5 and i'm fine with it, but it's a little too CPU demanding for me...
Thanks !!
Edit: i'm on Windows 7
I use Komodo Edit on both Windows and MAC and I love it.
Or try pspad
Coda on OSX but since you're talking about Notepad++ I assume you're on Windows...
Anyway, could make you want to switch ;-) http://panic.com/coda/
Try to look at PhpStorm or WebStorm.
Emacs supports
PHP and
JavaScript and pretty much everything. It pwns!
I use Sublime Text or Brackets or Atom. They are small and do not require high performance.
Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use.
Some more details about Brackets (free and open source), from the linked page:
With focused visual tools and preprocessor support, Brackets is a modern text editor that makes it easy to design in the browser. It's crafted from the ground up for web designers and front-end developers.
Some more details about Atom (free and open source), from the linked page:
Atom is a text editor that's modern, approachable, yet hackable to the core—a tool you can customize to do anything but also use productively without ever touching a config file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm very interested in the Facebooks php extension xhp (http://github.com/facebook/xhp/wiki), but I didn't use it so far.
I was wondering if anyone can share personal experience with xhp and point me into direction where I can find tutorials about it (wiki on github is very poor).
Thanks everyone.
Here you go :)
Installing, Configuring, and Using the XHP PHP Extension by Facebook
php.net provides a pretty good all-around tutorial on compiling PECL-style extensions. This is how you'll install xhp.
In my experience, it's really a joy to use. And the safety net that is XHP's automatic, context-aware escaping is a real aspirin-saver.
That said, you can incur pretty hefty penalties for using XHP. Personally, I wouldn't touch it without APC or the like installed. See Lerdorf's anecdote on the topic of performance.
Overall, if you have the time, I'd definitely recommend trying it out. Only data will tell you if it's right for your site, though. And, as always, Google is your friend.
Here is some good information on XHP by a Facebook Engineer.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have earlier worked on Visual Studio and am pretty much comfortable in using that.
But now I have some programming work in PHP.
Is there any plug in available that I can install on Visual Studio 2008/2010 and program in PHP/MySQL.
Commercial you have:
Zend Studio wich is pretty powerfull.
Aptana is pretty good too
Of course Eclipse (Zend Studio is built on it). Now free!
Netbeans is lighter but very fast and practical I love it.
There are much lighter editors out there like textedit but if you want something like visual studio Zend/Eclipse is a good bet.
As for pluguins I guess I was wrong and there is http://www.jcxsoftware.com/ as pointed out by Sem Dendoncker. Seems pretty interresting I am downloading the trial now. But I am a cheap and love my free editors.
Try Codecharge Studio 5 which supports code generation, php and javascript events and direct connectivity with artisteer's templates.
There is also a CMS based on Codecharge Studio that supports most of contemporary CMS functions. You can use Codecharge Studio to add more functions or just use its free version and build your own site. Visit www.krisonav.com
I've been using Devsense's PHP for a couple of months and it has been a live saver. Breakpoints, debug, variable visualization all within that familiar and fast environment of VS. It's a bit buggy, doesn't visualize SimpleXMLElements real well, at times won't scroll through inline javascript but it's helped me so much.
Notepad++, even with debug is a far cry from VS. Notepad++'s autocomplete is very slow, VS does pretty good.
I'm using it for WordPress and it does fine, with the exception that (for speed) I've excluded the WP core from the project.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I've got the bare minimum to handle the Linux/MySQL parts of the stack, but I want to have a basic grasp of PHP before I dive in. I'll be working on WordPress plugins, in case there's anything specifically interesting for that.
PS - any recommendations regarding recommended source control/IDEs would also be great, but I guess that's a separate question.
I would recomment the PHP manual too!
For PHP books you can check this question, personally I like Programming PHP, IDEs, I can recommend you to try:
Eclipse PDT
Zend Studio for Eclipse
NetBeans for PHP
DevPHP
Vim
Vim actually it's not an IDE, but you can get omnicompletion, syntax coloring, debugging, and so on...
The PHP Manual it's also a really good place to start learning the language.
When you're developing C# you should definitely take a look at VS.Php
The best php/mysql book is probably PHP and MySQL web development but if you already have an experience in web development you might just need something like the PHP cookbook.
Also, if you don't have any experience with share hosting, you should read something like Apache security (chapter 6).