3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Php8CompatUtils { public static function eq($a, $b): bool { // If both $a and $b are of type strings, compare them as strings if (is_string($a) && is_string($b)) { return $a == $b; // may not be === because php says '42' equals '042' true yet '42' === '042' is false. } // If both $a and $b are numeric strings, compare them as numbers if (is_numeric($a) && is_numeric($b)) { return $a == $b; } // If $a is an empty string and $b is 0, or vice versa, return true if (($a === '' && $b === 0) || ($a === 0 && $b === '')) { return true; } // If $a is a non-numeric string and $b is 0, or vice versa, return true if ((is_string($a) && ($a !== '') && ($b === 0)) || (($a === 0) && is_string($b) && ($b !== ''))) { return true; } // special case '123abc' == 123 .. php 7 casts 123abc to 123, then 123 == 123 results in true. lets mimic that. if ((is_string($a) && ($a !== '') && (is_numeric($b)) && ((bool)$b))) { $number = filter_var($a, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); //"-234.56xyz" return $number == $b; } if (is_numeric($a) && ((bool)$a) && is_string($b) && ($b !== '')) { $number = filter_var($b, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); //"-234.56xyz" return $a == $number; } // If $a is a number and $b is a non-numeric string, cast $a to string and compare if (is_numeric($a) && is_string($b)) { return strval($a) == $b; } // If $b is a number and $a is a non-numeric string, cast $b to string and compare if (is_string($a) && is_numeric($b)) { return $a == strval($b); } if (is_array($a) || is_array($b)) { return static::standardArrayCompare($a, $b) == 0; } // If $a and $b are both non-numeric strings, compare them directly, we should return true if they are the same return $a == $b; } public static function gt($a, $b): bool { if (static::eq($a, $b)) { return false; } if (is_array($a) || is_array($b)) { return static::standardArrayCompare($a, $b) < 0; } return $a > $b; } public static function lt($a, $b): bool { if (static::eq($a, $b)) { return false; } if (is_array($a) || is_array($b)) { return static::standardArrayCompare($a, $b) > 0; } return $a < $b; } public static function gte($a, $b): bool { if (is_array($a) || is_array($b)) { return static::standardArrayCompare($a, $b) >= 0; } return static::eq($a, $b) || ($a > $b); } public static function lte($a, $b): bool { if (is_array($a) || is_array($b)) { return static::standardArrayCompare($a, $b) <= 0; } return static::eq($a, $b) || ($a < $b); } private static function standardArrayCompare($op1, $op2) { if (count($op1) < count($op2)) { return -1; // $op1 < $op2 } elseif (count($op1) > count($op2)) { return 1; // $op1 > $op2 } foreach ($op1 as $key => $val) { if (!array_key_exists($key, $op2)) { return 1; } elseif (static::lt($val, $op2[$key])) { return -1; } elseif (static::gt($val, $op2[$key])) { return 1; } } return 0; // $op1 == $op2 } } $a = [0 => '']; $b = [0 => 0]; var_dump(Php8CompatUtils::eq($a, $b)); var_dump($a == $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5mEGK
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  120     0  E >   ASSIGN                                                   !0, <array>
  121     1        ASSIGN                                                   !1, <array>
  123     2        INIT_FCALL                                               'var_dump'
          3        INIT_STATIC_METHOD_CALL                                  'Php8CompatUtils', 'eq'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
  124     9        INIT_FCALL                                               'var_dump'
         10        IS_EQUAL                                         ~6      !0, !1
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Php8CompatUtils:
Function eq:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 46) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
2 jumps found. (Code = 47) Position 1 = 27, Position 2 = 32
Branch analysis from position: 27
2 jumps found. (Code = 46) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 34
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 46) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
2 jumps found. (Code = 46) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
2 jumps found. (Code = 47) Position 1 = 42, Position 2 = 50
Branch analysis from position: 42
2 jumps found. (Code = 46) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
2 jumps found. (Code = 46) Position 1 = 47, Position 2 = 49
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 52
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
2 jumps found. (Code = 46) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
2 jumps found. (Code = 46) Position 1 = 57, Position 2 = 61
Branch analysis from position: 57
2 jumps found. (Code = 46) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 74
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 74
2 jumps found. (Code = 46) Position 1 = 78, Position 2 = 80
Branch analysis from position: 78
2 jumps found. (Code = 46) Position 1 = 81, Position 2 = 83
Branch analysis from position: 81
2 jumps found. (Code = 46) Position 1 = 84, Position 2 = 86
Branch analysis from position: 84
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 96
Branch analysis from position: 87
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 96
2 jumps found. (Code = 46) Position 1 = 100, Position 2 = 102
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 103, Position 2 = 107
Branch analysis from position: 103
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 107
2 jumps found. (Code = 46) Position 1 = 109, Position 2 = 113
Branch analysis from position: 109
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 118
Branch analysis from position: 114
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 118
2 jumps found. (Code = 47) Position 1 = 120, Position 2 = 122
Branch analysis from position: 120
2 jumps found. (Code = 43) Position 1 = 123, Position 2 = 130
Branch analysis from position: 123
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 130
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 122
Branch analysis from position: 113
Branch analysis from position: 102
Branch analysis from position: 86
Branch analysis from position: 83
Branch analysis from position: 80
Branch analysis from position: 64
Branch analysis from position: 61
Branch analysis from position: 56
Branch analysis from position: 49
Branch analysis from position: 46
Branch analysis from position: 50
Branch analysis from position: 41
Branch analysis from position: 38
Branch analysis from position: 31
Branch analysis from position: 32
Branch analysis from position: 26
Branch analysis from position: 18
Branch analysis from position: 6
filename:       /in/5mEGK
function name:  eq
number of ops:  135
compiled vars:  !0 = $a, !1 = $b, !2 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        TYPE_CHECK                                   64  ~3      !0
          3      > JMPZ_EX                                          ~3      ~3, ->6
          4    >   TYPE_CHECK                                   64  ~4      !1
          5        BOOL                                             ~3      ~4
          6    > > JMPZ                                                     ~3, ->10
    9     7    >   IS_EQUAL                                         ~5      !0, !1
          8        VERIFY_RETURN_TYPE                                       ~5
          9      > RETURN                                                   ~5
   13    10    >   INIT_FCALL                                               'is_numeric'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13      > JMPZ_EX                                          ~7      $6, ->18
         14    >   INIT_FCALL                                               'is_numeric'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $8      
         17        BOOL                                             ~7      $8
         18    > > JMPZ                                                     ~7, ->22
   14    19    >   IS_EQUAL                                         ~9      !0, !1
         20        VERIFY_RETURN_TYPE                                       ~9
         21      > RETURN                                                   ~9
   18    22    >   IS_IDENTICAL                                     ~10     !0, ''
         23      > JMPZ_EX                                          ~10     ~10, ->26
         24    >   IS_IDENTICAL                                     ~11     !1, 0
         25        BOOL                                             ~10     ~11
         26    > > JMPNZ_EX                                         ~10     ~10, ->32
         27    >   IS_IDENTICAL                                     ~12     !0, 0
         28      > JMPZ_EX                                          ~12     ~12, ->31
         29    >   IS_IDENTICAL                                     ~13     !1, ''
         30        BOOL                                             ~12     ~13
         31    >   BOOL                                             ~10     ~12
         32    > > JMPZ                                                     ~10, ->34
   19    33    > > RETURN                                                   <true>
   23    34    >   TYPE_CHECK                                   64  ~14     !0
         35      > JMPZ_EX                                          ~14     ~14, ->38
         36    >   IS_NOT_IDENTICAL                                 ~15     !0, ''
         37        BOOL                                             ~14     ~15
         38    > > JMPZ_EX                                          ~14     ~14, ->41
         39    >   IS_IDENTICAL                                     ~16     !1, 0
         40        BOOL                                             ~14     ~16
         41    > > JMPNZ_EX                                         ~14     ~14, ->50
         42    >   IS_IDENTICAL                                     ~17     !0, 0
         43      > JMPZ_EX                                          ~17     ~17, ->46
         44    >   TYPE_CHECK                                   64  ~18     !1
         45        BOOL                                             ~17     ~18
         46    > > JMPZ_EX                                          ~17     ~17, ->49
         47    >   IS_NOT_IDENTICAL                                 ~19     !1, ''
         48        BOOL                                             ~17     ~19
         49    >   BOOL                                             ~14     ~17
         50    > > JMPZ                                                     ~14, ->52
   24    51    > > RETURN                                                   <true>
   28    52    >   TYPE_CHECK                                   64  ~20     !0
         53      > JMPZ_EX                                          ~20     ~20, ->56
         54    >   IS_NOT_IDENTICAL                                 ~21     !0, ''
         55        BOOL                                             ~20     ~21
         56    > > JMPZ_EX                                          ~20     ~20, ->61
         57    >   INIT_FCALL                                               'is_numeric'
         58        SEND_VAR                                                 !1
         59        DO_ICALL                                         $22     
         60        BOOL                                             ~20     $22
         61    > > JMPZ_EX                                          ~20     ~20, ->64
         62    >   BOOL                                             ~23     !1
         63        BOOL                                             ~20     ~23
         64    > > JMPZ                                                     ~20, ->74
   29    65    >   INIT_FCALL                                               'filter_var'
         66        SEND_VAR                                                 !0
         67        SEND_VAL                                                 520
         68        SEND_VAL                                                 4096
         69        DO_ICALL                                         $24     
         70        ASSIGN                                                   !2, $24
   30    71        IS_EQUAL                                         ~26     !2, !1
         72        VERIFY_RETURN_TYPE                                       ~26
         73      > RETURN                                                   ~26
   33    74    >   INIT_FCALL                                               'is_numeric'
         75        SEND_VAR                                                 !0
         76        DO_ICALL                                         $27     
         77      > JMPZ_EX                                          ~28     $27, ->80
         78    >   BOOL                                             ~29     !0
         79        BOOL                                             ~28     ~29
         80    > > JMPZ_EX                                          ~28     ~28, ->83
         81    >   TYPE_CHECK                                   64  ~30     !1
         82        BOOL                                             ~28     ~30
         83    > > JMPZ_EX                                          ~28     ~28, ->86
         84    >   IS_NOT_IDENTICAL                                 ~31     !1, ''
         85        BOOL                                             ~28     ~31
         86    > > JMPZ                                                     ~28, ->96
   34    87    >   INIT_FCALL                                               'filter_var'
         88        SEND_VAR                                                 !1
         89        SEND_VAL                                                 520
         90        SEND_VAL                                                 4096
         91        DO_ICALL                                         $32     
         92        ASSIGN                                                   !2, $32
   35    93        IS_EQUAL                                         ~34     !0, !2
         94        VERIFY_RETURN_TYPE                                       ~34
         95      > RETURN                                                   ~34
   39    96    >   INIT_FCALL                                               'is_numeric'
         97        SEND_VAR                                                 !0
         98        DO_ICALL                                         $35     
         99      > JMPZ_EX                                          ~36     $35, ->102
        100    >   TYPE_CHECK                                   64  ~37     !1
        101        BOOL                                             ~36     ~37
        102    > > JMPZ                                                     ~36, ->107
   40   103    >   CAST                                          6  ~38     !0
        104        IS_EQUAL                                         ~39     !1, ~38
        105        VERIFY_RETURN_TYPE                                       ~39
        106      > RETURN                                                   ~39
   44   107    >   TYPE_CHECK                                   64  ~40     !0
        108      > JMPZ_EX                                          ~40     ~40, ->113
        109    >   INIT_FCALL                                               'is_numeric'
        110        SEND_VAR                                                 !1
        111        DO_ICALL                                         $41     
        112        BOOL                                             ~40     $41
        113    > > JMPZ                                                     ~40, ->118
   45   114    >   CAST                                          6  ~42     !1
        115        IS_EQUAL                                         ~43     !0, ~42
        116        VERIFY_RETURN_TYPE                                       ~43
        117      > RETURN                                                   ~43
   48   118    >   TYPE_CHECK                                  128  ~44     !0
        119      > JMPNZ_EX                                         ~44     ~44, ->122
        120    >   TYPE_CHECK                                  128  ~45     !1
        121        BOOL                                             ~44     ~45
        122    > > JMPZ                                                     ~44, ->130
   49   123    >   INIT_STATIC_METHOD_CALL                                  'standardArrayCompare'
        124        SEND_VAR_EX                                              !0
        125        SEND_VAR_EX                                              !1
        126        DO_FCALL                                      0  $46     
        127        IS_EQUAL                                         ~47     $46, 0
        128        VERIFY_RETURN_TYPE                                       ~47
        129      > RETURN                                                   ~47
   53   130    >   IS_EQUAL                                         ~48     !0, !1
        131        VERIFY_RETURN_TYPE                                       ~48
        132      > RETURN                                                   ~48
   54   133*       VERIFY_RETURN_TYPE                                       
        134*     > RETURN                                                   null

