3v4l.org

run code in 300+ 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 = 4
Branch analysis from position: 2
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 33
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 155
Branch analysis from position: 110
2 jumps found. (Code = 77) Position 1 = 112, Position 2 = 154
Branch analysis from position: 112
2 jumps found. (Code = 78) Position 1 = 113, Position 2 = 154
Branch analysis from position: 113
2 jumps found. (Code = 43) Position 1 = 122, Position 2 = 124
Branch analysis from position: 122
1 jumps found. (Code = 42) Position 1 = 125
Branch analysis from position: 125
2 jumps found. (Code = 43) Position 1 = 141, Position 2 = 143
Branch analysis from position: 141
1 jumps found. (Code = 42) Position 1 = 144
Branch analysis from position: 144
1 jumps found. (Code = 42) Position 1 = 112
Branch analysis from position: 112
Branch analysis from position: 143
1 jumps found. (Code = 42) Position 1 = 112
Branch analysis from position: 112
Branch analysis from position: 124
2 jumps found. (Code = 43) Position 1 = 141, Position 2 = 143
Branch analysis from position: 141
Branch analysis from position: 143
Branch analysis from position: 154
2 jumps found. (Code = 43) Position 1 = 158, Position 2 = 187
Branch analysis from position: 158
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 187
Branch analysis from position: 154
Branch analysis from position: 155
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 155
Branch analysis from position: 110
Branch analysis from position: 155
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 33
Branch analysis from position: 23
Branch analysis from position: 33
filename:       /in/fa2t4
function name:  (null)
number of ops:  196
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, ->4
          2    > > EXIT                                                     
          3*       BOOL                                             ~11     <true>
    6     4    >   INIT_FCALL_BY_NAME                                       'is_rtl'
          5        DO_FCALL                                      0  $12     
          6      > JMPZ                                                     $12, ->9
          7    >   QM_ASSIGN                                        ~13     'right'
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~13     'left'
         10    >   ASSIGN                                                   !0, ~13
    8    11        FETCH_R                      global              ~15     '_POST'
         12        FETCH_DIM_R                                      ~16     ~15, 'present2'
         13        ASSIGN                                                   !1, ~16
   10    14        INIT_FCALL_BY_NAME                                       'do_action'
         15        SEND_VAL_EX                                              'woocommerce_email_before_order_table'
         16        SEND_VAR_EX                                              !2
         17        SEND_VAR_EX                                              !3
         18        SEND_VAR_EX                                              !4
         19        SEND_VAR_EX                                              !5
         20        DO_FCALL                                      0          
   11    21        ECHO                                                     '%0A%3Ch2%3E%0A++++'
   14    22      > JMPZ                                                     !3, ->33
   15    23    >   INIT_FCALL_BY_NAME                                       'esc_url'
         24        INIT_METHOD_CALL                                         !2, 'get_edit_order_url'
         25        DO_FCALL                                      0  $19     
         26        SEND_VAR_NO_REF_EX                                       $19
         27        DO_FCALL                                      0  $20     
         28        CONCAT                                           ~21     '%3Ca+class%3D%22link%22+href%3D%22', $20
         29        CONCAT                                           ~22     ~21, '%22%3E'
         30        ASSIGN                                                   !6, ~22
   16    31        ASSIGN                                                   !7, '%3C%2Fa%3E'
         32      > JMP                                                      ->35
   18    33    >   ASSIGN                                                   !6, ''
   19    34        ASSIGN                                                   !7, ''
   22    35    >   INIT_FCALL_BY_NAME                                       'wp_kses_post'
         36        INIT_FCALL                                               'sprintf'
         37        INIT_FCALL_BY_NAME                                       '__'
         38        SEND_VAL_EX                                              '%5BOrder+%23%25s%5D'
         39        SEND_VAL_EX                                              'woocommerce'
         40        DO_FCALL                                      0  $27     
         41        CONCAT                                           ~28     $27, !7
         42        CONCAT                                           ~29     ~28, '+%28%3Ctime+datetime%3D%22%25s%22%3E%25s%3C%2Ftime%3E%29'
         43        SEND_VAL                                                 ~29
         44        INIT_METHOD_CALL                                         !2, 'get_order_number'
         45        DO_FCALL                                      0  $30     
         46        SEND_VAR                                                 $30
         47        INIT_METHOD_CALL                                         !2, 'get_date_created'
         48        DO_FCALL                                      0  $31     
         49        INIT_METHOD_CALL                                         $31, 'format'
         50        SEND_VAL_EX                                              'c'
         51        DO_FCALL                                      0  $32     
         52        SEND_VAR                                                 $32
         53        INIT_FCALL_BY_NAME                                       'wc_format_datetime'
         54        INIT_METHOD_CALL                                         !2, 'get_date_created'
         55        DO_FCALL                                      0  $33     
         56        SEND_VAR_NO_REF_EX                                       $33
         57        DO_FCALL                                      0  $34     
         58        SEND_VAR                                                 $34
         59        DO_ICALL                                         $35     
         60        CONCAT                                           ~36     !6, $35
         61        SEND_VAL_EX                                              ~36
         62        DO_FCALL                                      0  $37     
         63        ECHO                                                     $37
   24    64        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    65        INIT_FCALL_BY_NAME                                       'esc_attr'
         66        SEND_VAR_EX                                              !0
         67        DO_FCALL                                      0  $38     
         68        ECHO                                                     $38
         69        ECHO                                                     '%3B%22%3E'
         70        INIT_FCALL_BY_NAME                                       'esc_html_e'
         71        SEND_VAL_EX                                              'Product'
         72        SEND_VAL_EX                                              'woocommerce'
         73        DO_FCALL                                      0          
         74        ECHO                                                     '%3C%2Fth%3E%0A++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22col%22+style%3D%22text-align%3A'
   31    75        INIT_FCALL_BY_NAME                                       'esc_attr'
         76        SEND_VAR_EX                                              !0
         77        DO_FCALL                                      0  $40     
         78        ECHO                                                     $40
         79        ECHO                                                     '%3B%22%3E'
         80        INIT_FCALL_BY_NAME                                       'esc_html_e'
         81        SEND_VAL_EX                                              'Quantity'
         82        SEND_VAL_EX                                              'woocommerce'
         83        DO_FCALL                                      0          
         84        ECHO                                                     '%3C%2Fth%3E%0A++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22col%22+style%3D%22text-align%3A'
   32    85        INIT_FCALL_BY_NAME                                       'esc_attr'
         86        SEND_VAR_EX                                              !0
         87        DO_FCALL                                      0  $42     
         88        ECHO                                                     $42
         89        ECHO                                                     '%3B%22%3E'
         90        INIT_FCALL_BY_NAME                                       'esc_html_e'
         91        SEND_VAL_EX                                              'Price'
         92        SEND_VAL_EX                                              'woocommerce'
         93        DO_FCALL                                      0          
         94        ECHO                                                     '%3C%2Fth%3E%0A++++++++++++%3C%2Ftr%3E%0A++++++++%3C%2Fthead%3E%0A++++++++%3Ctbody%3E%0A++++++++++++'
   37    95        INIT_FCALL_BY_NAME                                       'wc_get_email_order_items'
   38    96        SEND_VAR_EX                                              !2
   40    97        INIT_ARRAY                                       ~44     !3, 'show_sku'
         98        ADD_ARRAY_ELEMENT                                ~44     <false>, 'show_image'
         99        ADD_ARRAY_ELEMENT                                ~44     <array>, 'image_size'
   43   100        ADD_ARRAY_ELEMENT                                ~44     !4, 'plain_text'
   44   101        ADD_ARRAY_ELEMENT                                ~44     !3, 'sent_to_admin'
        102        SEND_VAL_EX                                              ~44
        103        DO_FCALL                                      0  $45     
        104        ECHO                                                     $45
   48   105        ECHO                                                     '++++++++%3C%2Ftbody%3E%0A++++++++%3Ctfoot%3E%0A++++++++++++'
   51   106        INIT_METHOD_CALL                                         !2, 'get_order_item_totals'
        107        DO_FCALL                                      0  $46     
        108        ASSIGN                                                   !8, $46
   53   109      > JMPZ                                                     !8, ->155
   54   110    >   ASSIGN                                                   !9, 0
   55   111      > FE_RESET_R                                       $49     !8, ->154
        112    > > FE_FETCH_R                                               $49, !10, ->154
   56   113    >   PRE_INC                                                  !9
   58   114        ECHO                                                     '++++++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22row%22+colspan%3D%222%22+style%3D%22text-align%3A'
   59   115        INIT_FCALL_BY_NAME                                       'esc_attr'
        116        SEND_VAR_EX                                              !0
        117        DO_FCALL                                      0  $51     
        118        ECHO                                                     $51
        119        ECHO                                                     '%3B+'
        120        IS_IDENTICAL                                             !9, 1
        121      > JMPZ                                                     ~52, ->124
        122    >   QM_ASSIGN                                        ~53     'border-top-width%3A+4px%3B'
        123      > JMP                                                      ->125
        124    >   QM_ASSIGN                                        ~53     ''
        125    >   ECHO                                                     ~53
        126        ECHO                                                     '%22%3E'
        127        INIT_FCALL_BY_NAME                                       'wp_kses_post'
        128        CHECK_FUNC_ARG                                           
        129        FETCH_DIM_FUNC_ARG                               $54     !10, 'label'
        130        SEND_FUNC_ARG                                            $54
        131        DO_FCALL                                      0  $55     
        132        ECHO                                                     $55
        133        ECHO                                                     '%3C%2Fth%3E%0A++++++++++++++++++++++++%3Ctd+class%3D%22td%22+style%3D%22text-align%3A'
   60   134        INIT_FCALL_BY_NAME                                       'esc_attr'
        135        SEND_VAR_EX                                              !0
        136        DO_FCALL                                      0  $56     
        137        ECHO                                                     $56
        138        ECHO                                                     '%3B+'
        139        IS_IDENTICAL                                             !9, 1
        140      > JMPZ                                                     ~57, ->143
        141    >   QM_ASSIGN                                        ~58     'border-top-width%3A+4px%3B'
        142      > JMP                                                      ->144
        143    >   QM_ASSIGN                                        ~58     ''
        144    >   ECHO                                                     ~58
        145        ECHO                                                     '%22%3E'
        146        INIT_FCALL_BY_NAME                                       'wp_kses_post'
        147        CHECK_FUNC_ARG                                           
        148        FETCH_DIM_FUNC_ARG                               $59     !10, 'value'
        149        SEND_FUNC_ARG                                            $59
        150        DO_FCALL                                      0  $60     
        151        ECHO                                                     $60
        152        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++++++'
   55   153      > JMP                                                      ->112
        154    >   FE_FREE                                                  $49
   65   155    >   INIT_METHOD_CALL                                         !2, 'get_customer_note'
        156        DO_FCALL                                      0  $61     
        157      > JMPZ                                                     $61, ->187
   67   158    >   ECHO                                                     '++++++++++++++++%3Ctr%3E%0A++++++++++++++++++++%3Cth+class%3D%22td%22+scope%3D%22row%22+colspan%3D%222%22+style%3D%22text-align%3A'
   68   159        INIT_FCALL_BY_NAME                                       'esc_attr'
        160        SEND_VAR_EX                                              !0
        161        DO_FCALL                                      0  $62     
        162        ECHO                                                     $62
        163        ECHO                                                     '%3B%22%3E'
        164        INIT_FCALL_BY_NAME                                       'esc_html_e'
        165        SEND_VAL_EX                                              'Note%3A'
        166        SEND_VAL_EX                                              'woocommerce'
        167        DO_FCALL                                      0          
        168        ECHO                                                     '%3C%2Fth%3E%0A++++++++++++++++++++%3Ctd+class%3D%22td%22+style%3D%22text-align%3A'
   69   169        INIT_FCALL_BY_NAME                                       'esc_attr'
        170        SEND_VAR_EX                                              !0
        171        DO_FCALL                                      0  $64     
        172        ECHO                                                     $64
        173        ECHO                                                     '%3B%22%3E'
        174        INIT_FCALL_BY_NAME                                       'wp_kses_post'
        175        INIT_FCALL                                               'nl2br'
        176        INIT_FCALL_BY_NAME                                       'wptexturize'
        177        INIT_METHOD_CALL                                         !2, 'get_customer_note'
        178        DO_FCALL                                      0  $65     
        179        SEND_VAR_NO_REF_EX                                       $65
        180        DO_FCALL                                      0  $66     
        181        SEND_VAR                                                 $66
        182        DO_ICALL                                         $67     
        183        SEND_VAR_NO_REF_EX                                       $67
        184        DO_FCALL                                      0  $68     
        185        ECHO                                                     $68
        186        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++++++%3C%2Ftr%3E%0A++++++++++++++++'
   74   187    >   ECHO                                                     '++++++++%3C%2Ftfoot%3E%0A++++%3C%2Ftable%3E%0A%3C%2Fdiv%3E%0A%0A'
   78   188        INIT_FCALL_BY_NAME                                       'do_action'
        189        SEND_VAL_EX                                              'woocommerce_email_after_order_table'
        190        SEND_VAR_EX                                              !2
        191        SEND_VAR_EX                                              !3
        192        SEND_VAR_EX                                              !4
        193        SEND_VAR_EX                                              !5
        194        DO_FCALL                                      0          
        195      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.63 ms | 1420 KiB | 17 Q