Skip to content

Sorting order of the output is not valid #17638

@remco-pc

Description

@remco-pc

Description

dear php,

hereby my bug:

/tmp/raxon/org/0/Admin/Data/Output# app raxon/task create -user.email=... -host.name=... -description='important for logging' -options.command[]='ls -alh''
/tmp/raxon/org/8e34d817-e667-4345-bf6b-5217da5d1d58/0/Class/_mnt_Vps3_Mount_Package_Raxon_Task_Trait_Main.php:29
object(stdClass)#832 (0) {
}

Press  enter  to continue or  ctrl-c  to break...
/tmp/raxon/org/8e34d817-e667-4345-bf6b-5217da5d1d58/0/Class/_mnt_Vps3_Mount_Package_Raxon_Task_Trait_Main.php:27
object(stdClass)#829 (4) {
  ["user"]=>
  object(stdClass)#825 (1) {
    ["email"]=>
    string(24) "..."
  }
  ["host"]=>
  object(stdClass)#824 (1) {
    ["name"]=>
    string(25) "..."
  }
  ["description"]=>
  string(21) "important for logging"
  ["options"]=>
  object(stdClass)#823 (1) {
    ["command"]=>
    array(1) {
      [0]=>
      string(7) "ls -alh"
    }
  }
}
node

Watch the line numbers (first line 29, then line 27) the source:

<?php
//    /tmp/raxon/org/8e34d817-e667-4345-bf6b-5217da5d1d58/0/Class/_mnt_Vps3_Mount_Package_Raxon_Task_Trait_Main.php
namespace Package\Raxon\Task\Trait;

trait Main {

    public function task_create($flags, $options): void
    {
        d($options);
        echo 'node';
        breakpoint($flags);
    }

}

the function d (debug) echo's, var_dumps & flushes (line 27)
the echo 'node' is at the bottom.
the breakpoint is at the top (line 29) and fflushes stdout, fgets stdin, and use system calls to hide the input.

Why is the sorting order of the output not valid ?

this all happens in php cli 8.3.15

PHP Version

PHP 8.3.15

Operating System

Debian 12

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