3v4l.org

run code in 300+ PHP versions simultaneously
<?php $diagnoses = ['Здоров', 'ОРЗ', 'ОРВИ']; $diagnosisNumber = array_rand($diagnoses); $diagnosis = $diagnoses[$diagnosisNumber]; if ($diagnosisNumber) { if (rand(1,100) === 42) {//Jackpot $diagnosis .= ' + Больничный на 2 дня!'; } } echo $diagnosis; echo '';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 15
filename:       /in/3g1hn
function name:  (null)
number of ops:  18
compiled vars:  !0 = $diagnoses, !1 = $diagnosisNumber, !2 = $diagnosis
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_rand'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    5     5        FETCH_DIM_R                                      ~6      !0, !1
          6        ASSIGN                                                   !2, ~6
    6     7      > JMPZ                                                     !1, ->15
    7     8    >   INIT_FCALL                                               'rand'
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 100
         11        DO_ICALL                                         $8      
         12        IS_IDENTICAL                                             $8, 42
         13      > JMPZ                                                     ~9, ->15
    8    14    >   ASSIGN_OP                                     8          !2, '+%2B+%D0%91%D0%BE%D0%BB%D1%8C%D0%BD%D0%B8%D1%87%D0%BD%D1%8B%D0%B9+%D0%BD%D0%B0+2+%D0%B4%D0%BD%D1%8F%21'
   11    15    >   ECHO                                                     !2
   13    16        ECHO                                                     ''
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.79 ms | 1395 KiB | 17 Q