0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-10 20:38:42 +00:00

Backport test of issue #246 to PHP 5

The reference handling issue applied only to PHP 7, nevertheless
run the test against PHP 5 version as well.
This commit is contained in:
Stefan Siegl 2016-08-11 19:06:49 +02:00
parent 677c0f3e2e
commit 15cdc3e7df

18
tests/issue_246_001.phpt Normal file
View File

@ -0,0 +1,18 @@
--TEST--
Test V8::executeString() : Handle Z_TYPE == IS_REFERENCE (issue #246)
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php
$v8 = new V8Js();
$array = ['lorem' => 'ipsum'];
array_walk_recursive($array, function (&$item) {});
$v8->some_array = $array;
$v8->executeString('var_dump(PHP.some_array.lorem);');
?>
===EOF===
--EXPECT--
string(5) "ipsum"
===EOF===