Hello,
I have a command-line script that uses d() and then (later) outputs to screen with CLI::write() but when I run my script, the CLI::write() output comes before my d() output.
PHP Code:
d($network_account);
CLI::write("\$publisher_id: " . $network_account['foreign_id']);
CLI::write("\$token: " . $network_account['auth']['Token']);
Again, the terminal output has the CLI::write() lines and THEN the d() output.
Code:
$publisher_id: 12345
$token: asdf1234
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $network_account │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (6) [
'id' => string (1) "2"
'account_id' => string (1) "1"
'network_id' => string (1) "2"
'foreign_id' => string (5) "12345"
'active' => string (1) "1"
'auth' => array (2) [
'Token' => string (16) "asdf1234"
]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from .../app/Controllers/Cli/GetRevenue.php:59 [d()]
I imagine Kint is buffering? If so, how would I flush the Kint buffer? Thanks for any help