3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [0.5278533158407, 0.4080014506744, 0.5086879008467, 0.3950042642736, 1], [1, 0.52873390443395, 0.52518076782133, 0.52983621494599, 0.54392829322042, 0.53636363636364] ]; foreach($array as &$arr){ rsort($arr); $start = $arr[0] == 1 ? 1 : 0; $arr = array_slice($arr,$start,3); } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 20
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/pUhic
function name:  (null)
number of ops:  25
compiled vars:  !0 = $array, !1 = $arr, !2 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1      > FE_RESET_RW                                      $4      !0, ->20
          2    > > FE_FETCH_RW                                              $4, !1, ->20
    9     3    >   INIT_FCALL                                               'rsort'
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   10     6        FETCH_DIM_R                                      ~6      !1, 0
          7        IS_EQUAL                                                 ~6, 1
          8      > JMPZ                                                     ~7, ->11
          9    >   QM_ASSIGN                                        ~8      1
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~8      0
         12    >   ASSIGN                                                   !2, ~8
   11    13        INIT_FCALL                                               'array_slice'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 3
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !1, $10
    8    19      > JMP                                                      ->2
         20    >   FE_FREE                                                  $4
   13    21        INIT_FCALL                                               'var_export'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.26 ms | 1012 KiB | 16 Q