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 with quoted closing bracket literal --SKIPIF-- <?php if (!e..

Decoded Output download

--TEST--
Test bracket notation with quoted closing bracket literal
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "]" => 42,
];

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

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

Did this file decode correctly?

Original Code

--TEST--
Test bracket notation with quoted closing bracket literal
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "]" => 42,
];

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

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

Function Calls

None

Variables

None

Stats

MD5 7deac321efaffaa92c3d3ec9d47b663d
Eval Count 0
Decode Time 84 ms