3v4l.org

run code in 300+ PHP versions simultaneously
<?php class strings { function fix_string($a) { echo implode("",$a); } function fix_strings($b) { foreach ($b as $item) { $this->fix_string($item); } } } $s = new strings(); $ret = $s->fix_strings(array('Derick','der','dere')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A5Hmf
function name:  (null)
number of ops:  8
compiled vars:  !0 = $s, !1 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'strings'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        INIT_METHOD_CALL                                         !0, 'fix_strings'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
   17     7      > RETURN                                                   1

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

End of function fix_string

Function fix_strings:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/A5Hmf
function name:  fix_strings
number of ops:  9
compiled vars:  !0 = $b, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1      > FE_RESET_R                                       $2      !0, ->7
          2    > > FE_FETCH_R                                               $2, !1, ->7
   10     3    >   INIT_METHOD_CALL                                         'fix_string'
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
    9     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $2
   12     8      > RETURN                                                   null

End of function fix_strings

End of class strings.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.7 ms | 1396 KiB | 15 Q