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])); list($player1, $player2, $player3, $player4, $player5) = each($player); $endplayer = end($player); $sisaplayer = $pp[2]; $ppkartu = preg_match("#^([a-z0-9\-\._:]+) ?(\((.*)\))?$#i", $str1, $pk); $pkartu = $pk[2]; $pbdraw = preg_match('#^Bot draws - '.$player[0].': ?(\((.*)\))?$#i', $str2, $pb); $pbplayer = $pb; $pbkartu = $pb[2]; print_r($player);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/93kTN
function name:  (null)
number of ops:  63
compiled vars:  !0 = $str, !1 = $str1, !2 = $str2, !3 = $pplayer, !4 = $pp, !5 = $player, !6 = $player1, !7 = $player2, !8 = $player3, !9 = $player4, !10 = $player5, !11 = $endplayer, !12 = $sisaplayer, !13 = $ppkartu, !14 = $pk, !15 = $pkartu, !16 = $pbdraw, !17 = $pb, !18 = $pbplayer, !19 = $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                                         $23     
          8        ASSIGN                                                   !3, $23
    6     9        INIT_FCALL                                               'array_map'
         10        SEND_VAL                                                 'trim'
         11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '%2C'
         13        FETCH_DIM_R                                      ~25     !4, 3
         14        SEND_VAL                                                 ~25
         15        DO_ICALL                                         $26     
         16        SEND_VAR                                                 $26
         17        DO_ICALL                                         $27     
         18        ASSIGN                                                   !5, $27
    7    19        INIT_FCALL_BY_NAME                                       'each'
         20        SEND_VAR_EX                                              !5
         21        DO_FCALL                                      0  $29     
         22        FETCH_LIST_R                                     $30     $29, 0
         23        ASSIGN                                                   !6, $30
         24        FETCH_LIST_R                                     $32     $29, 1
         25        ASSIGN                                                   !7, $32
         26        FETCH_LIST_R                                     $34     $29, 2
         27        ASSIGN                                                   !8, $34
         28        FETCH_LIST_R                                     $36     $29, 3
         29        ASSIGN                                                   !9, $36
         30        FETCH_LIST_R                                     $38     $29, 4
         31        ASSIGN                                                   !10, $38
         32        FREE                                                     $29
    8    33        INIT_FCALL                                               'end'
         34        SEND_REF                                                 !5
         35        DO_ICALL                                         $40     
         36        ASSIGN                                                   !11, $40
    9    37        FETCH_DIM_R                                      ~42     !4, 2
         38        ASSIGN                                                   !12, ~42
   10    39        INIT_FCALL                                               'preg_match'
         40        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'
         41        SEND_VAR                                                 !1
         42        SEND_REF                                                 !14
         43        DO_ICALL                                         $44     
         44        ASSIGN                                                   !13, $44
   11    45        FETCH_DIM_R                                      ~46     !14, 2
         46        ASSIGN                                                   !15, ~46
   12    47        INIT_FCALL                                               'preg_match'
         48        FETCH_DIM_R                                      ~48     !5, 0
         49        CONCAT                                           ~49     '%23%5EBot+draws+-+', ~48
         50        CONCAT                                           ~50     ~49, '%3A+%3F%28%5C%28%28.%2A%29%5C%29%29%3F%24%23i'
         51        SEND_VAL                                                 ~50
         52        SEND_VAR                                                 !2
         53        SEND_REF                                                 !17
         54        DO_ICALL                                         $51     
         55        ASSIGN                                                   !16, $51
   13    56        ASSIGN                                                   !18, !17
   14    57        FETCH_DIM_R                                      ~54     !17, 2
         58        ASSIGN                                                   !19, ~54
   15    59        INIT_FCALL                                               'print_r'
         60        SEND_VAR                                                 !5
         61        DO_ICALL                                                 
         62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.87 ms | 1400 KiB | 23 Q