HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/sigedo-demo.allup.com.co/vendor/predis/predis/tests/phpunit_php7.patch
diff --git a/src/Util/Getopt.php b/src/Util/Getopt.php
index ba21be3..96931a3 100644
--- a/src/Util/Getopt.php
+++ b/src/Util/Getopt.php
@@ -35,7 +35,15 @@ class PHPUnit_Util_Getopt
         reset($args);
         array_map('trim', $args);
 
-        while (list($i, $arg) = each($args)) {
+        while (true) {
+            $arg = current($args);
+            $i = key($args);
+            next($args);
+
+            if ($arg === false) {
+                break;
+            }
+
             if ($arg == '') {
                 continue;
             }
@@ -94,11 +102,14 @@ class PHPUnit_Util_Getopt
                     if ($i + 1 < $argLen) {
                         $opts[] = array($opt, substr($arg, $i + 1));
                         break;
-                    } elseif (list(, $opt_arg) = each($args)) {
                     } else {
-                        throw new PHPUnit_Framework_Exception(
-                            "option requires an argument -- $opt"
-                        );
+                        $opt_arg = current($args);
+                        next($args);
+                        if ($opt_arg === false) {
+                            throw new PHPUnit_Framework_Exception(
+                                "option requires an argument -- $opt"
+                            );
+                        }
                     }
                 }
             }
@@ -139,11 +150,14 @@ class PHPUnit_Util_Getopt
 
             if (substr($long_opt, -1) == '=') {
                 if (substr($long_opt, -2) != '==') {
-                    if (!strlen($opt_arg) &&
-                        !(list(, $opt_arg) = each($args))) {
-                        throw new PHPUnit_Framework_Exception(
-                            "option --$opt requires an argument"
-                        );
+                    if (!strlen($opt_arg)) {
+                        $opt_arg = current($args);
+                        next($args);
+                        if ($opt_arg === false) {
+                            throw new PHPUnit_Framework_Exception(
+                                "option --$opt requires an argument"
+                            );
+                        }
                     }
                 }
             } elseif ($opt_arg) {