3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = '012/sekolah/smk/2018'; $arr = preg_split('/(?<=[0-9])/i',$var); $arr[1][2] +=1; $var = implode('',$arr); echo $var;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bq4d2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $var, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '012%2Fsekolah%2Fsmk%2F2018'
    3     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%2F%28%3F%3C%3D%5B0-9%5D%29%2Fi'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    4     6        FETCH_DIM_RW                                     $5      !1, 1
          7        ASSIGN_DIM_OP                +=               1          $5, 2
          8        OP_DATA                                                  1
    5     9        INIT_FCALL                                               'implode'
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !0, $7
    6    14        ECHO                                                     !0
    7    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.44 ms | 1394 KiB | 17 Q