3v4l.org

run code in 300+ PHP versions simultaneously
<?php class derp_User { /** * DEPRECATED */ static function getByUserID($id) { return self::getByID($id); } static function getByID($id) { $u = new self; $u->uid = $id; return $u; } } class User extends derp_User {} class myOwnUser extends User {} $u = myOwnUser::getByUserID(1337); print_r($u);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDb7k
function name:  (null)
number of ops:  8
compiled vars:  !0 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'myOwnUser', 'getByUserID'
          1        SEND_VAL                                                 1337
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   20     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class derp_User:
Function getbyuserid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDb7k
function name:  getByUserID
number of ops:  6
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_STATIC_METHOD_CALL                                  'getByID'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    8     5*     > RETURN                                                   null

End of function getbyuserid

Function getbyid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDb7k
function name:  getByID
number of ops:  8
compiled vars:  !0 = $id, !1 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        NEW                          self                $2      
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $2
   11     4        ASSIGN_OBJ                                               !1, 'uid'
          5        OP_DATA                                                  !0
   12     6      > RETURN                                                   !1
   13     7*     > RETURN                                                   null

End of function getbyid

End of class derp_User.

Class User:
Function getbyuserid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDb7k
function name:  getByUserID
number of ops:  6
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_STATIC_METHOD_CALL                                  'getByID'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    8     5*     > RETURN                                                   null

End of function getbyuserid

Function getbyid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDb7k
function name:  getByID
number of ops:  8
compiled vars:  !0 = $id, !1 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        NEW                          self                $2      
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $2
   11     4        ASSIGN_OBJ                                               !1, 'uid'
          5        OP_DATA                                                  !0
   12     6      > RETURN                                                   !1
   13     7*     > RETURN                                                   null

End of function getbyid

End of class User.

Class myOwnUser:
Function getbyuserid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDb7k
function name:  getByUserID
number of ops:  6
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_STATIC_METHOD_CALL                                  'getByID'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    8     5*     > RETURN                                                   null

End of function getbyuserid

Function getbyid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LDb7k
function name:  getByID
number of ops:  8
compiled vars:  !0 = $id, !1 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        NEW                          self                $2      
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $2
   11     4        ASSIGN_OBJ                                               !1, 'uid'
          5        OP_DATA                                                  !0
   12     6      > RETURN                                                   !1
   13     7*     > RETURN                                                   null

End of function getbyid

End of class myOwnUser.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.47 ms | 1400 KiB | 15 Q