context_temp_creation.phpt 503 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Test V8::executeString() : correct temp context construction
  3. --SKIPIF--
  4. <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
  5. --FILE--
  6. <?php
  7. $v8 = new V8Js();
  8. class Failer {
  9. protected $_b = null;
  10. function call($a) {
  11. $this->_b = $a;
  12. }
  13. function test() {
  14. print_r($this->_b);
  15. }
  16. }
  17. $v8->failer = new Failer();
  18. $v8->executeString('PHP.failer.call({ foo: 23 });');
  19. $v8->failer->test();
  20. ?>
  21. ===EOF===
  22. --EXPECT--
  23. V8Object Object
  24. (
  25. [foo] => 23
  26. )
  27. ===EOF===