PHP Tool to check syntax/code validity [closed] - php

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

Related

help me find a light php/html/js IDE [closed]

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.

Visual Studio alternative for PHP [closed]

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.

Source code spellcheckers is there an open-source solution or should I make my own? [closed]

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 8 years ago.
Improve this question
I need a source code spell-checker. Of course there is a closed source ones but I'm looking for an open source solution, That can spell check html files, php source codes any further types would be better.
I also thought about making my own since there is a good libraries for spell checking, So what features you think it's good to be added to this application?
I have a very basic imagination of it:
Just Highlight the error words and give you suggestions without any actual modifying for the source code.
Support local and remote files
Spell check only certain parts of code like string literals (between quotations)
choosing between dictionaries.
Using the apell lib or any equivalent one.
Edit: It should have a GUI and should be cross-platform.
Emacs has a minor mode called flyspell which can spellcheck comments and strings within major programming modes.
It seems to fulfil all your criteria: it highlights misspelled words, gives you suggestions, local and remote files (eg. over ssh) are supported, knows how to just check comments and strings, and supports multiple ISpell dictionaries.
You could even automate spell checking using elisp to run batch checking.
Eclipse PDT, which is one of the best IDE for PHP (and is free) supports spellchecking -- as its based on Eclipse.
You can enable it in the preferences, and set a couple of options.
Unfortunatly, I don't think it parses source-code, and it'll highlight as "errors" parts of code that are actually not errors :-( So that's at least one thing that will not work for you, I suppose.
On the other hand :
hightlight without modifications : OK
local and remote files : should be OK, as Eclipse (with RSE plugin, for instance) supports remote files
only certain portions of code : NOT OK
choosing between dictionnaries : seems OK from the configuration dialog
apell or equivalent : I have no idea
GUI : OK : Eclipse
Cross-platform : OK as based on Eclipse
Here is a screenshot of the configuration dialog :
And a result of source-code spellchecking :
(source: pascal-martin.fr)
In red, an actual error, in a comment ; in green a not-error, in PHP code.
Most of the IDEs support spell-checking. I know Eclipse does. You can always run it through ispell

As a C# developer who wants to do some PHP work, what [book/online articles] should I [buy/read] to introduce myself to PHP? [closed]

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).

Suggestions on Ajax development environment for PHP [closed]

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 am a C/C++ programmer professionally, but I've created a couple of personal web sites using PHP and MySQL.
They're pretty basic, and I'd like to jazz them up using Ajax, but I've never done any Ajax. I've done all the development so far manually, i.e. no IDE or anything like that.
Does anyone have suggestions on Ajax development environments that can help me?
Shareware or freeware would be preferable as I'd find it hard to justify spending more than a minimal amount of money on this...
As T.O. says, try Aptana. There's a very good free version, and they really push the AJAX. They even have Jaxer, an "AJAX Server" that they're working on. If nothing else, the plugins are great, and, other than a few quirks, I really like working in it.
If you want an IDE, try Aptana Studio. It supports HTML, CSS, JavaScript, PHP, XML, Ruby, Ruby on Rails, and more....
Aptana is supposedly a decent IDE for Javascript development. I myself just use Eclipse and a decent javascript framework like jQuery that has an easy syntax.
Rolling your own AJAX has become somewhat outdated in the presence of Javascript libraries like Prototype and JQuery. I would recommend looking into one of those libraries (Jeff used JQuery for SO and he's been really impressed with it from what I understand).
As far as a development environment goes, I don't know that there's much. A typical text editor with syntax highlighting would do the trick for writing (like Notepad++). For debugging, take a look at the Firebug extension for Firefox (though if you use JQuery, a debugging tool may not be as useful).
First off, make sure you understand the basics of the HTTP protocol. Then learn how the javascript httpXmlRequest function works. Once you've covered those, pick an Ajax library - prototype is good.
Then look at a few examples, and follow the API.
Job done.
I seriously have no idea how they manage to write entire books on this subject.
Edit: Why vote me down? Learning the basics first, leads to a much better understanding of the way it works. And yes, I believe Jeff should learn C too ;-P
Sajax is another good toolkit with PHP support.
Mostly though I prefer to use a Javascript framework like Jquery or Prototype

Categories