3v4l.org

run code in 500+ PHP versions simultaneously
<?php defined( 'ABSPATH' ) || exit; $text_align = is_rtl() ? 'right' : 'left'; $present = $_POST['present2']; // полученное скрытое поле которое нужно передать в письмо do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?> <h2> <?php if ( $sent_to_admin ) { $before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">'; $after = '</a>'; } else { $before = ''; $after = ''; } /* translators: %s: Order ID. */ echo wp_kses_post( $before . sprintf( __( '[Order #%s]', 'woocommerce' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) ); ?> </h2> <div style="margin-bottom: 40px;"> <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1"> <thead> <tr> <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th> <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th> <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th> </tr> </thead> <tbody> <?php echo wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $order, array( 'show_sku' => $sent_to_admin, 'show_image' => false, 'image_size' => array( 32, 32 ), 'plain_text' => $plain_text, 'sent_to_admin' => $sent_to_admin, ) ); ?> </tbody> <tfoot> <?php $item_totals = $order->get_order_item_totals(); if ( $item_totals ) { $i = 0; foreach ( $item_totals as $total ) { $i++; ?> <tr> <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['label'] ); ?></th> <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['value'] ); ?></td> </tr> <?php } } if ( $order->get_customer_note() ) { ?> <tr> <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Note:', 'woocommerce' ); ?></th> <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( nl2br( wptexturize( $order->get_customer_note() ) ) ); ?></td> </tr> <?php } ?> </tfoot> </table> </div> <?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 34
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 111, Position 2 = 156
Branch analysis from position: 111
2 jumps found. (Code = 77) Position 1 = 113, Position 2 = 155
Branch analysis from position: 113
2 jumps found. (Code = 78) Position 1 = 114, Position 2 = 155
Branch analysis from position: 114
2 jumps found. (Code = 43) Position 1 = 123, Position 2 = 125
Branch analysis from position: 123
1 jumps found. (Code = 42) Position 1 = 126
Branch analysis from position: 126
2 jumps found. (Code = 43) Position 1 = 142, Position 2 = 144
Branch analysis from position: 142
1 jumps found. (Code = 42) Position 1 = 145
Branch analysis from position: 145
1 jumps found. (Code = 42) Position 1 = 113
Branch analysis from position: 113
Branch analysis from position: 144
1 jumps found. (Code = 42) Position 1 = 113
Branch analysis from position: 113
Branch analysis from position: 125
2 jumps found. (Code = 43) Position 1 = 142, Position 2 = 144
Branch analysis from position: 142
Branch analysis from position: 144
Branch analysis from position: 155
2 jumps found. (Code = 43) Position 1 = 159, Position 2 = 188
Branch analysis from position: 159
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 188
Branch analysis from position: 155
Branch analysis from position: 156
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 111, Position 2 = 156
Branch analysis from position: 111
Branch analysis from position: 156
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 34
Branch analysis from position: 24
Branch analysis from position: 34
filename:       /in/fa2t4
function name:  (null)
number of ops:  197
compiled vars:  !0 = $text_align, !1 = $present, !2 = $order, !3 = $sent_to_admin, !4 = $plain_text, !5 = $email, !6 = $before, !7 = $after, !8 = $item_totals, !9 = $i, !10 = $total
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   DEFINED                                              ~11     'ABSPATH'
          1      > JMPNZ_EX                                             ~11     ~11, ->5
          2    > > INIT_FCALL                                                   'exit'
          3*       DO_ICALL                                             $12     
          4*       BOOL                                                 ~11     $12
    6     5    >   INIT_FCALL_BY_NAME                                           'is_rtl'
          6        DO_FCALL                                          0  $13     
          7      > JMPZ                                                         $13, ->10
          8    >   QM_ASSIGN                                            ~14     'right'
          9      > JMP                                                          ->11
         10    >   QM_ASSIGN                                            ~14     'left'
         11    >   ASSIGN                                                       !0, ~14
    8    12        FETCH_R                          global              ~16     '_POST'
         13        FETCH_DIM_R                                          ~17     ~16, 'present2'
         14        ASSIGN                                                       !1, ~17
   10    15        INIT_FCALL_BY_NAME                                           'do_action'
         16        SEND_VAL_EX                                                  'woocommerce_email_before_order_table'
         17        SEND_VAR_EX                                                  !2
         18        SEND_VAR_EX                                                  !3
         19        SEND_VAR_EX                                                  !4
         20        SEND_VAR_EX                                                  !5
         21        DO_FCALL                                          0          
   11    22        ECHO                                                         '%0A%3Ch2%3E%0A++++'
   14    23      > JMPZ                                                         !3, ->34
   15    24    >   INIT_FCALL_BY_NAME                                           'esc_url'
         25        INIT_METHOD_CALL                                             !2, 'get_edit_order_url'
         26        DO_FCALL                                          0  $20     
         27        SEND_VAR_NO_REF_EX                                           $20
         28        DO_FCALL                                          0  $21     
         29        CONCAT                                               ~22     '%3Ca+class%3D%22link%22+href%3D%22', $21
         30        CONCAT                                               ~23     ~22, '%22%3E'
         31        ASSIGN                                                       !6, ~23
   16    32        ASSIGN                                                       !7, '%3C%2Fa%3E'
   14    33      > JMP                                                          ->36
   18    34    >   ASSIGN                                                       !6, ''
   19    35        ASSIGN                                                       !7, ''
   22    36    >   INIT_FCALL_BY_NAME                                           'wp_kses_post'
         37        INIT_FCALL                                                   'sprintf'
         38        INIT_FCALL_BY_NAME                                           '__'
         39        SEND_VAL_EX                                                  '%5BOrder+%23%25s%5D'
         40        SEND_VAL_EX                                                  'woocommerce'
         41        DO_FCALL                                          0  $28     
         42        CONCAT                                               ~29     $28, !7
         43        CONCAT                                               ~30     ~29, '+%28%3Ctime+datetime%3D%22%25s%22%3E%25s%3C%2Ftime%3E%29'
         44        SEND_VAL                                                     ~30
         45        INIT_METHOD_CALL                                             !2, 'get_order_number'
         46        DO_FCALL                                          0  $31     
         47        SEND_VAR                                                     $31
         48        INIT_METHOD_CALL                                             !2, 'get_date_created'
         49        DO_FCALL                                          0  $32     
         50        INIT_METHOD_CALL                                             $32, 'format'
         51        SEND_VAL_EX                                                  'c'
         52        DO_FCALL                                          0  $33     
         53        SEND_VAR                                                     $33
         54        INIT_FCALL_BY_NAME                                           'wc_format_datetime'
         55        INIT_METHOD_CALL                                             !2, 'get_date_created'
         56        DO_FCALL                                          0  $34     
         57        SEND_VAR_NO_REF_EX                                           $34
         58        DO_FCALL                                          0  $35     
         59        SEND_VAR                                                     $35
         60        DO_ICALL                                             $36     
         61        CONCAT                                               ~37     !6, $36
         62        SEND_VAL_EX                                                  ~37
         63        DO_FCALL                                          0  $38     
         64        ECHO                                                         $38
   24    65        ECHO                                                         '%3C%2Fh2%3E%0A%0A%3Cdiv+style%3D%22margin-bottom%3A+40px%3B%22%3E%0A++++%3Ctable+class%3D%22td%22+cellspacing%3D%220%22+cellpadding%3D%226%22+style%3D%22width%3A+100%25%3B+font-family%3A+%27Helvetica+Neue%27%2C+Helvetica%2C+Roboto%2C+Arial%2C+sans-serif%3B%22+border%3D%221%22%3E%0A++++++++%3Cthead%3E%0A++++++++++++%3Ctr%3E%0A++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22col%22+style%3D%22text-align%3A'
   30    66        INIT_FCALL_BY_NAME                                           'esc_attr'
         67        SEND_VAR_EX                                                  !0
         68        DO_FCALL                                          0  $39     
         69        ECHO                                                         $39
         70        ECHO                                                         '%3B%22%3E'
         71        INIT_FCALL_BY_NAME                                           'esc_html_e'
         72        SEND_VAL_EX                                                  'Product'
         73        SEND_VAL_EX                                                  'woocommerce'
         74        DO_FCALL                                          0          
         75        ECHO                                                         '%3C%2Fth%3E%0A++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22col%22+style%3D%22text-align%3A'
   31    76        INIT_FCALL_BY_NAME                                           'esc_attr'
         77        SEND_VAR_EX                                                  !0
         78        DO_FCALL                                          0  $41     
         79        ECHO                                                         $41
         80        ECHO                                                         '%3B%22%3E'
         81        INIT_FCALL_BY_NAME                                           'esc_html_e'
         82        SEND_VAL_EX                                                  'Quantity'
         83        SEND_VAL_EX                                                  'woocommerce'
         84        DO_FCALL                                          0          
         85        ECHO                                                         '%3C%2Fth%3E%0A++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22col%22+style%3D%22text-align%3A'
   32    86        INIT_FCALL_BY_NAME                                           'esc_attr'
         87        SEND_VAR_EX                                                  !0
         88        DO_FCALL                                          0  $43     
         89        ECHO                                                         $43
         90        ECHO                                                         '%3B%22%3E'
         91        INIT_FCALL_BY_NAME                                           'esc_html_e'
         92        SEND_VAL_EX                                                  'Price'
         93        SEND_VAL_EX                                                  'woocommerce'
         94        DO_FCALL                                          0          
         95        ECHO                                                         '%3C%2Fth%3E%0A++++++++++++%3C%2Ftr%3E%0A++++++++%3C%2Fthead%3E%0A++++++++%3Ctbody%3E%0A++++++++++++'
   37    96        INIT_FCALL_BY_NAME                                           'wc_get_email_order_items'
   38    97        SEND_VAR_EX                                                  !2
   40    98        INIT_ARRAY                                           ~45     !3, 'show_sku'
         99        ADD_ARRAY_ELEMENT                                    ~45     <false>, 'show_image'
        100        ADD_ARRAY_ELEMENT                                    ~45     <array>, 'image_size'
   43   101        ADD_ARRAY_ELEMENT                                    ~45     !4, 'plain_text'
   44   102        ADD_ARRAY_ELEMENT                                    ~45     !3, 'sent_to_admin'
        103        SEND_VAL_EX                                                  ~45
   37   104        DO_FCALL                                          0  $46     
   44   105        ECHO                                                         $46
   48   106        ECHO                                                         '++++++++%3C%2Ftbody%3E%0A++++++++%3Ctfoot%3E%0A++++++++++++'
   51   107        INIT_METHOD_CALL                                             !2, 'get_order_item_totals'
        108        DO_FCALL                                          0  $47     
        109        ASSIGN                                                       !8, $47
   53   110      > JMPZ                                                         !8, ->156
   54   111    >   ASSIGN                                                       !9, 0
   55   112      > FE_RESET_R                                           $50     !8, ->155
        113    > > FE_FETCH_R                                                   $50, !10, ->155
   56   114    >   PRE_INC                                                      !9
   58   115        ECHO                                                         '++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22row%22+colspan%3D%222%22+style%3D%22text-align%3A'
   59   116        INIT_FCALL_BY_NAME                                           'esc_attr'
        117        SEND_VAR_EX                                                  !0
        118        DO_FCALL                                          0  $52     
        119        ECHO                                                         $52
        120        ECHO                                                         '%3B+'
        121        IS_IDENTICAL                                                 !9, 1
        122      > JMPZ                                                         ~53, ->125
        123    >   QM_ASSIGN                                            ~54     'border-top-width%3A+4px%3B'
        124      > JMP                                                          ->126
        125    >   QM_ASSIGN                                            ~54     ''
        126    >   ECHO                                                         ~54
        127        ECHO                                                         '%22%3E'
        128        INIT_FCALL_BY_NAME                                           'wp_kses_post'
        129        CHECK_FUNC_ARG                                               
        130        FETCH_DIM_FUNC_ARG                                   $55     !10, 'label'
        131        SEND_FUNC_ARG                                                $55
        132        DO_FCALL                                          0  $56     
        133        ECHO                                                         $56
        134        ECHO                                                         '%3C%2Fth%3E%0A++++++++++++++++++++++++%3Ctd+class%3D%22td%22+style%3D%22text-align%3A'
   60   135        INIT_FCALL_BY_NAME                                           'esc_attr'
        136        SEND_VAR_EX                                                  !0
        137        DO_FCALL                                          0  $57     
        138        ECHO                                                         $57
        139        ECHO                                                         '%3B+'
        140        IS_IDENTICAL                                                 !9, 1
        141      > JMPZ                                                         ~58, ->144
        142    >   QM_ASSIGN                                            ~59     'border-top-width%3A+4px%3B'
        143      > JMP                                                          ->145
        144    >   QM_ASSIGN                                            ~59     ''
        145    >   ECHO                                                         ~59
        146        ECHO                                                         '%22%3E'
        147        INIT_FCALL_BY_NAME                                           'wp_kses_post'
        148        CHECK_FUNC_ARG                                               
        149        FETCH_DIM_FUNC_ARG                                   $60     !10, 'value'
        150        SEND_FUNC_ARG                                                $60
        151        DO_FCALL                                          0  $61     
        152        ECHO                                                         $61
        153        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++'
   55   154      > JMP                                                          ->113
        155    >   FE_FREE                                                      $50
   65   156    >   INIT_METHOD_CALL                                             !2, 'get_customer_note'
        157        DO_FCALL                                          0  $62     
        158      > JMPZ                                                         $62, ->188
   67   159    >   ECHO                                                         '++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22row%22+colspan%3D%222%22+style%3D%22text-align%3A'
   68   160        INIT_FCALL_BY_NAME                                           'esc_attr'
        161        SEND_VAR_EX                                                  !0
        162        DO_FCALL                                          0  $63     
        163        ECHO                                                         $63
        164        ECHO                                                         '%3B%22%3E'
        165        INIT_FCALL_BY_NAME                                           'esc_html_e'
        166        SEND_VAL_EX                                                  'Note%3A'
        167        SEND_VAL_EX                                                  'woocommerce'
        168        DO_FCALL                                          0          
        169        ECHO                                                         '%3C%2Fth%3E%0A++++++++++++++++++++%3Ctd+class%3D%22td%22+style%3D%22text-align%3A'
   69   170        INIT_FCALL_BY_NAME                                           'esc_attr'
        171        SEND_VAR_EX                                                  !0
        172        DO_FCALL                                          0  $65     
        173        ECHO                                                         $65
        174        ECHO                                                         '%3B%22%3E'
        175        INIT_FCALL_BY_NAME                                           'wp_kses_post'
        176        INIT_FCALL                                                   'nl2br'
        177        INIT_FCALL_BY_NAME                                           'wptexturize'
        178        INIT_METHOD_CALL                                             !2, 'get_customer_note'
        179        DO_FCALL                                          0  $66     
        180        SEND_VAR_NO_REF_EX                                           $66
        181        DO_FCALL                                          0  $67     
        182        SEND_VAR                                                     $67
        183        DO_ICALL                                             $68     
        184        SEND_VAR_NO_REF_EX                                           $68
        185        DO_FCALL                                          0  $69     
        186        ECHO                                                         $69
        187        ECHO                                                         '%3C%2Ftd%3E%0A++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++'
   74   188    >   ECHO                                                         '++++++++%3C%2Ftfoot%3E%0A++++%3C%2Ftable%3E%0A%3C%2Fdiv%3E%0A%0A'
   78   189        INIT_FCALL_BY_NAME                                           'do_action'
        190        SEND_VAL_EX                                                  'woocommerce_email_after_order_table'
        191        SEND_VAR_EX                                                  !2
        192        SEND_VAR_EX                                                  !3
        193        SEND_VAR_EX                                                  !4
        194        SEND_VAR_EX                                                  !5
        195        DO_FCALL                                          0          
        196      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.29 ms | 2097 KiB | 16 Q