3v4l.org

run code in 300+ 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; } } class Bar { static function foo4() { echo 4;} function foo5() { echo 5; } static function foo6() { echo 6;} } $foo3 = array('Bar','foo4'); $foo3(); // we should make this work $foo4 = array(new Bar, 'foo5'); $foo4(); // we should make this work $foo6 = [Bar::class, 'foo6']; $foo6();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VFAl3
function name:  (null)
number of ops:  27
compiled vars:  !0 = $foo1, !1 = $foo2, !2 = $foo3, !3 = $foo4, !4 = $foo6
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                                  '%00%7Bclosure%7D%2Fin%2FVFAl3%3A8%240'
          4        ASSIGN                                                   !1, ~7
    9     5        INIT_DYNAMIC_CALL                                        !1
          6        DO_FCALL                                      0          
   15     7        NEW                                              $10     'Three'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $10
   16    10        INIT_DYNAMIC_CALL                                        !2
         11        DO_FCALL                                      0          
   24    12        DECLARE_CLASS                                            'bar'
   29    13        ASSIGN                                                   !2, <array>
   30    14        INIT_DYNAMIC_CALL                                        !2
         15        DO_FCALL                                      0          
   33    16        NEW                                              $16     'Bar'
         17        DO_FCALL                                      0          
         18        INIT_ARRAY                                       ~18     $16
         19        ADD_ARRAY_ELEMENT                                ~18     'foo5'
         20        ASSIGN                                                   !3, ~18
   34    21        INIT_DYNAMIC_CALL                                        !3
         22        DO_FCALL                                      0          
   36    23        ASSIGN                                                   !4, <array>
   37    24        INIT_DYNAMIC_CALL                                        !4
         25        DO_FCALL                                      0          
         26      > RETURN                                                   1

Function foo1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VFAl3
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

Function %00%7Bclosure%7D%2Fin%2FVFAl3%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VFAl3
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FVFAl3%3A8%240

Class Three:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VFAl3
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/VFAl3
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/VFAl3
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.

Class Bar:
Function foo4:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VFAl3
function name:  foo4
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     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/VFAl3
function name:  foo5
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ECHO                                                     5
          1      > RETURN                                                   null

End of function foo5

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

End of function foo6

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.71 ms | 1399 KiB | 13 Q