0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-08 20:08:41 +00:00
phpv8/tests/issue_472_basic.phpt

31 lines
507 B
Plaintext
Raw Normal View History

--TEST--
Test V8::executeString() : Issue #472 Destroy V8Js object which V8 isolate entered
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
class myjs extends \V8Js
{
public function bosh()
{
$GLOBALS['v8test'] = null;
unset($GLOBALS['v8test']);
}
}
$GLOBALS['v8test'] = new myjs('myjs');
$ret = $GLOBALS['v8test']->executeString('
(() => {
myjs.bosh()
})
');
$ret();
var_dump($ret);
?>
===EOF===
--EXPECTF--
object(V8Function)#%d (0) {
}
===EOF===