3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = $j = 0; $b = rand(1, 100); while($i++ < 10000) { $a = rand(1, 100); if(abs($a - $b) <= 1) { $j++; } } print "{$j} von {$i}"."\n"; print round(($j/$i)*100, 2)."%";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 8
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 8
Branch analysis from position: 23
Branch analysis from position: 8
Branch analysis from position: 20
filename:       /in/2OqAd
function name:  (null)
number of ops:  37
compiled vars:  !0 = $i, !1 = $j, !2 = $b, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                           ~4      !1, 0
          1        ASSIGN                                                   !0, ~4
    4     2        INIT_FCALL                                               'rand'
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 100
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    6     7      > JMP                                                      ->20
    7     8    >   INIT_FCALL                                               'rand'
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 100
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !3, $8
    9    13        INIT_FCALL                                               'abs'
         14        SUB                                              ~10     !3, !2
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $11     
         17        IS_SMALLER_OR_EQUAL                                      $11, 1
         18      > JMPZ                                                     ~12, ->20
   10    19    >   PRE_INC                                                  !1
    6    20    >   POST_INC                                         ~14     !0
         21        IS_SMALLER                                               ~14, 10000
         22      > JMPNZ                                                    ~15, ->8
   14    23    >   ROPE_INIT                                     3  ~17     !1
         24        ROPE_ADD                                      1  ~17     ~17, '+von+'
         25        ROPE_END                                      2  ~16     ~17, !0
         26        CONCAT                                           ~19     ~16, '%0A'
         27        ECHO                                                     ~19
   15    28        INIT_FCALL                                               'round'
         29        DIV                                              ~20     !1, !0
         30        MUL                                              ~21     ~20, 100
         31        SEND_VAL                                                 ~21
         32        SEND_VAL                                                 2
         33        DO_ICALL                                         $22     
         34        CONCAT                                           ~23     $22, '%25'
         35        ECHO                                                     ~23
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.52 ms | 1388 KiB | 19 Q