3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string='123456w'; $year = substr($string,0,4); $month = substr($string,4,2); echo $year;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NAAii
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $year, !2 = $month
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '123456w'
    3     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 4
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    4     7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 4
         10        SEND_VAL                                                 2
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !2, $6
    5    13        ECHO                                                     !1
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.15 ms | 1394 KiB | 15 Q