3v4l.org

run code in 300+ PHP versions simultaneously
<?php $view = insertAtPosition('/views/index/signin.phtml'); function insertAtPosition($string, $insert, $position) { return implode($insert, str_split($string, $position)); } echo implode('/' , '/views/index/signin.phtml');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KPhRO
function name:  (null)
number of ops:  10
compiled vars:  !0 = $view
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'insertAtPosition'
          1        SEND_VAL_EX                                              '%2Fviews%2Findex%2Fsignin.phtml'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
    9     4        INIT_FCALL                                               'implode'
          5        SEND_VAL                                                 '%2F'
          6        SEND_VAL                                                 '%2Fviews%2Findex%2Fsignin.phtml'
          7        DO_ICALL                                         $3      
          8        ECHO                                                     $3
          9      > RETURN                                                   1

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

End of function insertatposition

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.08 ms | 1399 KiB | 17 Q