3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $arguments = func_num_args(); unset($arguments[0]); $params = array(); foreach ($arguments as $argument) { $params[] = sprintf('%d', $argument); } printf('%s(%s)', 'sdasd', implode(',', $params)); } foo (1, 2, 3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Odb40
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 2
          3        SEND_VAL                                                 3
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/Odb40
function name:  foo
number of ops:  24
compiled vars:  !0 = $arguments, !1 = $params, !2 = $argument
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FUNC_NUM_ARGS                                    ~3      
          1        ASSIGN                                                   !0, ~3
    6     2        UNSET_DIM                                                !0, 0
    7     3        ASSIGN                                                   !1, <array>
    8     4      > FE_RESET_R                                       $6      !0, ->13
          5    > > FE_FETCH_R                                               $6, !2, ->13
    9     6    >   INIT_FCALL                                               'sprintf'
          7        SEND_VAL                                                 '%25d'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $8      
         10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  $8
    8    12      > JMP                                                      ->5
         13    >   FE_FREE                                                  $6
   11    14        INIT_FCALL                                               'printf'
         15        SEND_VAL                                                 '%25s%28%25s%29'
         16        SEND_VAL                                                 'sdasd'
         17        INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '%2C'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $9      
         21        SEND_VAR                                                 $9
         22        DO_ICALL                                                 
   12    23      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.55 ms | 1399 KiB | 20 Q