What is the best way to convert an existing php class into Java?

前端 未结 15 1224
梦毁少年i
梦毁少年i 2021-02-09 14:07

I have been tasked with converting several php classes into java classes, which is quickly becoming a nightmare for me. I understand the basic language structure, it being simil

15条回答
  •  北荒
    北荒 (楼主)
    2021-02-09 14:53

    It sounds like you're trying to convert PHP code that is procedural into an OO code base.

    This is not so much a question of PHP to Java, but rather a paradigm shift. There's no automated way to do it, it's going to be rough. Especially if one code base is badly written.

    Btw, I would also why are you converting? Is it just performance? And if so, is there nothing you can do to fix the performance issues. I don't think just converting from one language to another will fix it, you'll still have to find the bottleneck.

提交回复
热议问题