3v4l.org

run code in 300+ PHP versions simultaneously
<?php $countedZero = 0; $totalGen = 10000; for ($i = 1; $i <= $totalGen; $i++) { $rand = random_int(-9223372036854775808, 9223372036854775807); if ($rand == 0) { $countedZero++; } } echo "0 was generated " . $countedZero . "/" . $totalGen . " times which is " . (($countedZero / $totalGen) * 100) . "%." ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
Branch analysis from position: 12
filename:       /in/76aEH
function name:  (null)
number of ops:  25
compiled vars:  !0 = $countedZero, !1 = $totalGen, !2 = $i, !3 = $rand
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, 10000
    5     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->13
    6     4    >   INIT_FCALL                                               'random_int'
          5        SEND_VAL                                                 -9.22337e+18
          6        SEND_VAL                                                 9223372036854775807
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    8     9        IS_EQUAL                                                 !3, 0
         10      > JMPZ                                                     ~9, ->12
    9    11    >   PRE_INC                                                  !0
    5    12    >   PRE_INC                                                  !2
         13    >   IS_SMALLER_OR_EQUAL                                      !2, !1
         14      > JMPNZ                                                    ~12, ->4
   12    15    >   CONCAT                                           ~13     '0+was+generated+', !0
         16        CONCAT                                           ~14     ~13, '%2F'
         17        CONCAT                                           ~15     ~14, !1
         18        CONCAT                                           ~16     ~15, '+times+which+is+'
         19        DIV                                              ~17     !0, !1
         20        MUL                                              ~18     ~17, 100
         21        CONCAT                                           ~19     ~16, ~18
         22        CONCAT                                           ~20     ~19, '%25.'
         23        ECHO                                                     ~20
   13    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
252.59 ms | 1002 KiB | 15 Q