3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo1($a=null, $b) { var_dump($a); var_dump($b); } function foo2($a, $b=null, $c) { var_dump($a); var_dump($b); var_dump($c); } foo1(1, 2); foo1(3); foo2(4); foo2(4, 5); foo2(4, 5, 6);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2Gk8K
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'foo1'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 2
          3        DO_FCALL                                      0          
   15     4        INIT_FCALL                                               'foo1'
          5        SEND_VAL                                                 3
          6        DO_FCALL                                      0          
   17     7        INIT_FCALL                                               'foo2'
          8        SEND_VAL                                                 4
          9        DO_FCALL                                      0          
   18    10        INIT_FCALL                                               'foo2'
         11        SEND_VAL                                                 4
         12        SEND_VAL                                                 5
         13        DO_FCALL                                      0          
   19    14        INIT_FCALL                                               'foo2'
         15        SEND_VAL                                                 4
         16        SEND_VAL                                                 5
         17        SEND_VAL                                                 6
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Function foo1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2Gk8K
function name:  foo1
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    5     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    6     8      > RETURN                                                   null

End of function foo1

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

End of function foo2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161 ms | 1403 KiB | 20 Q