0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 18:41:52 +00:00
phpv8/tests/object_passback_002.phpt
2016-03-25 17:40:43 +01:00

21 lines
381 B
PHP

--TEST--
Test V8::executeString() : Object passing JS > PHP > JS
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$v8 = new V8Js();
$v8->theApiCall = function() use ($v8) {
return $v8->executeString('({ foo: 23 })');
};
$v8->executeString('var_dump(PHP.theApiCall().constructor.name);');
?>
===EOF===
--EXPECT--
string(6) "Object"
===EOF===