3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar ( int $a, int $b, int $c, int|string $d = 'IV' ) { echo $a . "\n"; echo $b . "\n"; echo $c . "\n"; echo $d . "\n"; } public function baz ( int|string $dd = 'IV', int $aa, int $bb, int $cc, ) { echo $aa . "\n"; echo $bb . "\n"; echo $cc . "\n"; echo $dd . "\n"; } } $Obj = new Foo(); $Obj->bar( c: 3, a: 1, b: 2 ); $Obj->baz( cc: 3, aa: 1, bb: 2 );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NToiL
function name:  (null)
number of ops:  16
compiled vars:  !0 = $Obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   30     3        INIT_METHOD_CALL                                         !0, 'bar'
   31     4        SEND_VAL_EX                                              3, 'c'
   32     5        SEND_VAL_EX                                              1, 'a'
   33     6        SEND_VAL_EX                                              2, 'b'
          7        CHECK_UNDEF_ARGS                                         
   30     8        DO_FCALL                                      1          
   35     9        INIT_METHOD_CALL                                         !0, 'baz'
   36    10        SEND_VAL_EX                                              3, 'cc'
   37    11        SEND_VAL_EX                                              1, 'aa'
   38    12        SEND_VAL_EX                                              2, 'bb'
         13        CHECK_UNDEF_ARGS                                         
   35    14        DO_FCALL                                      1          
   39    15      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NToiL
function name:  bar
number of ops:  13
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      'IV'
   10     4        CONCAT                                           ~4      !0, '%0A'
          5        ECHO                                                     ~4
   11     6        CONCAT                                           ~5      !1, '%0A'
          7        ECHO                                                     ~5
   12     8        CONCAT                                           ~6      !2, '%0A'
          9        ECHO                                                     ~6
   13    10        CONCAT                                           ~7      !3, '%0A'
         11        ECHO                                                     ~7
   14    12      > RETURN                                                   null

End of function bar

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NToiL
function name:  baz
number of ops:  13
compiled vars:  !0 = $dd, !1 = $aa, !2 = $bb, !3 = $cc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   22     4        CONCAT                                           ~4      !1, '%0A'
          5        ECHO                                                     ~4
   23     6        CONCAT                                           ~5      !2, '%0A'
          7        ECHO                                                     ~5
   24     8        CONCAT                                           ~6      !3, '%0A'
          9        ECHO                                                     ~6
   25    10        CONCAT                                           ~7      !0, '%0A'
         11        ECHO                                                     ~7
   26    12      > RETURN                                                   null

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.76 ms | 1000 KiB | 13 Q