mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-23 06:01:52 +00:00
27 lines
551 B
Plaintext
27 lines
551 B
Plaintext
|
--TEST--
|
||
|
Test V8::executeString() : Initialized properties on derived class
|
||
|
--SKIPIF--
|
||
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class V8Wrapper extends V8Js {
|
||
|
public $testing = 23;
|
||
|
protected $protectedVar = 42;
|
||
|
private $privateVar = 42;
|
||
|
}
|
||
|
|
||
|
$v8 = new V8Wrapper();
|
||
|
echo($v8->testing."\n");
|
||
|
$v8->executeString('print(PHP.testing + "\n");');
|
||
|
$v8->executeString('print(PHP.protectedVar + "\n");');
|
||
|
$v8->executeString('print(PHP.privateVar + "\n");');
|
||
|
?>
|
||
|
===EOF===
|
||
|
--EXPECT--
|
||
|
23
|
||
|
23
|
||
|
undefined
|
||
|
undefined
|
||
|
===EOF===
|