3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i='4N4P9N7P1N1P2N2P'; preg_match_all('/(\d+)(\w)/',$i,$m,2); foreach($m as $p){$k=$p[1];$o.=($p[2]=='N')?str_repeat('=',$k):str_repeat('- ',(int)($k/2)).($k%2?'-':'');} $a=str_repeat('_',$n=strlen($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 = 35
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 35
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/Sb3TY
function name:  (null)
number of ops:  51
compiled vars:  !0 = $i, !1 = $m, !2 = $p, !3 = $k, !4 = $o, !5 = $a, !6 = $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                                       $9      !1, ->35
          8    > > FE_FETCH_R                                               $9, !2, ->35
          9    >   FETCH_DIM_R                                      ~10     !2, 1
         10        ASSIGN                                                   !3, ~10
         11        FETCH_DIM_R                                      ~12     !2, 2
         12        IS_EQUAL                                                 ~12, 'N'
         13      > JMPZ                                                     ~13, ->20
         14    >   INIT_FCALL                                               'str_repeat'
         15        SEND_VAL                                                 '%3D'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $14     
         18        QM_ASSIGN                                        ~15     $14
         19      > JMP                                                      ->33
         20    >   INIT_FCALL                                               'str_repeat'
         21        SEND_VAL                                                 '-+'
         22        DIV                                              ~16     !3, 2
         23        CAST                                          4  ~17     ~16
         24        SEND_VAL                                                 ~17
         25        DO_ICALL                                         $18     
         26        MOD                                              ~19     !3, 2
         27      > JMPZ                                                     ~19, ->30
         28    >   QM_ASSIGN                                        ~20     '-'
         29      > JMP                                                      ->31
         30    >   QM_ASSIGN                                        ~20     ''
         31    >   CONCAT                                           ~21     $18, ~20
         32        QM_ASSIGN                                        ~15     ~21
         33    >   ASSIGN_OP                                     8          !4, ~15
         34      > JMP                                                      ->8
         35    >   FE_FREE                                                  $9
    6    36        INIT_FCALL                                               'str_repeat'
         37        SEND_VAL                                                 '_'
         38        STRLEN                                           ~23     !4
         39        ASSIGN                                           ~24     !6, ~23
         40        SEND_VAL                                                 ~24
         41        DO_ICALL                                         $25     
         42        ASSIGN                                                   !5, $25
    7    43        ROPE_INIT                                     6  ~28     !5
         44        ROPE_ADD                                      1  ~28     ~28, '%0A%0A%0A'
         45        ROPE_ADD                                      2  ~28     ~28, !4
         46        ROPE_ADD                                      3  ~28     ~28, '%0A%0A'
         47        ROPE_ADD                                      4  ~28     ~28, !5
         48        ROPE_END                                      5  ~27     ~28, '%0A'
         49        ECHO                                                     ~27
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.01 ms | 1400 KiB | 17 Q