Seldaek / php-console

PHP Debug Console
Other
529 stars 91 forks source link

Introducing plugins ; adding a new "php -l" button feature #5

Closed ronanguilloux closed 11 years ago

ronanguilloux commented 12 years ago

I Seldaek,

I appreciated your php-console app. For personal needs I augmented it, adding a new button that check the php code syntax : it calls a php script ajaxly, this script evaluate the code using php -l. This is surely improvable, and this is my very first pull request (ever in my life...).

I also introduced a very simple plugin system to your source code, to encourage & facilitate new plugins contributions.

Hope this could inspire you.

Thanks for attention & feedback! Ronan (@arno_u_loginlux, Nantes, France)

Seldaek commented 12 years ago

Overall I'm not against the idea, but I am not sure this is really necessary. If you execute code with a syntax error, you already get back the syntax error message. Granted it's not very nicely formatted and it says it happened in eval()'d code at line X, but maybe just handling this case in the JS code that handles the ajax response would be simpler and not require a specific button/shortcut for this feature. You can already use ctrl+enter to quickly submit the code and get feedback on syntax errors.