Skip to content

error formatting inconsistency regarding spaces #15857

@staabm

Description

@staabm

Description

running automated tests in private repo, I recently noticed that some error messages contain more spaces then other
(macos vs. ubuntu github action)

The following code:

<?php

function subtract_no_lint($m { // intentional syntax error
}

Resulted in this output: (note 2 spaces after Parse error:)

Parse error:  syntax error, unexpected token "{", expecting ")" in does-not-lint.php on line 3

But I expected this output instead: (note 1 space after Parse error:)

Parse error: syntax error, unexpected token "{", expecting ")" in does-not-lint.php on line 3

I saw similar differences in the php-src testsuite, see e.g.

grafik

PHP Version

8.3.11

Operating System

ubuntu / macos

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