3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(0=>"Premier: 3/svart/XL ID:35235", 1=>"Premier: 3/vit/S ID:9999"); foreach ($a as $b) { $list_premier = explode('ID',$b); $premier = trim(substr($list_premier[0],10)); $premier = str_replace( array(' ', '1' , '2', '3'), array(' + ', 'tygvƤska', 'chocklad', 't-shirt'), $premier ) ; echo "premier" . "<br>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 25
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 25
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/sClgd
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a, !1 = $b, !2 = $list_premier, !3 = $premier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $5      !0, ->25
          2    > > FE_FETCH_R                                               $5, !1, ->25
    5     3    >   INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 'ID'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    6     8        INIT_FCALL                                               'trim'
          9        INIT_FCALL                                               'substr'
         10        FETCH_DIM_R                                      ~8      !2, 0
         11        SEND_VAL                                                 ~8
         12        SEND_VAL                                                 10
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !3, $10
    7    17        INIT_FCALL                                               'str_replace'
         18        SEND_VAL                                                 <array>
         19        SEND_VAL                                                 <array>
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $12     
         22        ASSIGN                                                   !3, $12
    8    23        ECHO                                                     'premier%3Cbr%3E'
    4    24      > JMP                                                      ->2
         25    >   FE_FREE                                                  $5
    9    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.44 ms | 1395 KiB | 21 Q