3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a[0] = "abc;;;;def;ghi;"; $b = mb_strstr($a[0],';'); //$b = ltrim($b,';'); $sss = substr( $b , 1, strlen($b)-1 ); echo $a[0]." "; echo $sss; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ZTj7
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $b, !2 = $sss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN_DIM                                               !0, 0
          2        OP_DATA                                                  'abc%3B%3B%3B%3Bdef%3Bghi%3B'
    4     3        INIT_FCALL                                               'mb_strstr'
          4        FETCH_DIM_R                                      ~5      !0, 0
          5        SEND_VAL                                                 ~5
          6        SEND_VAL                                                 '%3B'
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
    6     9        INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 1
         12        STRLEN                                           ~8      !1
         13        SUB                                              ~9      ~8, 1
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !2, $10
    7    17        FETCH_DIM_R                                      ~12     !0, 0
         18        CONCAT                                           ~13     ~12, '+'
         19        ECHO                                                     ~13
    8    20        ECHO                                                     !2
    9    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.92 ms | 1395 KiB | 17 Q