File manager - Edit - /opt/cpanel/ea-php74/root/usr/share/tests/pecl/mongodb/tests/bson/bson-javascript-get_properties-002.phpt
Back
--TEST-- MongoDB\BSON\Javascript get_properties handler (foreach) --FILE-- <?php $tests = [ new MongoDB\BSON\Javascript('function(bar) { return bar; }'), new MongoDB\BSON\Javascript('function() { return bar; }', ['bar' => 42]), ]; foreach ($tests as $test) { foreach ($test as $key => $value) { var_dump($key); var_dump($value); } } ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- string(4) "code" string(29) "function(bar) { return bar; }" string(5) "scope" NULL string(4) "code" string(26) "function() { return bar; }" string(5) "scope" object(stdClass)#%d (%d) { ["bar"]=> int(42) } ===DONE===
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings