Skip to content

Regression: parse_ini_file() missing path — returns NULL not false (ext/standard/ini.c) #13475

Closed

Description

@PurHur

Category

stdlib · php-src-strict

Problem

parse_ini_file() on a non-existent path returns NULL on VM. Zend returns false (and emits E_WARNING).

Sibling stat()/lstat()/filemtime() NULL-vs-false regressions are tracked separately (#13459, #13460, #10302); parse_ini_file() is not covered by those issues.

php-src reference

Repro (verified 2026-06-29)

php test/repro/maintainer-parity-probes/probe_parse_ini_file_missing.php; echo ---;
php bin/vm.php test/repro/maintainer-parity-probes/probe_parse_ini_file_missing.php
Call Zend VM
@parse_ini_file('/nonexistent/…') false NULL ❌

Scope (PHP-in-PHP first)

Layer Path
Builtin ext/standard/parse_ini_file.php (or shared ini loader) — failure → false
Tests test/compliance/cases/stdlib/parse_ini_file_missing.phpt

Done when (php-src-strict)

  • Missing/unreadable file → false + E_WARNING matching Zend
  • Successful parse unchanged
  • No new C in runtime/

Verification

php bin/vm.php test/repro/maintainer-parity-probes/probe_parse_ini_file_missing.php

Links

Activity

  1. added
    enhancementNew feature or request
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jun 29, 2026
  2. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — batch (issues #13459, #13460, #13475)

  3. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — batch (issues #13459, #13460, #13475)

  4. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    Verified on master (2026-06-29): parse_ini_file missing path returns strict false — same as Zend. No code change needed.

  5. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — batch (issues #13459 #13460 #13475)

  6. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — batch (issues #13475, #12459, #12460)

  7. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    Verified on master 2026-06-29: @parse_ini_file('/nonexistent/path.ini') returns false (boolean) on VM — matches Zend. Appears fixed; please close if still open.

  8. PurHur commented on Jun 30, 2026

    @PurHur
    OwnerAuthor

    Closing: verified on master 2026-06-30 — parse_ini_file('/nonexistent/path.ini') returns false on VM (matches Zend). Prior NULL regression appears fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions