3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "1||50||£---2||25||£---3||25||£---"; $a = explode('---',$s); $result = []; foreach($a as $item){ $result []= explode('||',$item); } var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/H977b
function name:  (null)
number of ops:  21
compiled vars:  !0 = $s, !1 = $a, !2 = $result, !3 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1%7C%7C50%7C%7C%C2%A3---2%7C%7C25%7C%7C%C2%A3---3%7C%7C25%7C%7C%C2%A3---'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '---'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        ASSIGN                                                   !2, <array>
    6     7      > FE_RESET_R                                       $8      !1, ->16
          8    > > FE_FETCH_R                                               $8, !3, ->16
    7     9    >   INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '%7C%7C'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $10     
         13        ASSIGN_DIM                                               !2
         14        OP_DATA                                                  $10
    6    15      > JMP                                                      ->8
         16    >   FE_FREE                                                  $8
    9    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
205.59 ms | 1395 KiB | 17 Q