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 with key named length --SKIPIF-- <?php if (!extension_loaded("j..

Decoded Output download

--TEST--
Test dot notation with key named length
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

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

$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$.length");

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

Did this file decode correctly?

Original Code

--TEST--
Test dot notation with key named length
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
--FILE--
<?php

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

$jsonPath = new \JsonPath\JsonPath();
$result = $jsonPath->find($data, "$.length");

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

Function Calls

None

Variables

None

Stats

MD5 652d0499b1e510c7e63bd3ffc1867d19
Eval Count 0
Decode Time 133 ms