3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cert_splitwrapped_print($customtext, $left_margin, $face, $fontsize, $height, $max_lines, $mode = 'html') { $mode = strtolower($mode); if ($mode != 'html'){ $mode = 'plaintext'; } $ary_customtext = preg_split('/$\R?^/m', trim($customtext)); //only allow 3 lines for this cert, it allows some html codes specified in for ($i = 0;$i < $max_lines;++$i, $height+= $fontsize) { if (isset($ary_customtext[$i])) { $text = utf8_decode(preg_replace('/(\r|\n)/', '', $ary_customtext[$i])); cert_printtext($left_margin, $height, 'C', $face, '', 20, ''); if ($mode == 'html'){ $pdf->SetLeftMargin($left_margin); $pdf->WriteHTML($text); }else if ($mode == 'plaintext'){ cert_printtext($left_margin, $height, 'C', $face, '', $fontsize, $text); } } } return array('mode'=>$mode, 'last_height'=>$height, 'lines_printed'=>$i); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J2OL9
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E > > RETURN                                                   1

Function cert_splitwrapped_print:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
2 jumps found. (Code = 44) Position 1 = 69, Position 2 = 24
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 65
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 54
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 44) Position 1 = 69, Position 2 = 24
Branch analysis from position: 69
Branch analysis from position: 24
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 65
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 69, Position 2 = 24
Branch analysis from position: 69
Branch analysis from position: 24
Branch analysis from position: 65
Branch analysis from position: 65
Branch analysis from position: 14
filename:       /in/J2OL9
function name:  cert_splitwrapped_print
number of ops:  74
compiled vars:  !0 = $customtext, !1 = $left_margin, !2 = $face, !3 = $fontsize, !4 = $height, !5 = $max_lines, !6 = $mode, !7 = $ary_customtext, !8 = $i, !9 = $text, !10 = $pdf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
          6        RECV_INIT                                        !6      'html'
    5     7        INIT_FCALL                                               'strtolower'
          8        SEND_VAR                                                 !6
          9        DO_ICALL                                         $11     
         10        ASSIGN                                                   !6, $11
    6    11        IS_NOT_EQUAL                                             !6, 'html'
         12      > JMPZ                                                     ~13, ->14
    7    13    >   ASSIGN                                                   !6, 'plaintext'
    9    14    >   INIT_FCALL                                               'preg_split'
         15        SEND_VAL                                                 '%2F%24%5CR%3F%5E%2Fm'
         16        INIT_FCALL                                               'trim'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $15     
         19        SEND_VAR                                                 $15
         20        DO_ICALL                                         $16     
         21        ASSIGN                                                   !7, $16
   11    22        ASSIGN                                                   !8, 0
         23      > JMP                                                      ->67
   12    24    >   ISSET_ISEMPTY_DIM_OBJ                         0          !7, !8
         25      > JMPZ                                                     ~19, ->65
   13    26    >   INIT_FCALL                                               'utf8_decode'
         27        INIT_FCALL                                               'preg_replace'
         28        SEND_VAL                                                 '%2F%28%5Cr%7C%5Cn%29%2F'
         29        SEND_VAL                                                 ''
         30        FETCH_DIM_R                                      ~20     !7, !8
         31        SEND_VAL                                                 ~20
         32        DO_ICALL                                         $21     
         33        SEND_VAR                                                 $21
         34        DO_ICALL                                         $22     
         35        ASSIGN                                                   !9, $22
   14    36        INIT_FCALL_BY_NAME                                       'cert_printtext'
         37        SEND_VAR_EX                                              !1
         38        SEND_VAR_EX                                              !4
         39        SEND_VAL_EX                                              'C'
         40        SEND_VAR_EX                                              !2
         41        SEND_VAL_EX                                              ''
         42        SEND_VAL_EX                                              20
         43        SEND_VAL_EX                                              ''
         44        DO_FCALL                                      0          
   15    45        IS_EQUAL                                                 !6, 'html'
         46      > JMPZ                                                     ~25, ->54
   16    47    >   INIT_METHOD_CALL                                         !10, 'SetLeftMargin'
         48        SEND_VAR_EX                                              !1
         49        DO_FCALL                                      0          
   17    50        INIT_METHOD_CALL                                         !10, 'WriteHTML'
         51        SEND_VAR_EX                                              !9
         52        DO_FCALL                                      0          
         53      > JMP                                                      ->65
   18    54    >   IS_EQUAL                                                 !6, 'plaintext'
         55      > JMPZ                                                     ~28, ->65
   19    56    >   INIT_FCALL_BY_NAME                                       'cert_printtext'
         57        SEND_VAR_EX                                              !1
         58        SEND_VAR_EX                                              !4
         59        SEND_VAL_EX                                              'C'
         60        SEND_VAR_EX                                              !2
         61        SEND_VAL_EX                                              ''
         62        SEND_VAR_EX                                              !3
         63        SEND_VAR_EX                                              !9
         64        DO_FCALL                                      0          
   11    65    >   PRE_INC                                                  !8
         66        ASSIGN_OP                                     1          !4, !3
         67    >   IS_SMALLER                                               !8, !5
         68      > JMPNZ                                                    ~32, ->24
   23    69    >   INIT_ARRAY                                       ~33     !6, 'mode'
         70        ADD_ARRAY_ELEMENT                                ~33     !4, 'last_height'
         71        ADD_ARRAY_ELEMENT                                ~33     !8, 'lines_printed'
         72      > RETURN                                                   ~33
   24    73*     > RETURN                                                   null

End of function cert_splitwrapped_print

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.69 ms | 1396 KiB | 23 Q