You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP 🐘
11
-
The PHPJava proceed to read binary from pre-compiled Java file(s) ☕
12
-
This project reference to [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) documentation when We makes.
10
+
The PHPJava is an experimental library which emulates JVM (a.k.a. Java Virtual Machine) by PHP 🐘
11
+
The PHPJava reads binary from pre-compiled Java file(s) ☕
12
+
This project referred to [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) documentation at the time we made it.
13
13
14
-
We welcoming to contributions this project 💪
14
+
We are welcoming any contributions to this project 💪
15
15
16
16
## Requirements
17
17
- PHP >= 7.2
@@ -27,12 +27,12 @@ Sorry, I do not have enough time (T_T)
27
27
- etc...
28
28
29
29
## Quick start
30
-
-1) Install the PHPJava into your project.
30
+
-1) Install the PHPJava into your project:
31
31
```
32
32
$ composer require memory-agape/php-java
33
33
```
34
34
35
-
-2) Write Java
35
+
-2) Write Java:
36
36
```java
37
37
classHelloWorld
38
38
{
@@ -43,12 +43,12 @@ class HelloWorld
43
43
}
44
44
```
45
45
46
-
-3) Compile Java
46
+
-3) Compile Java:
47
47
```
48
48
$ javac -UTF8 /path/to/HelloWorld.java
49
49
```
50
50
51
-
-4) Call to main method as following.
51
+
-4) Call the main method as follows:
52
52
53
53
```php
54
54
<?php
@@ -65,21 +65,21 @@ use PHPJava\Core\JavaClassFileReader;
65
65
);
66
66
```
67
67
68
-
-5) Get a result
68
+
-5) Get the result
69
69
```
70
70
$ php /path/to/HelloWorld.php
71
71
Hello World
72
72
```
73
73
74
74
## Java Archive (Execute to *.jar file)
75
75
76
-
-1) Build your java files to class. Building example is below.
76
+
-1) Build your Java files to class. An example is shown below:
77
77
```
78
78
$ javac -encoding UTF8 -d build src/*
79
79
$ cd build && jar -cvfe ../Test.jar Test *
80
80
```
81
81
82
-
-2)execute jar on PHPJava with enrtypoint or your targeted method.
82
+
-2)Execute jar on PHPJava with either an enrtypoint or your targeted method.
-**Problem 3:** The PHPJava cannot calculate big numbered `double` and `float` values because of `gmp_pow` cannot calculate negative exponents.
312
-
So the PHPJava use built-in functions which is `pow`.
311
+
-**Problem 3:** PHPJava cannot calculate big number of `double` and `float` because `gmp_pow` cannot calculate negative exponents. So, PHPJavas use built-in function `pow`.
0 commit comments