--TEST-- Test V8::executeString() : Generators V8 -> PHP --SKIPIF-- --FILE-- executeString($js); // just get the Generator itself -- it's just a normal JS function to us, // i.e. V8Js should create a V8Function object. $gen = $v8->executeString('(TheGen)'); var_dump($gen); // now instantiate the Generator and pass that back -- should become a // V8Generator object that implements the Iterator interface $gen = $v8->executeString('(TheGen())'); var_dump($gen); var_dump($gen instanceof Iterator); ?> ===EOF=== --EXPECTF-- object(V8Function)#%d (1) { ["theValue"]=> int(23) } object(V8Generator)#%d (0) { } bool(true) ===EOF===