3v4l.org

run code in 300+ PHP versions simultaneously
<?php $argv[1]=$i='4N4P9N7P1N1P2N2P'; preg_match_all('/(\d+)(\w)/',$argv[1],$m,2); //$o='';foreach($m as $p)$o.=str_repeat($p[2]=='N'?'=':'-',$p[1]); $o='';foreach($m as list($p,$n,$c))$o.=str_pad('',$n,$c=='N'?'=':'-'); $a=preg_replace('/./','_',$o=str_replace('--','- ',$o)); echo("$a\n\n\n$o\n\n$a\n");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 32
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 32
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/QjXtq
function name:  (null)
number of ops:  53
compiled vars:  !0 = $argv, !1 = $i, !2 = $m, !3 = $o, !4 = $p, !5 = $n, !6 = $c, !7 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                           ~9      !1, '4N4P9N7P1N1P2N2P'
          1        ASSIGN_DIM                                               !0, 1
          2        OP_DATA                                                  ~9
    4     3        INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%2F%28%5Cd%2B%29%28%5Cw%29%2F'
          5        FETCH_DIM_R                                      ~10     !0, 1
          6        SEND_VAL                                                 ~10
          7        SEND_REF                                                 !2
          8        SEND_VAL                                                 2
          9        DO_ICALL                                                 
    6    10        ASSIGN                                                   !3, ''
         11      > FE_RESET_R                                       $13     !2, ->32
         12    > > FE_FETCH_R                                               $13, $14, ->32
         13    >   FETCH_LIST_R                                     $15     $14, 0
         14        ASSIGN                                                   !4, $15
         15        FETCH_LIST_R                                     $17     $14, 1
         16        ASSIGN                                                   !5, $17
         17        FETCH_LIST_R                                     $19     $14, 2
         18        ASSIGN                                                   !6, $19
         19        FREE                                                     $14
         20        INIT_FCALL                                               'str_pad'
         21        SEND_VAL                                                 ''
         22        SEND_VAR                                                 !5
         23        IS_EQUAL                                                 !6, 'N'
         24      > JMPZ                                                     ~21, ->27
         25    >   QM_ASSIGN                                        ~22     '%3D'
         26      > JMP                                                      ->28
         27    >   QM_ASSIGN                                        ~22     '-'
         28    >   SEND_VAL                                                 ~22
         29        DO_ICALL                                         $23     
         30        ASSIGN_OP                                     8          !3, $23
         31      > JMP                                                      ->12
         32    >   FE_FREE                                                  $13
    7    33        INIT_FCALL                                               'preg_replace'
         34        SEND_VAL                                                 '%2F.%2F'
         35        SEND_VAL                                                 '_'
         36        INIT_FCALL                                               'str_replace'
         37        SEND_VAL                                                 '--'
         38        SEND_VAL                                                 '-+'
         39        SEND_VAR                                                 !3
         40        DO_ICALL                                         $25     
         41        ASSIGN                                           ~26     !3, $25
         42        SEND_VAL                                                 ~26
         43        DO_ICALL                                         $27     
         44        ASSIGN                                                   !7, $27
    8    45        ROPE_INIT                                     6  ~30     !7
         46        ROPE_ADD                                      1  ~30     ~30, '%0A%0A%0A'
         47        ROPE_ADD                                      2  ~30     ~30, !3
         48        ROPE_ADD                                      3  ~30     ~30, '%0A%0A'
         49        ROPE_ADD                                      4  ~30     ~30, !7
         50        ROPE_END                                      5  ~29     ~30, '%0A'
         51        ECHO                                                     ~29
         52      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.4 ms | 1400 KiB | 21 Q