3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Order details table shown in emails. * * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. We try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates/Emails * @version 3.7.0 */ defined( 'ABSPATH' ) || exit; $text_align = is_rtl() ? 'right' : 'left'; 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.4.120.0100.01020.61
8.4.110.0140.00619.00
8.4.100.0030.00618.72
8.4.90.0160.00420.39
8.4.80.0130.00618.98
8.4.70.0100.00920.75
8.4.60.0100.01018.88
8.4.50.0140.00718.59
8.4.40.0060.01217.68
8.4.30.0130.00720.37
8.4.20.0060.00920.02
8.4.10.0040.00422.29
8.3.250.0060.01117.16
8.3.240.0100.01017.05
8.3.230.0120.00516.59
8.3.220.0050.00319.00
8.3.210.0130.00716.95
8.3.200.0060.00416.88
8.3.190.0120.00719.10
8.3.180.0110.00418.74
8.3.170.0150.00316.98
8.3.160.0070.01117.31
8.3.150.0090.00917.07
8.3.140.0090.00619.02
8.3.130.0030.00518.59
8.3.120.0060.00320.84
8.3.110.0000.00918.57
8.3.100.0090.00018.65
8.3.90.0040.00416.73
8.3.80.0060.00319.36
8.3.70.0160.00616.63
8.3.60.0090.00918.55
8.3.50.0120.00923.71
8.3.40.0070.01018.84
8.3.30.0070.00718.72
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0060.00326.16
8.2.290.0130.00616.70
8.2.280.0140.00518.61
8.2.270.0150.00317.11
8.2.260.0090.00616.45
8.2.250.0120.00618.28
8.2.240.0080.00017.35
8.2.230.0060.00320.94
8.2.220.0090.00024.06
8.2.210.0070.00026.77
8.2.200.0100.00018.29
8.2.190.0120.00618.16
8.2.180.0040.01125.92
8.2.170.0000.01618.96
8.2.160.0060.00922.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00019.66
8.2.110.0110.00720.56
8.2.100.0040.00817.91
8.2.90.0000.00817.63
8.2.80.0080.00018.79
8.2.70.0040.00417.63
8.2.60.0050.00317.75
8.2.50.0000.00818.05
8.2.40.0000.00718.28
8.2.30.0100.00018.18
8.2.20.0030.00518.11
8.2.10.0040.00419.27
8.2.00.0000.00719.42
8.1.330.0120.00616.32
8.1.320.0100.01017.69
8.1.310.0110.00715.88
8.1.300.0040.00417.99
8.1.290.0040.00718.88
8.1.280.0070.00725.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00322.31
8.1.230.0060.00617.82
8.1.220.0030.00617.91
8.1.210.0030.00618.77
8.1.200.0030.00617.48
8.1.190.0040.00417.47
8.1.180.0040.00418.10
8.1.170.0030.00618.61
8.1.160.0040.00418.77
8.1.150.0000.00718.93
8.1.140.0000.00720.36
8.1.130.0070.00020.21
8.1.120.0000.00817.52
8.1.110.0030.00517.45
8.1.100.0040.00417.37
8.1.90.0050.00317.47
8.1.80.0040.00717.39
8.1.70.0000.00717.37
8.1.60.0000.00717.57
8.1.50.0050.00317.49
8.1.40.0030.00617.57
8.1.30.0060.00317.55
8.1.20.0040.00417.61
8.1.10.0000.00717.44
8.1.00.0000.00717.47
8.0.300.0030.00518.99
8.0.290.0080.00016.75
8.0.280.0030.00320.22
8.0.270.0030.00317.96
8.0.260.0000.00620.34
8.0.250.0030.00316.99
8.0.240.0030.00316.99
8.0.230.0030.00317.04
8.0.220.0000.00716.90
8.0.210.0050.00316.96
8.0.200.0030.00316.96
8.0.190.0060.00316.99
8.0.180.0020.00516.88
8.0.170.0040.00417.00
8.0.160.0050.00216.96
8.0.150.0000.00716.90
8.0.140.0000.00716.91
8.0.130.0060.00013.36
8.0.120.0040.00416.85
8.0.110.0050.00217.03
8.0.100.0040.00416.91
8.0.90.0030.00417.01
8.0.80.0070.01216.92
8.0.70.0000.00816.75
8.0.60.0000.00816.95
8.0.50.0000.00716.95
8.0.30.0060.01217.17
8.0.20.0110.00817.36
8.0.10.0080.00017.11
8.0.00.0060.01616.86
7.4.330.0030.00315.55
7.4.320.0040.00416.66
7.4.300.0030.00316.61
7.4.290.0000.00716.63
7.4.280.0090.00016.65
7.4.270.0070.00016.62
7.4.260.0050.00013.31
7.4.250.0030.00616.50
7.4.240.0050.00316.58
7.4.230.0050.00216.60
7.4.220.0020.00516.63
7.4.210.0020.01316.62
7.4.200.0080.00016.42
7.4.130.0110.00716.63
7.4.120.0070.01416.68
7.4.110.0100.01316.48
7.4.100.0130.00316.50
7.4.90.0100.00716.51
7.4.80.0130.00416.63
7.4.70.0030.01616.63
7.4.60.0060.01216.45
7.4.50.0090.01216.27
7.4.40.0100.00716.39
7.4.30.0060.01016.57
7.4.20.0070.01116.52
7.4.10.0110.00716.44
7.4.00.0060.01016.52
7.3.330.0000.00716.16
7.3.320.0030.00313.16
7.3.310.0000.00716.22
7.3.300.0060.00016.15
7.3.290.0110.00416.26
7.3.260.0090.00916.41
7.3.230.0070.01016.59
7.3.210.0060.01516.54
7.3.200.0100.00716.41
7.3.190.0110.00816.27
7.3.180.0090.00916.28
7.3.170.0210.00316.30
7.3.160.0070.01016.39
7.3.150.0000.01616.39
7.3.140.0070.01016.51
7.3.130.0100.00716.46
7.3.120.0070.01016.54
7.3.110.0130.00716.44
7.3.100.0060.01016.58
7.3.90.0160.00616.50
7.3.80.0030.01316.69
7.3.70.0120.00316.33
7.3.60.0060.01016.32
7.3.50.0070.01016.41
7.3.40.0060.00916.24
7.3.30.0060.00916.27
7.3.20.0230.00716.28
7.3.10.0030.01316.26
7.3.00.0120.00616.25
7.2.330.0100.00716.68
7.2.320.0070.01116.55
7.2.310.0040.01516.43
7.2.300.0110.01116.75
7.2.290.0130.00316.35
7.2.280.0030.01416.47
7.2.270.0120.00616.55
7.2.260.0080.00816.57
7.2.250.0070.01416.40
7.2.240.0130.00316.46
7.2.230.0080.01616.59
7.2.220.0130.00616.63
7.2.210.0030.01316.38
7.2.200.0100.00716.60
7.2.190.0110.00616.36
7.2.180.0000.01716.41
7.2.170.0030.01316.65
7.2.160.0030.01416.67
7.2.150.0120.00616.73
7.2.140.0150.00316.50
7.2.130.0100.00716.24
7.2.120.0100.00716.38
7.2.110.0100.00716.58
7.2.100.0120.00616.48
7.2.90.0140.00316.36
7.2.80.0110.00816.27
7.2.70.0090.00916.40
7.2.60.0120.00616.46
7.2.50.0030.01416.41
7.2.40.0030.01516.41
7.2.30.0000.01816.56
7.2.20.0110.01116.50
7.2.10.0120.00916.39
7.2.00.0100.01116.56

preferences:
27.47 ms | 403 KiB | 5 Q