3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = '123456789'; $rest = substr($number, 0, 4); $rest2 = substr($number, 4, strlen($number)); $f = $rest.'-'.$rest2; echo $f;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B7Dbe
function name:  (null)
number of ops:  19
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        STRLEN                                           ~7      !0
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
    5    14        CONCAT                                           ~10     !1, '-'
         15        CONCAT                                           ~11     ~10, !2
         16        ASSIGN                                                   !3, ~11
    6    17        ECHO                                                     !3
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.76 ms | 1394 KiB | 15 Q