3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.68 ms | 1399 KiB | 17 Q