I want to use javabean in php, it does work,
but there are some problems:
code in php
<?php
arrfail["itm0"]="item0";
arrfail["itm1"]="item1";
arrfail["itm2"]="item2";
arrok[0]="item0";
arrok[1]="item1";
arrok[2]="item2";
$system = new Java "Test");
print $system->func($arrfail,1);//failed
print $system->func($arrok,1);//ok
?>
code in Java
class Test {
public String func(String[] s, int id) {
return s[id];
}
}
when I call the func method by $arrok, it works,and returned the value "item1";
but when I call it by $arrfail, it returned:
Warning: java.lang.IllegalArgumentException: argument type mismatch
How can I send a array like $arrfail in PHP to a Java method? or how to write a new Java
method which can accept the $arrfail array?
Thanks!!