3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = array( 'ABC 11.0x17 / 1x4 2x4 XYZ', 'ABC 12.1x18 / 2x4 3x4 XYZ', 'ABC DEF 12.1x19 / 3x4 4x4 XYZ', 'ABC DEF GHI A1 13x20 / 3x4 4x4 XYZ' ); foreach ($strings as $str) { $text = explode('x', $str, 2); $text = explode(' ', $text[1]); echo "$text[0]\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 20
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/EVcWm
function name:  (null)
number of ops:  22
compiled vars:  !0 = $strings, !1 = $str, !2 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_R                                       $4      !0, ->20
          2    > > FE_FETCH_R                                               $4, !1, ->20
   11     3    >   INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 'x'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 2
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !2, $5
   12     9        INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '+'
         11        FETCH_DIM_R                                      ~7      !2, 1
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
   13    15        FETCH_DIM_R                                      ~10     !2, 0
         16        NOP                                                      
         17        FAST_CONCAT                                      ~11     ~10, '%0A'
         18        ECHO                                                     ~11
   10    19      > JMP                                                      ->2
         20    >   FE_FREE                                                  $4
   14    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.01 ms | 1004 KiB | 14 Q