3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo1($a=null, $b) { printf('foo1: %s, %s', var_export($a, true), var_export($b, true)); } function foo2($a, $b=null, $c) { printf('foo2: %s, %s, %s', var_export($a, true), var_export($b, true), var_export($c, true)); } 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/hEt0u
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'foo1'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 2
          3        DO_FCALL                                      0          
   12     4        INIT_FCALL                                               'foo1'
          5        SEND_VAL                                                 3
          6        DO_FCALL                                      0          
   14     7        INIT_FCALL                                               'foo2'
          8        SEND_VAL                                                 4
          9        DO_FCALL                                      0          
   15    10        INIT_FCALL                                               'foo2'
         11        SEND_VAL                                                 4
         12        SEND_VAL                                                 5
         13        DO_FCALL                                      0          
   16    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/hEt0u
function name:  foo1
number of ops:  16
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                                               'printf'
          3        SEND_VAL                                                 'foo1%3A+%25s%2C+%25s'
          4        INIT_FCALL                                               'var_export'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        INIT_FCALL                                               'var_export'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $3      
         13        SEND_VAR                                                 $3
         14        DO_ICALL                                                 
    5    15      > 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/hEt0u
function name:  foo2
number of ops:  22
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV                                             !2      
    8     3        INIT_FCALL                                               'printf'
          4        SEND_VAL                                                 'foo2%3A+%25s%2C+%25s%2C+%25s'
          5        INIT_FCALL                                               'var_export'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        INIT_FCALL                                               'var_export'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        INIT_FCALL                                               'var_export'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $5      
         19        SEND_VAR                                                 $5
         20        DO_ICALL                                                 
    9    21      > RETURN                                                   null

End of function foo2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.78 ms | 1403 KiB | 22 Q