3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Model { public static $table = 'table'; public static function getTable() { return static::$table; // self:: / static:: } } class User extends Model { public static $table = 'users'; } echo User::getTable(); // 'table'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ERiqM
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                      'User', 'getTable'
          1        DO_FCALL                                          0  $0      
          2        ECHO                                                         $0
          3      > RETURN                                                       1

Class Model:
Function gettable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ERiqM
function name:  getTable
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   FETCH_STATIC_PROP_R              unknown             ~0      'table'
          1      > RETURN                                                       ~0
    7     2*     > RETURN                                                       null

End of function gettable

End of class Model.

Class User:
Function gettable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ERiqM
function name:  getTable
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   FETCH_STATIC_PROP_R              unknown             ~0      'table'
          1      > RETURN                                                       ~0
    7     2*     > RETURN                                                       null

End of function gettable

End of class User.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.82 ms | 1976 KiB | 13 Q