3v4l.org

run code in 300+ PHP versions simultaneously
<?php $steps = 0; $arr = explode('|', '1|2|3|4|5'); reverse($arr); function quSort($input) { $input = array_values($input); $newArray = array($input[0]); array_shift($input); $end = $start = $newArray[0]; array_walk($input, function($num) use ($end, $start, &$newArray) { if ($num <= $start) { $start = $num; array_unshift($newArray, $num); } else if ($num >= $end) { $end = $num; $newArray[] = $num; } else { $end2 = count($newArray); $start2 = 0; $var = closer($num, $start, $end); if ($var === $end) { for($i = $end2-1; $i >= $start2; $i--) { if ($num > $newArray[$i] || $num === $newArray[$i]) { array_splice($newArray, $i, 0, array($num)); break 1; } } } else { for($i = $start2; $i < $end2; $i++) { if ($num < $newArray[$i] || $num === $newArray[$i]) { array_splice($newArray, $i, 0, array($num)); break 1; } } } } }); return $newArray; } function quickSort($input, &$steps) { $min = null; $max = null; $medium = null; if (count($input) === 2) { $input = array_values($input); if ($input[0] > $input[1]) { return array($input[1], $input[0]); } else { return array($input[0], $input[1]); } } else if (countOfNumbers($input) == 2) { $array = array(); $biggestNum = reset($input); foreach($input as $num) { if (empty($array)) { array_push($array, $num); } else { if ($biggestNum === $num) { array_push($array, $num); } else if ($biggestNum > $num) { array_unshift($array, $num); } else if ($num > $biggestNum) { array_push($array, $num); $biggestNum = $num; } } } return $array; } else if (!isRight($input, $min, $max, $medium)) { $middle = $medium; $left = array(); $right = array(); foreach ($input as $num) { if ($num > $middle) { array_push($right, $num); } else if ($num <= $middle) { array_push($left, $num); } } $arr = array(); if (count($left) > 0) { if (sameCheck($left)) { $arr = array_merge($arr, $left); } else { $steps++; $arr = array_merge($arr, quickSort($left, $steps)); } } if (count($right) > 0) { if (sameCheck($right)) { $arr = array_merge($arr, $right); } else { $steps++; $arr = array_merge($arr, quickSort($right, $steps)); } } return $arr; } else { return $input; } } function sameCheck ($input) { $oldInput = reset($input); foreach($input as $keys) { if ($oldInput !== $keys) { return false; } } return true; } function countOfNumbers($input) { $arr = array(); foreach ($input as $num) { if (!in_array($num, $arr)) { array_push($arr, $num); } } return count($arr); } function isRight ($input, &$min, &$max, &$medium) { $before = null; $check = true; foreach($input as $num) { if ($before === null) { $before = $num; $min = $num; $max = $num; $medium = $num; } if ($min > $num) { $min = $num; } else if ($max < $num) { $max = $num; } //echo implode('|', array($max, $min, $medium, $num)) . PHP_EOL; if ($num != $medium && $num < $max && $num > $min) { $medium = closer($max + $min, $medium, $num); } else if (($num != $medium && $medium === $min && $medium < $max)|| ($min === $max && $medium != $max)){ $medium = $max; } /*if () { $medium = $num; }*/ if ($num < $before) { $check = false; } $before = $num; } //$medium = ($max + $min) / 2/; return $check; } function closer($to, $medium, $new) { $to = floor($to / 2); if (abs($to - $medium) > abs($new - $to)) { return $new; } else { return $medium; } } /*$start = microtime(true); echo implode('|', quickSort($arr, $steps)) . PHP_EOL; echo $date - $start; */ $date = microtime(true); echo PHP_EOL; echo implode('|', $arr) . PHP_EOL; echo implode('|', quSort($arr)) . PHP_EOL; $date2 = microtime(true); echo $date2 - $date; echo PHP_EOL; echo implode('|', $arr) . PHP_EOL;; sort($arr); echo implode('|', $arr). PHP_EOL; $date3= microtime(true); echo $date3 - $date2; if (($date2 - $date) > ($date3 - $date2)) { echo PHP_EOL . 'still slower'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 62
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 62
filename:       /in/XdreH
function name:  (null)
number of ops:  63
compiled vars:  !0 = $steps, !1 = $arr, !2 = $date, !3 = $date2, !4 = $date3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%7C'
          3        SEND_VAL                                                 '1%7C2%7C3%7C4%7C5'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6        INIT_FCALL_BY_NAME                                       'reverse'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
  182     9        INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
  183    13        ECHO                                                     '%0A'
  184    14        INIT_FCALL                                               'implode'
         15        SEND_VAL                                                 '%7C'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $11     
         18        CONCAT                                           ~12     $11, '%0A'
         19        ECHO                                                     ~12
  185    20        INIT_FCALL                                               'implode'
         21        SEND_VAL                                                 '%7C'
         22        INIT_FCALL                                               'qusort'
         23        SEND_VAR                                                 !1
         24        DO_FCALL                                      0  $13     
         25        SEND_VAR                                                 $13
         26        DO_ICALL                                         $14     
         27        CONCAT                                           ~15     $14, '%0A'
         28        ECHO                                                     ~15
  186    29        INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $16     
         32        ASSIGN                                                   !3, $16
  187    33        SUB                                              ~18     !3, !2
         34        ECHO                                                     ~18
  189    35        ECHO                                                     '%0A'
  191    36        INIT_FCALL                                               'implode'
         37        SEND_VAL                                                 '%7C'
         38        SEND_VAR                                                 !1
         39        DO_ICALL                                         $19     
         40        CONCAT                                           ~20     $19, '%0A'
         41        ECHO                                                     ~20
  192    42        INIT_FCALL                                               'sort'
         43        SEND_REF                                                 !1
         44        DO_ICALL                                                 
  193    45        INIT_FCALL                                               'implode'
         46        SEND_VAL                                                 '%7C'
         47        SEND_VAR                                                 !1
         48        DO_ICALL                                         $22     
         49        CONCAT                                           ~23     $22, '%0A'
         50        ECHO                                                     ~23
  195    51        INIT_FCALL                                               'microtime'
         52        SEND_VAL                                                 <true>
         53        DO_ICALL                                         $24     
         54        ASSIGN                                                   !4, $24
  196    55        SUB                                              ~26     !4, !3
         56        ECHO                                                     ~26
  199    57        SUB                                              ~27     !3, !2
         58        SUB                                              ~28     !4, !3
         59        IS_SMALLER                                               ~28, ~27
         60      > JMPZ                                                     ~29, ->62
  200    61    >   ECHO                                                     '%0Astill+slower'
  201    62    > > RETURN                                                   1

Function qusort:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdreH
function name:  quSort
number of ops:  24
compiled vars:  !0 = $input, !1 = $newArray, !2 = $end, !3 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'array_values'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    8     5        FETCH_DIM_R                                      ~6      !0, 0
          6        INIT_ARRAY                                       ~7      ~6
          7        ASSIGN                                                   !1, ~7
    9     8        INIT_FCALL                                               'array_shift'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                                 
   10    11        FETCH_DIM_R                                      ~10     !1, 0
         12        ASSIGN                                           ~11     !3, ~10
         13        ASSIGN                                                   !2, ~11
   11    14        INIT_FCALL                                               'array_walk'
         15        SEND_REF                                                 !0
         16        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXdreH%3A11%240'
         17        BIND_LEXICAL                                             ~13, !2
         18        BIND_LEXICAL                                             ~13, !3
         19        BIND_LEXICAL                                             ~13, !1
   38    20        SEND_VAL                                                 ~13
         21        DO_ICALL                                                 
   39    22      > RETURN                                                   !1
   40    23*     > RETURN                                                   null

End of function qusort

Function %00%7Bclosure%7D%2Fin%2FXdreH%3A11%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 51
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 32
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
Branch analysis from position: 32
2 jumps found. (Code = 47) Position 1 = 35, Position 2 = 38
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 47
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 32
Branch analysis from position: 50
Branch analysis from position: 32
Branch analysis from position: 38
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 69
Branch analysis from position: 69
2 jumps found. (Code = 44) Position 1 = 71, Position 2 = 53
Branch analysis from position: 71
Branch analysis from position: 53
2 jumps found. (Code = 47) Position 1 = 56, Position 2 = 59
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 68
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
Branch analysis from position: 68
2 jumps found. (Code = 44) Position 1 = 71, Position 2 = 53
Branch analysis from position: 71
Branch analysis from position: 53
Branch analysis from position: 59
filename:       /in/XdreH
function name:  {closure}
number of ops:  72
compiled vars:  !0 = $num, !1 = $end, !2 = $start, !3 = $newArray, !4 = $end2, !5 = $start2, !6 = $var, !7 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
   12     4        IS_SMALLER_OR_EQUAL                                      !0, !2
          5      > JMPZ                                                     ~8, ->12
   13     6    >   ASSIGN                                                   !2, !0
   14     7        INIT_FCALL                                               'array_unshift'
          8        SEND_REF                                                 !3
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > JMP                                                      ->71
   15    12    >   IS_SMALLER_OR_EQUAL                                      !1, !0
         13      > JMPZ                                                     ~11, ->18
   16    14    >   ASSIGN                                                   !1, !0
   17    15        ASSIGN_DIM                                               !3
         16        OP_DATA                                                  !0
         17      > JMP                                                      ->71
   19    18    >   COUNT                                            ~14     !3
         19        ASSIGN                                                   !4, ~14
   20    20        ASSIGN                                                   !5, 0
   21    21        INIT_FCALL_BY_NAME                                       'closer'
         22        SEND_VAR_EX                                              !0
         23        SEND_VAR_EX                                              !2
         24        SEND_VAR_EX                                              !1
         25        DO_FCALL                                      0  $17     
         26        ASSIGN                                                   !6, $17
   22    27        IS_IDENTICAL                                             !6, !1
         28      > JMPZ                                                     ~19, ->51
   23    29    >   SUB                                              ~20     !4, 1
         30        ASSIGN                                                   !7, ~20
         31      > JMP                                                      ->48
   24    32    >   FETCH_DIM_R                                      ~22     !3, !7
         33        IS_SMALLER                                       ~23     ~22, !0
         34      > JMPNZ_EX                                         ~23     ~23, ->38
         35    >   FETCH_DIM_R                                      ~24     !3, !7
         36        IS_IDENTICAL                                     ~25     !0, ~24
         37        BOOL                                             ~23     ~25
         38    > > JMPZ                                                     ~23, ->47
   25    39    >   INIT_FCALL                                               'array_splice'
         40        SEND_REF                                                 !3
         41        SEND_VAR                                                 !7
         42        SEND_VAL                                                 0
         43        INIT_ARRAY                                       ~26     !0
         44        SEND_VAL                                                 ~26
         45        DO_ICALL                                                 
   26    46      > JMP                                                      ->50
   23    47    >   PRE_DEC                                                  !7
         48    >   IS_SMALLER_OR_EQUAL                                      !5, !7
         49      > JMPNZ                                                    ~29, ->32
         50    > > JMP                                                      ->71
   30    51    >   ASSIGN                                                   !7, !5
         52      > JMP                                                      ->69
   31    53    >   FETCH_DIM_R                                      ~31     !3, !7
         54        IS_SMALLER                                       ~32     !0, ~31
         55      > JMPNZ_EX                                         ~32     ~32, ->59
         56    >   FETCH_DIM_R                                      ~33     !3, !7
         57        IS_IDENTICAL                                     ~34     !0, ~33
         58        BOOL                                             ~32     ~34
         59    > > JMPZ                                                     ~32, ->68
   32    60    >   INIT_FCALL                                               'array_splice'
         61        SEND_REF                                                 !3
         62        SEND_VAR                                                 !7
         63        SEND_VAL                                                 0
         64        INIT_ARRAY                                       ~35     !0
         65        SEND_VAL                                                 ~35
         66        DO_ICALL                                                 
   33    67      > JMP                                                      ->71
   30    68    >   PRE_INC                                                  !7
         69    >   IS_SMALLER                                               !7, !4
         70      > JMPNZ                                                    ~38, ->53
   38    71    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FXdreH%3A11%240

Function quicksort:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 28
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 72
Branch analysis from position: 33
2 jumps found. (Code = 77) Position 1 = 39, Position 2 = 69
Branch analysis from position: 39
2 jumps found. (Code = 78) Position 1 = 40, Position 2 = 69
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 47
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 54
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 61
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 68
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 68
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 69
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 80, Position 2 = 149
Branch analysis from position: 80
2 jumps found. (Code = 77) Position 1 = 84, Position 2 = 99
Branch analysis from position: 84
2 jumps found. (Code = 78) Position 1 = 85, Position 2 = 99
Branch analysis from position: 85
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 92
Branch analysis from position: 87
1 jumps found. (Code = 42) Position 1 = 98
Branch analysis from position: 98
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
Branch analysis from position: 92
2 jumps found. (Code = 43) Position 1 = 94, Position 2 = 98
Branch analysis from position: 94
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
Branch analysis from position: 98
Branch analysis from position: 99
2 jumps found. (Code = 43) Position 1 = 104, Position 2 = 124
Branch analysis from position: 104
2 jumps found. (Code = 43) Position 1 = 108, Position 2 = 114
Branch analysis from position: 108
1 jumps found. (Code = 42) Position 1 = 124
Branch analysis from position: 124
2 jumps found. (Code = 43) Position 1 = 127, Position 2 = 147
Branch analysis from position: 127
2 jumps found. (Code = 43) Position 1 = 131, Position 2 = 137
Branch analysis from position: 131
1 jumps found. (Code = 42) Position 1 = 147
Branch analysis from position: 147
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 137
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 147
Branch analysis from position: 114
2 jumps found. (Code = 43) Position 1 = 127, Position 2 = 147
Branch analysis from position: 127
Branch analysis from position: 147
Branch analysis from position: 124
Branch analysis from position: 99
Branch analysis from position: 149
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdreH
function name:  quickSort
number of ops:  151
compiled vars:  !0 = $input, !1 = $steps, !2 = $min, !3 = $max, !4 = $medium, !5 = $array, !6 = $biggestNum, !7 = $num, !8 = $middle, !9 = $left, !10 = $right, !11 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   44     2        ASSIGN                                                   !2, null
   45     3        ASSIGN                                                   !3, null
   46     4        ASSIGN                                                   !4, null
   47     5        COUNT                                            ~15     !0
          6        IS_IDENTICAL                                             ~15, 2
          7      > JMPZ                                                     ~16, ->28
   48     8    >   INIT_FCALL                                               'array_values'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $17     
         11        ASSIGN                                                   !0, $17
   49    12        FETCH_DIM_R                                      ~19     !0, 0
         13        FETCH_DIM_R                                      ~20     !0, 1
         14        IS_SMALLER                                               ~20, ~19
         15      > JMPZ                                                     ~21, ->22
   50    16    >   FETCH_DIM_R                                      ~22     !0, 1
         17        INIT_ARRAY                                       ~23     ~22
         18        FETCH_DIM_R                                      ~24     !0, 0
         19        ADD_ARRAY_ELEMENT                                ~23     ~24
         20      > RETURN                                                   ~23
         21*       JMP                                                      ->27
   53    22    >   FETCH_DIM_R                                      ~25     !0, 0
         23        INIT_ARRAY                                       ~26     ~25
         24        FETCH_DIM_R                                      ~27     !0, 1
         25        ADD_ARRAY_ELEMENT                                ~26     ~27
         26      > RETURN                                                   ~26
         27*       JMP                                                      ->150
   56    28    >   INIT_FCALL_BY_NAME                                       'countOfNumbers'
         29        SEND_VAR_EX                                              !0
         30        DO_FCALL                                      0  $28     
         31        IS_EQUAL                                                 $28, 2
         32      > JMPZ                                                     ~29, ->72
   57    33    >   ASSIGN                                                   !5, <array>
   58    34        INIT_FCALL                                               'reset'
         35        SEND_REF                                                 !0
         36        DO_ICALL                                         $31     
         37        ASSIGN                                                   !6, $31
   59    38      > FE_RESET_R                                       $33     !0, ->69
         39    > > FE_FETCH_R                                               $33, !7, ->69
   60    40    >   ISSET_ISEMPTY_CV                                         !5
         41      > JMPZ                                                     ~34, ->47
   61    42    >   INIT_FCALL                                               'array_push'
         43        SEND_REF                                                 !5
         44        SEND_VAR                                                 !7
         45        DO_ICALL                                                 
         46      > JMP                                                      ->68
   63    47    >   IS_IDENTICAL                                             !6, !7
         48      > JMPZ                                                     ~36, ->54
   64    49    >   INIT_FCALL                                               'array_push'
         50        SEND_REF                                                 !5
         51        SEND_VAR                                                 !7
         52        DO_ICALL                                                 
         53      > JMP                                                      ->68
   65    54    >   IS_SMALLER                                               !7, !6
         55      > JMPZ                                                     ~38, ->61
   66    56    >   INIT_FCALL                                               'array_unshift'
         57        SEND_REF                                                 !5
         58        SEND_VAR                                                 !7
         59        DO_ICALL                                                 
         60      > JMP                                                      ->68
   67    61    >   IS_SMALLER                                               !6, !7
         62      > JMPZ                                                     ~40, ->68
   68    63    >   INIT_FCALL                                               'array_push'
         64        SEND_REF                                                 !5
         65        SEND_VAR                                                 !7
         66        DO_ICALL                                                 
   69    67        ASSIGN                                                   !6, !7
   59    68    > > JMP                                                      ->39
         69    >   FE_FREE                                                  $33
   73    70      > RETURN                                                   !5
         71*       JMP                                                      ->150
   74    72    >   INIT_FCALL_BY_NAME                                       'isRight'
         73        SEND_VAR_EX                                              !0
         74        SEND_VAR_EX                                              !2
         75        SEND_VAR_EX                                              !3
         76        SEND_VAR_EX                                              !4
         77        DO_FCALL                                      0  $43     
         78        BOOL_NOT                                         ~44     $43
         79      > JMPZ                                                     ~44, ->149
   75    80    >   ASSIGN                                                   !8, !4
   76    81        ASSIGN                                                   !9, <array>
   77    82        ASSIGN                                                   !10, <array>
   78    83      > FE_RESET_R                                       $48     !0, ->99
         84    > > FE_FETCH_R                                               $48, !7, ->99
   80    85    >   IS_SMALLER                                               !8, !7
         86      > JMPZ                                                     ~49, ->92
   81    87    >   INIT_FCALL                                               'array_push'
         88        SEND_REF                                                 !10
         89        SEND_VAR                                                 !7
         90        DO_ICALL                                                 
         91      > JMP                                                      ->98
   83    92    >   IS_SMALLER_OR_EQUAL                                      !7, !8
         93      > JMPZ                                                     ~51, ->98
   84    94    >   INIT_FCALL                                               'array_push'
         95        SEND_REF                                                 !9
         96        SEND_VAR                                                 !7
         97        DO_ICALL                                                 
   78    98    > > JMP                                                      ->84
         99    >   FE_FREE                                                  $48
   88   100        ASSIGN                                                   !11, <array>
   89   101        COUNT                                            ~54     !9
        102        IS_SMALLER                                               0, ~54
        103      > JMPZ                                                     ~55, ->124
   90   104    >   INIT_FCALL_BY_NAME                                       'sameCheck'
        105        SEND_VAR_EX                                              !9
        106        DO_FCALL                                      0  $56     
        107      > JMPZ                                                     $56, ->114
   91   108    >   INIT_FCALL                                               'array_merge'
        109        SEND_VAR                                                 !11
        110        SEND_VAR                                                 !9
        111        DO_ICALL                                         $57     
        112        ASSIGN                                                   !11, $57
        113      > JMP                                                      ->124
   94   114    >   PRE_INC                                                  !1
   95   115        INIT_FCALL                                               'array_merge'
        116        SEND_VAR                                                 !11
        117        INIT_FCALL_BY_NAME                                       'quickSort'
        118        SEND_VAR_EX                                              !9
        119        SEND_VAR_EX                                              !1
        120        DO_FCALL                                      0  $60     
        121        SEND_VAR                                                 $60
        122        DO_ICALL                                         $61     
        123        ASSIGN                                                   !11, $61
   98   124    >   COUNT                                            ~63     !10
        125        IS_SMALLER                                               0, ~63
        126      > JMPZ                                                     ~64, ->147
   99   127    >   INIT_FCALL_BY_NAME                                       'sameCheck'
        128        SEND_VAR_EX                                              !10
        129        DO_FCALL                                      0  $65     
        130      > JMPZ                                                     $65, ->137
  100   131    >   INIT_FCALL                                               'array_merge'
        132        SEND_VAR                                                 !11
        133        SEND_VAR                                                 !10
        134        DO_ICALL                                         $66     
        135        ASSIGN                                                   !11, $66
        136      > JMP                                                      ->147
  103   137    >   PRE_INC                                                  !1
  104   138        INIT_FCALL                                               'array_merge'
        139        SEND_VAR                                                 !11
        140        INIT_FCALL_BY_NAME                                       'quickSort'
        141        SEND_VAR_EX                                              !10
        142        SEND_VAR_EX                                              !1
        143        DO_FCALL                                      0  $69     
        144        SEND_VAR                                                 $69
        145        DO_ICALL                                         $70     
        146        ASSIGN                                                   !11, $70
  107   147    > > RETURN                                                   !11
        148*       JMP                                                      ->150

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.68 ms | 1431 KiB | 38 Q