3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ancestor { public $publicVar = 'ancestor\'s public var'; static $statisVar = 'ancestor\'s static var'; function publicMethod(){ // is $this is set up if(isset($this)){ echo "publicMethod is in object context"; }else{ echo "publicMethod is in static context"; } } } Ancestor::publicMethod();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3HChZ
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'Ancestor', 'publicMethod'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Ancestor:
Function publicmethod:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3HChZ
function name:  publicMethod
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ISSET_ISEMPTY_THIS                               ~0      
          1      > JMPZ                                                     ~0, ->4
    8     2    >   ECHO                                                     'publicMethod+is+in+object+context'
          3      > JMP                                                      ->5
   10     4    >   ECHO                                                     'publicMethod+is+in+static+context'
   12     5    > > RETURN                                                   null

End of function publicmethod

End of class Ancestor.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.94 ms | 1397 KiB | 13 Q