3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0; $attackCount = 1000000; for($i = 0; $i < $attackCount; $i++) { $a1 = [rand(1,6), rand(1,6), rand(1,6)]; arsort($a1); $b1 = [rand(1,6), rand(1,6)]; arsort($b1); $a += $a1[0] > $b1[0]; $a += $a1[1] > $b1[1]; } var_dump($a / $attackCount);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 4
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 4
Branch analysis from position: 48
Branch analysis from position: 4
filename:       /in/PZI3l
function name:  (null)
number of ops:  53
compiled vars:  !0 = $a, !1 = $attackCount, !2 = $i, !3 = $a1, !4 = $b1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, 1000000
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->46
    6     4    >   INIT_FCALL                                               'rand'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 6
          7        DO_ICALL                                         $8      
          8        INIT_ARRAY                                       ~9      $8
          9        INIT_FCALL                                               'rand'
         10        SEND_VAL                                                 1
         11        SEND_VAL                                                 6
         12        DO_ICALL                                         $10     
         13        ADD_ARRAY_ELEMENT                                ~9      $10
         14        INIT_FCALL                                               'rand'
         15        SEND_VAL                                                 1
         16        SEND_VAL                                                 6
         17        DO_ICALL                                         $11     
         18        ADD_ARRAY_ELEMENT                                ~9      $11
         19        ASSIGN                                                   !3, ~9
    7    20        INIT_FCALL                                               'arsort'
         21        SEND_REF                                                 !3
         22        DO_ICALL                                                 
    8    23        INIT_FCALL                                               'rand'
         24        SEND_VAL                                                 1
         25        SEND_VAL                                                 6
         26        DO_ICALL                                         $14     
         27        INIT_ARRAY                                       ~15     $14
         28        INIT_FCALL                                               'rand'
         29        SEND_VAL                                                 1
         30        SEND_VAL                                                 6
         31        DO_ICALL                                         $16     
         32        ADD_ARRAY_ELEMENT                                ~15     $16
         33        ASSIGN                                                   !4, ~15
    9    34        INIT_FCALL                                               'arsort'
         35        SEND_REF                                                 !4
         36        DO_ICALL                                                 
   10    37        FETCH_DIM_R                                      ~19     !3, 0
         38        FETCH_DIM_R                                      ~20     !4, 0
         39        IS_SMALLER                                       ~21     ~20, ~19
         40        ASSIGN_OP                                     1          !0, ~21
   11    41        FETCH_DIM_R                                      ~23     !3, 1
         42        FETCH_DIM_R                                      ~24     !4, 1
         43        IS_SMALLER                                       ~25     ~24, ~23
         44        ASSIGN_OP                                     1          !0, ~25
    4    45        PRE_INC                                                  !2
         46    >   IS_SMALLER                                               !2, !1
         47      > JMPNZ                                                    ~28, ->4
   13    48    >   INIT_FCALL                                               'var_dump'
         49        DIV                                              ~29     !0, !1
         50        SEND_VAL                                                 ~29
         51        DO_ICALL                                                 
         52      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.15 ms | 1400 KiB | 19 Q