Adding Gradle and Spring Boot

Along with speed improvements and namespaces, the next version of the runtime converter will also feature support for gradle and spring boot. Previous versions created annotated servlet classes to represent php file routes. After conversion, it was up to the user to structure the project files, build and deploy. With version 2.0, we create these same servlet files, but also include a "build.gradle" build file and a Spring Boot "SpringBootApplication" class. As a result, if the conversion was 100% successful, it can be run immediately either as server or CLI tool. We've created a maven repository to hold the "Runtime Converter Library" dependency, along with its JNI library components for Mac

Runtime Converter 2.0: Namespaces and Protobuf Improvements

The next version of the converter and runtime library will include support for namespaces and speed improvements using Google's Protobuf library (see our last post). PHP namespaces will be translated into Java packages, and function + method calls will be translated accordingly. Namespace imports and aliases will also be considered properly. We've also developed a feature that will import a class name locally where there are no conflicts, and which will also expand package names where there is one. In the previous version of the converter, we imported a number of our base class names by default, and specified others using their full package name. This solution will reduce the verbosity of th

Using Protocol Buffers with JNI

The first version of the Runtime Library for Java was based on a JNI interface with a C/C++ native library that handled PHP library function calls (like "date" or "PDO::fetchAll") directly to an embedded PHP runtime. Each time a function is called from this space, the Java arguments and return values were converted to/from PHP internal "zvals". Performance tests showed that this was about 20x slower for a basic function call. The biggest overhead, by far, was not the creation of new values, but the interaction with Java from native code. Each time an instance type was checked, or a new object created, there was an "expensive" interaction with the Java Native API. There was always a sense tha

Other Online Converters (Java, JavaScript, Scala, Python)

At Runtime Converter, we've noticed that Google's search engine does not distinguish between the search terms "php to java" and "java to php", unless you put them in quotes. Further, as you browse the results, you will find that results like "php to javascript converter", "javascript to php converter", and even "java to scala converter" start appearing in the search results. What that tells us here at Runtime Converter is that these are good terms for our SEO. One way that we think that we might gain a better ranking (after all, we're the best PHP to Java converter available), is by hosting a few of these open source converters. They're not as well developed as the runtime converter, and don


A good point to be made about "PHP to Java" conversions is that someone might want, instead of converting to Java, to convert to Kotlin. While we don't have an explicit "PHP to Kotlin" converter, it is perfectly feasible to convert "PHP -> Java -> Kotlin" by using the Runtime Converter in coordination with JetBrains Java to Kotlin converter. Just as with Java, PHP-> Kotlin converted code will need manual work to fully take advantage of native language features. Kotlin is an excellent language, fully compatible and convertable from Java, which offers advanced null-safety and type inference features, making it also less-verbose than Java. It also advoids many of the confusing pitfals of Scala.

Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square

© 2017 RuntimeConverter