3v4l.org

run code in 500+ PHP versions simultaneously
<?php $upsells = ['Наименование товара №1_~-250$_~-99$', 'Наименование товара №2_~-699$_~-399$', 'Наименование товара №3_~-299$_~-149$',]; $orderDetails = ['Наименование', 'Старая цена', 'Новая цена']; $text = ''; foreach ($upsells as $upsell) { $productInformation = explode('_~-', $upsell); for ($i = 0; $i < count($productInformation); $i++) { $text .= '<b>'.$orderDetails[$i].':</b> '.$productInformation[$i].'<br />'; } } echo $text;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 12
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 12
Branch analysis from position: 23
Branch analysis from position: 12
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/sSRml
function name:  (null)
number of ops:  27
compiled vars:  !0 = $upsells, !1 = $orderDetails, !2 = $text, !3 = $upsell, !4 = $productInformation, !5 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    6     2        ASSIGN                                                       !2, ''
    7     3      > FE_RESET_R                                           $9      !0, ->24
          4    > > FE_FETCH_R                                                   $9, !3, ->24
    8     5    >   INIT_FCALL                                                   'explode'
          6        SEND_VAL                                                     '_%7E-'
          7        SEND_VAR                                                     !3
          8        DO_ICALL                                             $10     
          9        ASSIGN                                                       !4, $10
    9    10        ASSIGN                                                       !5, 0
         11      > JMP                                                          ->20
   10    12    >   FETCH_DIM_R                                          ~13     !1, !5
         13        CONCAT                                               ~14     '%3Cb%3E', ~13
         14        CONCAT                                               ~15     ~14, '%3A%3C%2Fb%3E+'
         15        FETCH_DIM_R                                          ~16     !4, !5
         16        CONCAT                                               ~17     ~15, ~16
         17        CONCAT                                               ~18     ~17, '%3Cbr+%2F%3E'
         18        ASSIGN_OP                                         8          !2, ~18
    9    19        PRE_INC                                                      !5
         20    >   COUNT                                                ~21     !4
         21        IS_SMALLER                                                   !5, ~21
         22      > JMPNZ                                                        ~22, ->12
    7    23    > > JMP                                                          ->4
         24    >   FE_FREE                                                      $9
   14    25        ECHO                                                         !2
   15    26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.41 ms | 1637 KiB | 10 Q