Skip to content

parse_ini_file parse_ini_string bug when when INI_SCANNER_TYPED #11010

Closed
@GajowyJ

Description

@GajowyJ

Description

The following code:

<?php
$txt = "variable = -00 20 30";
$ret=parse_ini_string($txt,FALSE,INI_SCANNER_TYPED);
var_dump($ret['variable']);

Resulted in this output:

string(7) "0 20 30"

But I expected this output instead:

string(9) "-00 20 30"

or

int(0)

PHP Version

PHP 8.1.17

Operating System

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions