B4J Question Converting B4X code to PHP

Alessandro71

Well-Known Member
Licensed User
Longtime User
I have some B4X code that needs to be ported to PHP.
Are there any options beside manually rewriting it (and learning PHP in the process)?
 

DonManfred

Expert
Licensed User
Longtime User
I don´t see anything to convert B4X to PHP except of rewriting it.
PHP is different than B4X.

What code do you need to convert?
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
It's a basic web service, whose core is already written in B4X.
I was wondering if I could leverage the already existing code, while continuing to maintain it in its current language.
It looks like I'm going to learn a new language, since it won't be a one-shot job, rather than something that will be maintained over time.
Anyway, the reason behind it, is that the hosting company allows only php code, not java: a jserver project would have already solved the issue.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
I was thinking about this also today because I really need it. @alwaysbusy once reflected that he might do BANano like PHP transpiler, not sure though.

BANano can convert/transpile b4x code to javascript, perhaps a javascript to php like this could help.


I guess one has to find out for themselves.
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
get a VPS and forget about such issues.
That’s the way I would choose, but this is a project with some constraints, and one of the is that code should be maintainable by other developers that have no B4X experience and/or willing to use it.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Upvote 0

Magma

Expert
Licensed User
Longtime User
The right way... is always recreate something from scratch / if you change programming language... especially in those are close to web servers...

Automatic ways not the answer... also... Banano (is great) is something different, you are using b4x commands and logic to create web services... without need to know what actually is doing in the background...
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
I have some B4X code that needs to be ported to PHP.
Are there any options beside manually rewriting it (and learning PHP in the process)?
I would like the opposite, a php to B4J converter.
 
Upvote 0
Top