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 number on object --SKIPIF-- <?php if (!extension_loade..

Decoded Output download

--TEST--
Test bracket notation with number on object
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "0" => "value",
];

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

var_dump($result);
?>
--EXPECT--
array(1) {
  [0]=>
  string(5) "value"
}

Did this file decode correctly?

Original Code

--TEST--
Test bracket notation with number on object
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "0" => "value",
];

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

var_dump($result);
?>
--EXPECT--
array(1) {
  [0]=>
  string(5) "value"
}

Function Calls

None

Variables

None

Stats

MD5 113a4d8b9759232b26cc59419a5e1bb3
Eval Count 0
Decode Time 110 ms