3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.76 ms | 1400 KiB | 21 Q