End of function eq

Function gt:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/5mEGK
function name:  gt
number of ops:  25
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   58     2        INIT_STATIC_METHOD_CALL                                  'eq'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $2      
          6      > JMPZ                                                     $2, ->8
   59     7    > > RETURN                                                   <false>
   62     8    >   TYPE_CHECK                                  128  ~3      !0
          9      > JMPNZ_EX                                         ~3      ~3, ->12
         10    >   TYPE_CHECK                                  128  ~4      !1
         11        BOOL                                             ~3      ~4
         12    > > JMPZ                                                     ~3, ->20
   63    13    >   INIT_STATIC_METHOD_CALL                                  'standardArrayCompare'
         14        SEND_VAR_EX                                              !0
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $5      
         17        IS_SMALLER                                       ~6      $5, 0
         18        VERIFY_RETURN_TYPE                                       ~6
         19      > RETURN                                                   ~6
   66    20    >   IS_SMALLER                                       ~7      !1, !0
         21        VERIFY_RETURN_TYPE                                       ~7
         22      > RETURN                                                   ~7
   67    23*       VERIFY_RETURN_TYPE                                       
         24*     > RETURN                                                   null

End of function gt

Function lt:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/5mEGK
function name:  lt
number of ops:  25
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   71     2        INIT_STATIC_METHOD_CALL                                  'eq'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $2      
          6      > JMPZ                                                     $2, ->8
   72     7    > > RETURN                                                   <false>
   75     8    >   TYPE_CHECK                                  128  ~3      !0
          9      > JMPNZ_EX                                         ~3      ~3, ->12
         10    >   TYPE_CHECK                                  128  ~4      !1
         11        BOOL                                             ~3      ~4
         12    > > JMPZ                                                     ~3, ->20
   76    13    >   INIT_STATIC_METHOD_CALL                                  'standardArrayCompare'
         14        SEND_VAR_EX                                              !0
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $5      
         17        IS_SMALLER                                       ~6      0, $5
         18        VERIFY_RETURN_TYPE                                       ~6
         19      > RETURN                                                   ~6
   79    20    >   IS_SMALLER                                       ~7      !0, !1
         21        VERIFY_RETURN_TYPE                                       ~7
         22      > RETURN                                                   ~7
   80    23*       VERIFY_RETURN_TYPE                                       
         24*     > RETURN                                                   null

