3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function staticWithoutThis() { var_dump("static"); } public function nonStaticWithoutThis() { var_dump("no this"); } public function nonStaticWithThis() { var_dump($this); } public static function staticWithThis() { var_dump($this); } } Foo::staticWithoutThis(); Foo::nonStaticWithoutThis(); Foo::nonStaticWithThis(); Foo::staticWithThis();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNrKq
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'staticWithoutThis'
          1        DO_FCALL                                      0          
   14     2        INIT_STATIC_METHOD_CALL                                  'Foo', 'nonStaticWithoutThis'
          3        DO_FCALL                                      0          
   15     4        INIT_STATIC_METHOD_CALL                                  'Foo', 'nonStaticWithThis'
          5        DO_FCALL                                      0          
   16     6        INIT_STATIC_METHOD_CALL                                  'Foo', 'staticWithThis'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Foo:
Function staticwithoutthis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNrKq
function name:  staticWithoutThis
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'static'
          2        DO_ICALL                                                 
          3      > RETURN                                                   null

End of function staticwithoutthis

Function nonstaticwithoutthis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNrKq
function name:  nonStaticWithoutThis
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'no+this'
          2        DO_ICALL                                                 
          3      > RETURN                                                   null

End of function nonstaticwithoutthis

Function nonstaticwiththis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNrKq
function name:  nonStaticWithThis
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function nonstaticwiththis

Function staticwiththis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNrKq
function name:  staticWithThis
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function staticwiththis

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.51 ms | 1405 KiB | 15 Q