3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
252.13 ms | 1000 KiB | 14 Q