3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.8 ms | 1386 KiB | 15 Q