3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hyphenate($str) { return implode("-", str_split($str, 3)); } echo hyphenate("ABCDEF");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lD1YO
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'hyphenate'
          1        SEND_VAL                                                 'ABCDEF'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function hyphenate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lD1YO
function name:  hyphenate
number of ops:  11
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '-'
          3        INIT_FCALL                                               'str_split'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 3
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                         $2      
          9      > RETURN                                                   $2
    4    10*     > RETURN                                                   null

End of function hyphenate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.09 ms | 1389 KiB | 18 Q