We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_Char class is provided APIs for emulating Java's char on PHPJava. This class not been determined of features.
_Char
Java
char
PHPJava
The class can be pass char type into Java if you want. For an example as follows:
class Test { public static void echo(byte[] text) { System.out.println(new String(text)); } }
$ javac -UTF8 /path/to/Test.java
echo
<?php use PHPJava\Core\JavaClass; use PHPJava\Core\Stream\Reader\FileReader; use PHPJava\Kernel\Types\\_Byte; (new JavaClass(new FileReader('/path/to/Test.class'))) ->getInvoker() ->getStatic() ->getMethods() ->call( 'echo', array_map( function ($char) { return new _Char(ord($char)); }, preg_split( '//', "HelloWorld!", -1, PREG_SPLIT_NO_EMPTY ) ) );
$ php /path/to/Test.php HelloWorld!
public function __construct($value)
Initiate a boolean type for Java.
public function getValue()
Return real value.
No parameter.
public function getTypeNameInJava()
Return type name in Java.
public function getTypeNameInPHP()
Return type name in PHP.
public function __toString()
Return stringified real value.