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 array slice on partially overlapping array --SKIPIF-- <?php if (!extension_l..

Decoded Output download

--TEST--
Test array slice on partially overlapping array
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "first",
    "second",
    "third",
];

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

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

Did this file decode correctly?

Original Code

--TEST--
Test array slice on partially overlapping array
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

$data = [
    "first",
    "second",
    "third",
];

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

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

Function Calls

None

Variables

None

Stats

MD5 2290005f9fe7ea61338cccfafe58e6af
Eval Count 0
Decode Time 87 ms