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 dot notation after bracket notation with wildcard on one matching --SKIPIF--..

Decoded Output download

--TEST--
Test dot notation after bracket notation with wildcard on one matching
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    [
        "a" => 1,
    ],
];

$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$[*].a");

var_dump($result);
?>
--EXPECT--
array(1) {
  [0]=>
  int(1)
}

Did this file decode correctly?

Original Code

--TEST--
Test dot notation after bracket notation with wildcard on one matching
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    [
        "a" => 1,
    ],
];

$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$[*].a");

var_dump($result);
?>
--EXPECT--
array(1) {
  [0]=>
  int(1)
}

Function Calls

None

Variables

None

Stats

MD5 151ea22d2e241d95738dac7f16439a9c
Eval Count 0
Decode Time 95 ms