3v4l.org

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1395 KiB | 15 Q