3v4l.org

run code in 300+ PHP versions simultaneously
<?php $flipCount = 0; do { $flip = rand(0,1); $flipCount ++; if ($flip){ echo "<div class=\"coin\">H</div>"; } else { echo "<div class=\"coin\">T</div>"; } } while ($flip); $verb = "were"; $last = "flips"; if ($flipCount == 1) { $verb = "was"; $last = "flip"; } echo "<p>There {$verb} {$flipCount} {$last}!</p>"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 1
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 1
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 1
Branch analysis from position: 12
Branch analysis from position: 1
filename:       /in/BjGE1
function name:  (null)
number of ops:  27
compiled vars:  !0 = $flipCount, !1 = $flip, !2 = $verb, !3 = $last
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    4     1    >   INIT_FCALL                                               'rand'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        PRE_INC                                                  !0
    6     7      > JMPZ                                                     !1, ->10
    7     8    >   ECHO                                                     '%3Cdiv+class%3D%22coin%22%3EH%3C%2Fdiv%3E'
          9      > JMP                                                      ->11
   10    10    >   ECHO                                                     '%3Cdiv+class%3D%22coin%22%3ET%3C%2Fdiv%3E'
   12    11    > > JMPNZ                                                    !1, ->1
   13    12    >   ASSIGN                                                   !2, 'were'
   14    13        ASSIGN                                                   !3, 'flips'
   15    14        IS_EQUAL                                                 !0, 1
         15      > JMPZ                                                     ~10, ->18
   16    16    >   ASSIGN                                                   !2, 'was'
   17    17        ASSIGN                                                   !3, 'flip'
   19    18    >   ROPE_INIT                                     7  ~14     '%3Cp%3EThere+'
         19        ROPE_ADD                                      1  ~14     ~14, !2
         20        ROPE_ADD                                      2  ~14     ~14, '+'
         21        ROPE_ADD                                      3  ~14     ~14, !0
         22        ROPE_ADD                                      4  ~14     ~14, '+'
         23        ROPE_ADD                                      5  ~14     ~14, !3
         24        ROPE_END                                      6  ~13     ~14, '%21%3C%2Fp%3E'
         25        ECHO                                                     ~13
   20    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.2 ms | 1396 KiB | 15 Q