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 filter expression with dot notation with dash --SKIPIF-- <?php if (!extensio..
Decoded Output download
--TEST--
Test filter expression with dot notation with dash
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php
$data = [
[
"key-dash" => "value",
],
];
$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$[?(@.key-dash == 'value')]");
var_dump($result);
?>
--EXPECT--
array(1) {
[0]=>
array(1) {
["key-dash"]=>
string(5) "value"
}
}
Did this file decode correctly?
Original Code
--TEST--
Test filter expression with dot notation with dash
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php
$data = [
[
"key-dash" => "value",
],
];
$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$[?(@.key-dash == 'value')]");
var_dump($result);
?>
--EXPECT--
array(1) {
[0]=>
array(1) {
["key-dash"]=>
string(5) "value"
}
}
Function Calls
None |
Stats
MD5 | 1a0154b2006d10cd97b7e505d0d73f0d |
Eval Count | 0 |
Decode Time | 96 ms |