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 negative number on short array --SKIPIF-- <?php if (!e..

Decoded Output download

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

$data = [
    "one element",
];

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

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

Did this file decode correctly?

Original Code

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

$data = [
    "one element",
];

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

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

Function Calls

None

Variables

None

Stats

MD5 9bb3f0b28b45960d49ac0287bf81da1f
Eval Count 0
Decode Time 76 ms