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

Decoded Output download

--TEST--
Test bracket notation with number on string
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
<?php if (version_compare(PHP_VERSION, '8.0.0', '<')) print "skip"; ?>
--FILE--
<?php

$data = "Hello World";

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

var_dump($result);
?>
--EXPECTF--
Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, string given in %s014.php:%d
Stack trace:
%s
%s
%s

Did this file decode correctly?

Original Code

--TEST--
Test bracket notation with number on string
--SKIPIF--
<?php if (!extension_loaded("jsonpath")) print "skip"; ?>
<?php if (version_compare(PHP_VERSION, '8.0.0', '<')) print "skip"; ?>
--FILE--
<?php

$data = "Hello World";

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

var_dump($result);
?>
--EXPECTF--
Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, string given in %s014.php:%d
Stack trace:
%s
%s
%s

Function Calls

extension_loaded 1

Variables

None

Stats

MD5 9e41921f6252be4253ef9f73c32e0761
Eval Count 0
Decode Time 112 ms