3v4l.org

run code in 300+ PHP versions simultaneously
<?php function wrap($text, $chunkSize) { return join("\n", str_split($text, $chunkSize)); } var_dump(wrap("hello world", 2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bFAa3
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'wrap'
          2        SEND_VAL                                                 'hello+world'
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function wrap

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.41 ms | 1389 KiB | 20 Q