diff --git a/src/Cli.php b/src/Cli.php
index <HASH>..<HASH> 100644
--- a/src/Cli.php
+++ b/src/Cli.php
@@ -146,6 +146,11 @@ class Cli
             return true;
         }
 
+        // fix for "Undefined constant STDOUT" error
+        if (!\defined('STDOUT')) {
+            return false;
+        }
+        
         $stream = STDOUT;
         if (\DIRECTORY_SEPARATOR === '\\') {
             return (\function_exists('sapi_windows_vt100_support')
Fixes "Undefined constant STDOUT" error

Similar fix to Symfony's code.