Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test bracket notation for a node that is a reference --SKIPIF-- <?php if (!extens..
Decoded Output download
--TEST--
Test bracket notation for a node that is a reference
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php
$data = [
"key" => 42,
];
$another = [
"key" => 43,
];
$data["another"] =& $another;
$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$['another']['key']");
var_dump($result);
?>
--EXPECT--
array(1) {
[0]=>
int(43)
}
Did this file decode correctly?
Original Code
--TEST--
Test bracket notation for a node that is a reference
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php
$data = [
"key" => 42,
];
$another = [
"key" => 43,
];
$data["another"] =& $another;
$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$['another']['key']");
var_dump($result);
?>
--EXPECT--
array(1) {
[0]=>
int(43)
}
Function Calls
None |
Stats
MD5 | 354ca330ca8c3066a57e4fbf27fcde2d |
Eval Count | 0 |
Decode Time | 77 ms |