3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Concrete5_Helper_Foo { public static function get() { return new self(); } } class Foo extends Concrete5_Helper_Foo { protected $firstName = 'Chris'; public function getFirstName() { return $firstName; } } var_dump(Foo::get() instanceof Foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xkl70
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Foo', 'get'
          2        DO_FCALL                                      0  $0      
          3        INSTANCEOF                                       ~1      $0, 'Foo'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Class Concrete5_Helper_Foo:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xkl70
function name:  get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                          self                $0      
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    7     3*     > RETURN                                                   null

End of function get

End of class Concrete5_Helper_Foo.

Class Foo:
Function getfirstname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xkl70
function name:  getFirstName
number of ops:  2
compiled vars:  !0 = $firstName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   !0
   18     1*     > RETURN                                                   null

End of function getfirstname

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

End of function get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.86 ms | 1387 KiB | 15 Q