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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.31 ms | 1400 KiB | 23 Q