Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why no refactoring tools in PHP Eclipse? Do I need to install something?

I'm looking for the "Highlight code -> right-click -> Extract Method" type of functionality I see in Eclipse Java. Does this exist for PHP?

like image 804
Alex R Avatar asked Sep 19 '25 00:09

Alex R


2 Answers

I'm using Zend Studio 7, which is also an Eclipse product, and I can see that option through the "refactor" submenu

Highlight code -> right-click -> Refactor -> Extract Method

Not sure if PHP Eclipse has the same thing.

like image 180
Peter Bailey Avatar answered Sep 20 '25 14:09

Peter Bailey


No, most of the refactoring functionality does not work for PHP in Eclipse with PDT. I assume it's because PHP is so much more dynamically typed than Java.

Zend Studio, which is Eclipse with some other extensions has more PHP features, but it will cost you a few hundred bucks.

like image 35
Scott Saunders Avatar answered Sep 20 '25 14:09

Scott Saunders