End of function lt

Function gte:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 47) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 6
filename:       /in/5mEGK
function name:  gte
number of ops:  25
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   82     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   84     2        TYPE_CHECK                                  128  ~2      !0
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    >   TYPE_CHECK                                  128  ~3      !1
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->14
   85     7    >   INIT_STATIC_METHOD_CALL                                  'standardArrayCompare'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $4      
         11        IS_SMALLER_OR_EQUAL                              ~5      0, $4
         12        VERIFY_RETURN_TYPE                                       ~5
         13      > RETURN                                                   ~5
   88    14    >   INIT_STATIC_METHOD_CALL                                  'eq'
         15        SEND_VAR_EX                                              !0
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $6      
         18      > JMPNZ_EX                                         ~7      $6, ->21
         19    >   IS_SMALLER                                       ~8      !1, !0
         20        BOOL                                             ~7      ~8
         21    >   VERIFY_RETURN_TYPE                                       ~7
         22      > RETURN                                                   ~7
   89    23*       VERIFY_RETURN_TYPE                                       
         24*     > RETURN                                                   null

End of function gte

Function lte:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 47) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 6
filename:       /in/5mEGK
function name:  lte
number of ops:  25
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   93     2        TYPE_CHECK                                  128  ~2      !0
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    >   TYPE_CHECK                                  128  ~3      !1
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->14
   94     7    >   INIT_STATIC_METHOD_CALL                                  'standardArrayCompare'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $4      
         11        IS_SMALLER_OR_EQUAL                              ~5      $4, 0
         12        VERIFY_RETURN_TYPE                                       ~5
         13      > RETURN                                                   ~5
   97    14    >   INIT_STATIC_METHOD_CALL                                  'eq'
         15        SEND_VAR_EX                                              !0
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $6      
         18      > JMPNZ_EX                                         ~7      $6, ->21
         19    >   IS_SMALLER                                       ~8      !0, !1
         20        BOOL                                             ~7      ~8
         21    >   VERIFY_RETURN_TYPE                                       ~7
         22      > RETURN                                                   ~7
   98    23*       VERIFY_RETURN_TYPE                                       
         24*     > RETURN                                                   null

