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-- Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value..

Decoded Output download

--TEST--
Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value).
--FILE--
<?php

$array = parse_ini_string('
        int = 123
        constant = INSTALL_ROOT
        quotedString = "string"
        a = INSTALL_ROOT "waa"
        b = "INSTALL_ROOT"
        c = "waa" INSTALL_ROOT
        d = INSTALL_ROOT "INSTALL_ROOT"', false, INI_SCANNER_RAW);

var_dump($array);
?>
--EXPECT--
array(7) {
  ["int"]=>
  string(3) "123"
  ["constant"]=>
  string(12) "INSTALL_ROOT"
  ["quotedString"]=>
  string(6) "string"
  ["a"]=>
  string(18) "INSTALL_ROOT "waa""
  ["b"]=>
  string(12) "INSTALL_ROOT"
  ["c"]=>
  string(18) ""waa" INSTALL_ROOT"
  ["d"]=>
  string(27) "INSTALL_ROOT "INSTALL_ROOT""
}

Did this file decode correctly?

Original Code

--TEST--
Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value).
--FILE--
<?php

$array = parse_ini_string('
        int = 123
        constant = INSTALL_ROOT
        quotedString = "string"
        a = INSTALL_ROOT "waa"
        b = "INSTALL_ROOT"
        c = "waa" INSTALL_ROOT
        d = INSTALL_ROOT "INSTALL_ROOT"', false, INI_SCANNER_RAW);

var_dump($array);
?>
--EXPECT--
array(7) {
  ["int"]=>
  string(3) "123"
  ["constant"]=>
  string(12) "INSTALL_ROOT"
  ["quotedString"]=>
  string(6) "string"
  ["a"]=>
  string(18) "INSTALL_ROOT "waa""
  ["b"]=>
  string(12) "INSTALL_ROOT"
  ["c"]=>
  string(18) ""waa" INSTALL_ROOT"
  ["d"]=>
  string(27) "INSTALL_ROOT "INSTALL_ROOT""
}

Function Calls

None

Variables

None

Stats

MD5 df0fe71200c2019dec5c4dcbc847a78f
Eval Count 0
Decode Time 83 ms