3v4l.org

run code in 300+ PHP versions simultaneously
<?php $item_colors = "Vario Base Unit with steel, large, black/orange"; $result = eval('return '.str_replace(['Vario Base Unit with ', '/', ', '], ['["',', ', '", "'], $item_colors).'"];'); echo implode(' ', $result); //steel large black orange var_dump($result); // array(4) { // [0]=> // string(5) "steel" // [1]=> // string(5) "large" // [2]=> // string(5) "black" // [3]=> // string(6) "orange" // }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TBdId
function name:  (null)
number of ops:  19
compiled vars:  !0 = $item_colors, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Vario+Base+Unit+with+steel%2C+large%2C+black%2Forange'
    5     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      'return+', $3
          7        CONCAT                                           ~5      ~4, '%22%5D%3B'
          8        INCLUDE_OR_EVAL                                  $6      ~5, EVAL
          9        ASSIGN                                                   !1, $6
    7    10        INIT_FCALL                                               'implode'
         11        SEND_VAL                                                 '+'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $8      
         14        ECHO                                                     $8
   10    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   20    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.02 ms | 1394 KiB | 19 Q