End of function lte

Function standardarraycompare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 42
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 42
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/5mEGK
function name:  standardArrayCompare
number of ops:  45
compiled vars:  !0 = $op1, !1 = $op2, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  100     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  102     2        COUNT                                            ~4      !0
          3        COUNT                                            ~5      !1
          4        IS_SMALLER                                               ~4, ~5
          5      > JMPZ                                                     ~6, ->8
  103     6    > > RETURN                                                   -1
  102     7*       JMP                                                      ->13
  104     8    >   COUNT                                            ~7      !0
          9        COUNT                                            ~8      !1
         10        IS_SMALLER                                               ~8, ~7
         11      > JMPZ                                                     ~9, ->13
  105    12    > > RETURN                                                   1
  107    13    > > FE_RESET_R                                       $10     !0, ->42
         14    > > FE_FETCH_R                                       ~11     $10, !2, ->42
         15    >   ASSIGN                                                   !3, ~11
  108    16        ARRAY_KEY_EXISTS                                 ~13     !3, !1
         17        BOOL_NOT                                         ~14     ~13
         18      > JMPZ                                                     ~14, ->22
  109    19    >   FE_FREE                                                  $10
         20      > RETURN                                                   1
  108    21*       JMP                                                      ->41
  110    22    >   INIT_STATIC_METHOD_CALL                                  'lt'
         23        SEND_VAR_EX                                              !2
         24        CHECK_FUNC_ARG                                           
         25        FETCH_DIM_FUNC_ARG                               $15     !1, !3
         26        SEND_FUNC_ARG                                            $15
         27        DO_FCALL                                      0  $16     
         28      > JMPZ                                                     $16, ->32
  111    29    >   FE_FREE                                                  $10
         30      > RETURN                                                   -1
  110    31*       JMP                                                      ->41
  112    32    >   INIT_STATIC_METHOD_CALL                                  'gt'
         33        SEND_VAR_EX             

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.34 ms | 1038 KiB | 16 Q