3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Players are (4): nana, nini, nunu, nono'; $str1 = 'nunu: (JH)'; $str2 = 'Bot draws - nana: (JH) Bot draws - nini: (JH) Bot draws - nunu: (JH) Bot draws - nono: (JH)'; $pplayer = preg_match("#^Players are ?(\((.*)\):)? (.*)$#i", $str, $pp); $player = array_map('trim', explode(',', $pp[3])); while (list(, $value) = each($player)) { var_dump($value); } $endplayer = end($player); $sisaplayer = $pp[2]; $ppkartu = preg_match("#^([a-z0-9\-\._:]+) ?(\((.*)\))?$#i", $str1, $pk); $pkartu = $pk[2]; while (list(, $values) = each($pkartu)) { var_dump($values); } $pbdraw = preg_match('#^Bot draws - ([a-z0-9\-\._]+)\: ?(\((.*)\))?$#i', $str2, $pb); $pbplayer = $pb; $pbkartu = $pb[2];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 20
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 44
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 44
Branch analysis from position: 53
Branch analysis from position: 44
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 20
Branch analysis from position: 29
Branch analysis from position: 20
filename:       /in/pct8a
function name:  (null)
number of ops:  63
compiled vars:  !0 = $str, !1 = $str1, !2 = $str2, !3 = $pplayer, !4 = $pp, !5 = $player, !6 = $value, !7 = $endplayer, !8 = $sisaplayer, !9 = $ppkartu, !10 = $pk, !11 = $pkartu, !12 = $values, !13 = $pbdraw, !14 = $pb, !15 = $pbplayer, !16 = $pbkartu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Players+are+%284%29%3A+nana%2C+nini%2C+nunu%2C+nono'
    3     1        ASSIGN                                                   !1, 'nunu%3A+%28JH%29'
    4     2        ASSIGN                                                   !2, 'Bot+draws+-+nana%3A+%28JH%29+Bot+draws+-+nini%3A+%28JH%29+Bot+draws+-+nunu%3A+%28JH%29+Bot+draws+-+nono%3A+%28JH%29'
    5     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%23%5EPlayers+are+%3F%28%5C%28%28.%2A%29%5C%29%3A%29%3F+%28.%2A%29%24%23i'
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !4
          7        DO_ICALL                                         $20     
          8        ASSIGN                                                   !3, $20
    6     9        INIT_FCALL                                               'array_map'
         10        SEND_VAL                                                 'trim'
         11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '%2C'
         13        FETCH_DIM_R                                      ~22     !4, 3
         14        SEND_VAL                                                 ~22
         15        DO_ICALL                                         $23     
         16        SEND_VAR                                                 $23
         17        DO_ICALL                                         $24     
         18        ASSIGN                                                   !5, $24
    7    19      > JMP                                                      ->23
    8    20    >   INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !6
         22        DO_ICALL                                                 
    7    23    >   INIT_FCALL_BY_NAME                                       'each'
         24        SEND_VAR_EX                                              !5
         25        DO_FCALL                                      0  $27     
         26        FETCH_LIST_R                                     $28     $27, 1
         27        ASSIGN                                                   !6, $28
         28      > JMPNZ                                                    $27, ->20
   10    29    >   INIT_FCALL                                               'end'
         30        SEND_REF                                                 !5
         31        DO_ICALL                                         $30     
         32        ASSIGN                                                   !7, $30
   11    33        FETCH_DIM_R                                      ~32     !4, 2
         34        ASSIGN                                                   !8, ~32
   12    35        INIT_FCALL                                               'preg_match'
         36        SEND_VAL                                                 '%23%5E%28%5Ba-z0-9%5C-%5C._%3A%5D%2B%29+%3F%28%5C%28%28.%2A%29%5C%29%29%3F%24%23i'
         37        SEND_VAR                                                 !1
         38        SEND_REF                                                 !10
         39        DO_ICALL                                         $34     
         40        ASSIGN                                                   !9, $34
   13    41        FETCH_DIM_R                                      ~36     !10, 2
         42        ASSIGN                                                   !11, ~36
   14    43      > JMP                                                      ->47
   15    44    >   INIT_FCALL                                               'var_dump'
         45        SEND_VAR                                                 !12
         46        DO_ICALL                                                 
   14    47    >   INIT_FCALL_BY_NAME                                       'each'
         48        SEND_VAR_EX                                              !11
         49        DO_FCALL                                      0  $39     
         50        FETCH_LIST_R                                     $40     $39, 1
         51        ASSIGN                                                   !12, $40
         52      > JMPNZ                                                    $39, ->44
   17    53    >   INIT_FCALL                                               'preg_match'
         54        SEND_VAL                                                 '%23%5EBot+draws+-+%28%5Ba-z0-9%5C-%5C._%5D%2B%29%5C%3A+%3F%28%5C%28%28.%2A%29%5C%29%29%3F%24%23i'
         55        SEND_VAR                                                 !2
         56        SEND_REF                                                 !14
         57        DO_ICALL                                         $42     
         58        ASSIGN                                                   !13, $42
   18    59        ASSIGN                                                   !15, !14
   19    60        FETCH_DIM_R                                      ~45     !14, 2
         61        ASSIGN                                                   !16, ~45
         62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.34 ms | 1400 KiB | 26 Q