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 ); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0140.00716.63
8.3.50.0120.00316.16
8.3.40.0080.01118.63
8.3.30.0040.01118.87
8.3.20.0000.00824.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0040.01225.92
8.2.170.0110.01118.91
8.2.160.0110.00322.96
8.2.150.0080.00025.66
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0070.00026.35
8.2.110.0030.00620.52
8.2.100.0070.00417.91
8.2.90.0000.00819.35
8.2.80.0050.00317.97
8.2.70.0030.00517.75
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0030.00618.02
8.2.20.0050.00218.13
8.2.10.0050.00319.34
8.2.00.0040.00419.34
8.1.280.0070.01425.92
8.1.270.0040.00422.17
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00623.97
8.1.230.0110.00017.77
8.1.220.0050.00517.79
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0030.00518.55
8.1.160.0070.00018.91
8.1.150.0000.00718.90
8.1.140.0030.00520.36
8.1.130.0030.00320.14
8.1.120.0000.00817.53
8.1.110.0030.00517.41
8.1.100.0000.00817.37
8.1.90.0000.00817.47
8.1.80.0070.00417.43
8.1.70.0000.00717.48
8.1.60.0040.00417.57
8.1.50.0080.00017.55
8.1.40.0050.00217.58
8.1.30.0070.00417.57
8.1.20.0060.00317.70
8.1.10.0090.00017.47
8.1.00.0030.00517.45
8.0.300.0040.00418.77
8.0.290.0060.00316.88
8.0.280.0000.00620.29
8.0.270.0030.00318.02
8.0.260.0070.00020.27
8.0.250.0070.00017.09
8.0.240.0040.00417.06
8.0.230.0070.00017.04
8.0.220.0060.00016.89
8.0.210.0050.00316.96
8.0.200.0030.00317.06
8.0.190.0030.00617.03
8.0.180.0000.00716.90
8.0.170.0030.00616.89
8.0.160.0040.00416.96
8.0.150.0070.00016.80
8.0.140.0030.00516.85
8.0.130.0030.00313.38
8.0.120.0030.00517.06
8.0.110.0040.00416.85
8.0.100.0040.00416.89
8.0.90.0000.00716.93
8.0.80.0090.00716.89
8.0.70.0000.00716.80
8.0.60.0050.00217.00
8.0.50.0070.00016.95
8.0.30.0060.01017.17
8.0.20.0080.01517.22
8.0.10.0050.00217.13
8.0.00.0110.01516.90
7.4.330.0000.00615.55
7.4.320.0000.00616.64
7.4.300.0000.00616.62
7.4.290.0040.00416.57
7.4.280.0040.00416.54
7.4.270.0080.00016.54
7.4.260.0000.00613.42
7.4.250.0040.00416.39
7.4.240.0040.00416.62
7.4.230.0000.00816.69
7.4.220.0030.00316.62
7.4.210.0080.00916.58
7.4.200.0000.00716.63
7.4.130.0130.00516.57
7.4.120.0140.00616.73
7.4.110.0030.01316.58
7.4.100.0060.01216.44
7.4.90.0100.00616.55
7.4.80.0100.00916.53
7.4.70.0070.01016.46
7.4.60.0120.00616.41
7.4.50.0060.01216.46
7.4.40.0060.01116.25
7.4.30.0140.00316.56
7.4.20.0120.00616.63
7.4.10.0030.02216.66
7.4.00.0090.00916.63
7.3.330.0000.00716.35
7.3.320.0060.00013.27
7.3.310.0050.00216.09
7.3.300.0030.00316.28
7.3.290.0000.01816.25
7.3.260.0120.00616.34
7.3.230.0080.01116.56
7.3.210.0130.00416.39
7.3.200.0110.00716.24
7.3.190.0060.01216.32
7.3.180.0030.01416.39
7.3.170.0030.01316.37
7.3.160.0130.00416.46
7.3.150.0060.00916.46
7.3.140.0140.00416.52
7.3.130.0100.00716.33
7.3.120.0090.00916.29
7.3.110.0090.00916.37
7.3.100.0120.00616.58
7.3.90.0060.01016.46
7.3.80.0000.01616.57
7.3.70.0140.00316.42
7.3.60.0060.01216.31
7.3.50.0070.01016.44
7.3.40.0070.01016.40
7.3.30.0130.00316.39
7.3.20.0170.00018.04
7.3.10.0090.00918.17
7.3.00.0130.00318.03
7.2.330.0090.00916.45
7.2.320.0170.00016.82
7.2.310.0120.00616.60
7.2.300.0040.01216.47
7.2.290.0080.00816.54
7.2.280.0060.01116.78
7.2.270.0060.01216.29
7.2.260.0030.01416.46
7.2.250.0100.01016.46
7.2.240.0060.01116.64
7.2.230.0030.01416.34
7.2.220.0090.00916.70
7.2.210.0110.00716.48
7.2.200.0100.00716.43
7.2.190.0160.00616.65
7.2.180.0070.01116.52
7.2.170.0140.00316.55
7.2.160.0000.01716.57
7.2.150.0130.00718.30
7.2.140.0090.00918.11
7.2.130.0070.01618.33
7.2.120.0070.01718.23
7.2.110.0070.01118.35
7.2.100.0100.01018.22
7.2.90.0120.00818.49
7.2.80.0150.00418.38
7.2.70.0060.01318.52
7.2.60.0130.00518.32
7.2.50.0150.00318.26
7.2.40.0130.01318.23
7.2.30.0040.01518.32
7.2.20.0100.01318.29
7.2.10.0080.01618.19
7.2.00.0070.01718.21

preferences:
60.35 ms | 400 KiB | 5 Q