3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo1() { echo 1; } $foo1 = 'foo1'; $foo1(); $foo2 = function () { echo 2; }; $foo2(); class Three { public function __invoke() { echo 3; } } $foo3 = new Three(); $foo3(); class Bar { static function foo4() { echo 4;} function foo5() { echo 5; } } $foo3 = 'Bar::foo3'; $foo3(); // we should make this work $foo4 = array(new Bar, 'foo4'); $foo4(); // we should make this work
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcZkd
function name:  (null)
number of ops:  23
compiled vars:  !0 = $foo1, !1 = $foo2, !2 = $foo3, !3 = $foo4
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 'foo1'
    5     1        INIT_DYNAMIC_CALL                                            !0
          2        DO_FCALL                                          0          
    8     3        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          4        ASSIGN                                                       !1, ~6
    9     5        INIT_DYNAMIC_CALL                                            !1
          6        DO_FCALL                                          0          
   15     7        NEW                                                  $9      'Three'
          8        DO_FCALL                                          0          
          9        ASSIGN                                                       !2, $9
   16    10        INIT_DYNAMIC_CALL                                            !2
         11        DO_FCALL                                          0          
   24    12        ASSIGN                                                       !2, 'Bar%3A%3Afoo3'
   25    13        INIT_DYNAMIC_CALL                                            !2
         14        DO_FCALL                                          0          
   28    15        NEW                                                  $15     'Bar'
         16        DO_FCALL                                          0          
         17        INIT_ARRAY                                           ~17     $15
         18        ADD_ARRAY_ELEMENT                                    ~17     'foo4'
         19        ASSIGN                                                       !3, ~17
   29    20        INIT_DYNAMIC_CALL                                            !3
         21        DO_FCALL                                          0          
         22      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcZkd
function name:  {closure:/in/VcZkd:8}
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                         2
          1      > RETURN                                                       null

End of Dynamic Function 0

Function foo1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcZkd
function name:  foo1
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                         1
          1      > RETURN                                                       null

End of function foo1

Class Three:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcZkd
function name:  __invoke
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                         3
          1      > RETURN                                                       null

End of function __invoke

End of class Three.

Class Bar:
Function foo4:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcZkd
function name:  foo4
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                         4
          1      > RETURN                                                       null

End of function foo4

Function foo5:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcZkd
function name:  foo5
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                         5
          1      > RETURN                                                       null

End of function foo5

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.3 ms | 2677 KiB | 13 Q