3v4l.org

run code in 500+ 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:  13
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        FRAMELESS_ICALL_3                str_replace         ~3      <array>, <array>
          2        OP_DATA                                                      !0
          3        CONCAT                                               ~4      'return+', ~3
          4        CONCAT                                               ~5      ~4, '%22%5D%3B'
          5        INCLUDE_OR_EVAL                                      $6      ~5, EVAL
          6        ASSIGN                                                       !1, $6
    7     7        FRAMELESS_ICALL_2                implode             ~8      '+', !1
          8        ECHO                                                         ~8
   10     9        INIT_FCALL                                                   'var_dump'
         10        SEND_VAR                                                     !1
         11        DO_ICALL                                                     
   20    12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.92 ms | 2013 KiB | 17 Q