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 equals on object with key matching query --SKIPIF-- <..

Decoded Output download

--TEST--
Test filter expression with equals on object with key matching query
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "id" => 2,
];

$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$[?(@.id==2)]");

var_dump($result);
?>
--EXPECT--
bool(false)

Did this file decode correctly?

Original Code

--TEST--
Test filter expression with equals on object with key matching query
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "id" => 2,
];

$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$[?(@.id==2)]");

var_dump($result);
?>
--EXPECT--
bool(false)

Function Calls

None

Variables

None

Stats

MD5 8875ba3efd002a5104f32da62aef8750
Eval Count 0
Decode Time 80 ms