3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $AkaraB=3; $BkaraA=4; $AkaraBnoZikan=2; $BkaraAnoZikan=3; $AbinString='1 5 7'; $BbinString='3 8 12 13'; $ouhuku = 0; $Abin = explode(' ', $AbinString); $Bbin = explode(' ', $BbinString); $now = 0; $end = false; while(true) { foreach ($Abin as $key => $value) { if($now <= $value){ $now = $value; $Abin = array_slice($Abin,$key+=1); break; }else { $end = true; } } if($end) break; $now += $AkaraBnoZikan; if ($now > 24) break; foreach ($Bbin as $key => $value) { if($now <= $value) { $now = $value; $Bbin = array_slice($Bbin, $key+=1); break; }else { $end =true; } } if($end) break; $now += $BkaraAnoZikan; if ($now > 24) break; $ouhuku++; } echo $ouhuku . "\n";
based on 1Ble2
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 69
Branch analysis from position: 69
Jump found. Position 1 = 70, Position 2 = 20
Branch analysis from position: 70
Jump found. Position 1 = -2
Branch analysis from position: 20
Jump found. Position 1 = 21, Position 2 = 37
Branch analysis from position: 21
Jump found. Position 1 = 22, Position 2 = 37
Branch analysis from position: 22
Jump found. Position 1 = 25, Position 2 = 34
Branch analysis from position: 25
Jump found. Position 1 = 37
Branch analysis from position: 37
Jump found. Position 1 = 39, Position 2 = 40
Branch analysis from position: 39
Jump found. Position 1 = 70
Branch analysis from position: 70
Branch analysis from position: 40
Jump found. Position 1 = 43, Position 2 = 44
Branch analysis from position: 43
Jump found. Position 1 = 70
Branch analysis from position: 70
Branch analysis from position: 44
Jump found. Position 1 = 45, Position 2 = 60
Branch analysis from position: 45
Jump found. Position 1 = 46, Position 2 = 60
Branch analysis from position: 46
Jump found. Position 1 = 49, Position 2 = 58
Branch analysis from position: 49
Jump found. Position 1 = 60
Branch analysis from position: 60
Jump found. Position 1 = 62, Position 2 = 63
Branch analysis from position: 62
Jump found. Position 1 = 70
Branch analysis from position: 70
Branch analysis from position: 63
Jump found. Position 1 = 66, Position 2 = 67
Branch analysis from position: 66
Jump found. Position 1 = 70
Branch analysis from position: 70
Branch analysis from position: 67
Jump found. Position 1 = 70, Position 2 = 20
Branch analysis from position: 70
Branch analysis from position: 20
Branch analysis from position: 58
Jump found. Position 1 = 45
Branch analysis from position: 45
Branch analysis from position: 60
Branch analysis from position: 60
Branch analysis from position: 34
Jump found. Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 37
Branch analysis from position: 37
filename:       /in/BMQk7
function name:  (null)
number of ops:  73
compiled vars:  !0 = $AkaraB, !1 = $BkaraA, !2 = $AkaraBnoZikan, !3 = $BkaraAnoZikan, !4 = $AbinString, !5 = $BbinString, !6 = $ouhuku, !7 = $Abin, !8 = $Bbin, !9 = $now, !10 = $end, !11 = $value, !12 = $key
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, 3
   3     1        ASSIGN                                                   !1, 4
   4     2        ASSIGN                                                   !2, 2
   5     3        ASSIGN                                                   !3, 3
   6     4        ASSIGN                                                   !4, '1+5+7'
   7     5        ASSIGN                                                   !5, '3+8+12+13'
   9     6        ASSIGN                                                   !6, 0
  10     7        INIT_FCALL                                               'explode'
         8        SEND_VAL                                                 '+'
         9        SEND_VAR                                                 !4
        10        DO_ICALL                                         $20     
        11        ASSIGN                                                   !7, $20
  11    12        INIT_FCALL                                               'explode'
        13        SEND_VAL                                                 '+'
        14        SEND_VAR                                                 !5
        15        DO_ICALL                                         $22     
        16        ASSIGN                                                   !8, $22
  12    17        ASSIGN                                                   !9, 0
  13    18        ASSIGN                                                   !10, <false>
  14    19      > JMP                                                      ->69
  16    20    > > FE_RESET_R                                       $26     !7, ->37
        21    > > FE_FETCH_R                                       ~27     $26, !11, ->37
        22    >   ASSIGN                                                   !12, ~27
  17    23        IS_SMALLER_OR_EQUAL                              ~29     !9, !11
        24      > JMPZ                                                     ~29, ->34
  18    25    >   ASSIGN                                                   !9, !11
  19    26        INIT_FCALL                                               'array_slice'
        27        SEND_VAR                                                 !7
        28        ASSIGN_ADD                                    0  $31     !12, 1
        29        SEND_VAR                                                 $31
        30        DO_ICALL                                         $32     
        31        ASSIGN                                                   !7, $32
  20    32      > JMP                                                      ->37
        33*       JMP                                                      ->36
  22    34    >   FETCH_CONSTANT                                   ~34     '%E3%80%80true'
        35        ASSIGN                                                   !10, ~34
        36      > JMP                                                      ->21
        37    >   FE_FREE                                                  $26
  25    38      > JMPZ                                                     !10, ->40
        39    > > JMP                                                      ->70
  26    40    >   ASSIGN_ADD                                    0          !9, !2
  27    41        IS_SMALLER                                       ~37     24, !9
        42      > JMPZ                                                     ~37, ->44
        43    > > JMP                                                      ->70
  29    44    > > FE_RESET_R                                       $38     !8, ->60
        45    > > FE_FETCH_R                                               $38, !11, ->60
        46    >   ASSIGN                                                   !12, ~39
  30    47        IS_SMALLER_OR_EQUAL                              ~41     !9, !11
        48      > JMPZ                                                     ~41, ->58
  31    49    >   ASSIGN                                                   !9, !11
  32    50        INIT_FCALL                                               'array_slice'
        51        SEND_VAR                                                 !8
        52        ASSIGN_ADD                                    0  $43     !12, 1
        53        SEND_VAR                                                 $43
        54        DO_ICALL                                         $44     
        55        ASSIGN                                                   !8, $44
  33    56      > JMP                                                      ->60
        57*       JMP                                                      ->59
  35    58    >   ASSIGN                                                   !10, <true>
        59      > JMP                                                      ->45
        60    >   FE_FREE                                                  $38
  38    61      > JMPZ                                                     !10, ->63
        62    > > JMP                                                      ->70
  39    63    >   ASSIGN_ADD                                    0          !9, !3
  40    64        IS_SMALLER                                       ~48     24, !9
        65      > JMPZ                                                     ~48, ->67
        66    > > JMP                                                      ->70
  41    67    >   POST_INC                                         ~49     !6
        68        FREE                                                     ~49
  14    69    > > JMPNZ                                                    <true>, ->20
  45    70    >   CONCAT                                           ~50     !6, '%0A'
        71        ECHO                                                     ~50
        72      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.1.0