mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 22:51:51 +00:00
Add slice call to array_access test
This commit is contained in:
parent
ddcaee47d6
commit
66b42ce080
@ -38,10 +38,12 @@ var_dump(PHP.myarr.constructor.name);
|
|||||||
var_dump(PHP.myarr.length);
|
var_dump(PHP.myarr.length);
|
||||||
var_dump(PHP.myarr[5]);
|
var_dump(PHP.myarr[5]);
|
||||||
var_dump(PHP.myarr.join(', '));
|
var_dump(PHP.myarr.join(', '));
|
||||||
|
|
||||||
|
var_dump(PHP.myarr.slice(5, 10).join(', '));
|
||||||
EOJS;
|
EOJS;
|
||||||
|
|
||||||
$v8 = new V8Js();
|
$v8 = new V8Js();
|
||||||
$v8->myarr = (object) $myarr;
|
$v8->myarr = $myarr;
|
||||||
$v8->executeString($js);
|
$v8->executeString($js);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -53,4 +55,5 @@ string(5) "Array"
|
|||||||
int(20)
|
int(20)
|
||||||
int(14)
|
int(14)
|
||||||
string(68) "19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0"
|
string(68) "19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0"
|
||||||
|
string(18) "14, 13, 12, 11, 10"
|
||||||
===EOF===
|
===EOF===
|
||||||
|
Loading…
Reference in New Issue
Block a user