3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = '012/sekolah/smk/2018'; $arr = preg_split('/(?<=[0-9])/i',$var); $arr[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/1nI5k
function name:  (null)
number of ops:  15
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        ASSIGN_DIM_OP                +=               1          !1, 2
          7        OP_DATA                                                  1
    5     8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
    6    13        ECHO                                                     !0
    7    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.45 ms | 1394 KiB | 17 Q