3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = []; $list[] = "TALB20170826D-\$A$$-RA11.pdf"; $list[] = "TAP$20170826D-\$A$$-RA11.pdf"; $list[] = "TASD20170826D-\$A$$-RA11.pdf"; $list[] = "TAUA20170826D-\$A$$-RA11.pdf"; $list[] = "TAUB20170826D-\$A$$-RA11.pdf"; $list[] = "TAUC20170826D-\$A$$-RA11.pdf"; $list[] = "TAUD20170826D-\$A$$-RA11.pdf"; $list[] = "TBTP20170826D-\$A$$-RA11.pdf"; $list[] = "TCBY20170826D-\$A$$-RA11.pdf"; $abbr = [ "TALB", "TAP", ]; $replacements = [ "ALBANY", "Asia Pacific", ]; foreach ($list as &$el) { $el = str_replace($abbr, $replacements, $el); } var_dump($list);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 22, Position 2 = 30
Branch analysis from position: 22
2 jumps found. (Code = 126) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/Tr2j0
function name:  (null)
number of ops:  35
compiled vars:  !0 = $list, !1 = $abbr, !2 = $replacements, !3 = $el
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'TALB20170826D-%24A%24%24-RA11.pdf'
    4     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  'TAP%2420170826D-%24A%24%24-RA11.pdf'
    5     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  'TASD20170826D-%24A%24%24-RA11.pdf'
    6     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  'TAUA20170826D-%24A%24%24-RA11.pdf'
    7     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  'TAUB20170826D-%24A%24%24-RA11.pdf'
    8    11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  'TAUC20170826D-%24A%24%24-RA11.pdf'
    9    13        ASSIGN_DIM                                               !0
         14        OP_DATA                                                  'TAUD20170826D-%24A%24%24-RA11.pdf'
   10    15        ASSIGN_DIM                                               !0
         16        OP_DATA                                                  'TBTP20170826D-%24A%24%24-RA11.pdf'
   11    17        ASSIGN_DIM                                               !0
         18        OP_DATA                                                  'TCBY20170826D-%24A%24%24-RA11.pdf'
   12    19        ASSIGN                                                   !1, <array>
   16    20        ASSIGN                                                   !2, <array>
   20    21      > FE_RESET_RW                                      $16     !0, ->30
         22    > > FE_FETCH_RW                                              $16, !3, ->30
   21    23    >   INIT_FCALL                                               'str_replace'
         24        SEND_VAR                                                 !1
         25        SEND_VAR                                                 !2
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $17     
         28        ASSIGN                                                   !3, $17
   20    29      > JMP                                                      ->22
         30    >   FE_FREE                                                  $16
   23    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.59 ms | 1442 KiB | 16 Q