3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($a, $b='default value') { echo implode(' - ', func_get_args()).PHP_EOL; } foo('A', 'B', 'C', 'D', 'E', 'F'); foo('A', 'B'); foo('A', 0, 1); foo('A', null); foo('A');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kFGKK
function name:  (null)
number of ops:  25
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 'A'
          2        SEND_VAL                                                 'B'
          3        SEND_VAL                                                 'C'
          4        SEND_VAL                                                 'D'
          5        SEND_VAL                                                 'E'
          6        SEND_VAL                                                 'F'
          7        DO_FCALL                                      0          
    8     8        INIT_FCALL                                               'foo'
          9        SEND_VAL                                                 'A'
         10        SEND_VAL                                                 'B'
         11        DO_FCALL                                      0          
    9    12        INIT_FCALL                                               'foo'
         13        SEND_VAL                                                 'A'
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 1
         16        DO_FCALL                                      0          
   10    17        INIT_FCALL                                               'foo'
         18        SEND_VAL                                                 'A'
         19        SEND_VAL                                                 null
         20        DO_FCALL                                      0          
   11    21        INIT_FCALL                                               'foo'
         22        SEND_VAL                                                 'A'
         23        DO_FCALL                                      0          
         24      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kFGKK
function name:  foo
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'default+value'
    4     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '+-+'
          4        FUNC_GET_ARGS                                    ~2      
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        CONCAT                                           ~4      $3, '%0A'
          8        ECHO                                                     ~4
    5     9      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.47 ms | 1398 KiB | 20 Q