3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.08 ms | 1400 KiB | 19 Q