| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | --TEST--Test V8::executeString() : Test PHP object construction controlled by JavaScript (with ctor)--SKIPIF--<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>--FILE--<?php$v8 = new V8Js();class Greeter {	protected $_name = null;	function __construct($name) {		echo "ctor called (php)\n";		$this->_name = $name;	}    function sayHello() {        echo "Hello ".$this->_name."\n";    }   }$v8->greeter = new Greeter("John");$v8->executeString('    function JsGreeter(name) {		print("ctor called (js)\n");		this.name = name;	};    JsGreeter.prototype.sayHello = function() {        print("Hello " + this.name + "\n");    };    jsGreeter = new JsGreeter("Paul");    jsGreeter.sayHello();    jsGreeterNg = new jsGreeter.constructor("George");    jsGreeterNg.sayHello();    // -----  now the same using v8Js  -----    PHP.greeter.sayHello();    var ngGreeter = new PHP.greeter.constructor("Ringo");    ngGreeter.sayHello();');?>===EOF===--EXPECT--ctor called (php)ctor called (js)Hello Paulctor called (js)Hello GeorgeHello Johnctor called (php)Hello Ringo===EOF===
 |