3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { private $table_name; public function __construct() { $this->table_name = strtolower(static::class); } } class ChildClass extends ParentClass { public function __construct() { parent::__construct(); // ... } } $parent = new ParentClass(); $child = new ChildClass(); echo $parent->table_name . "<br />" . $child->table_name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hkSSL
function name:  (null)
number of ops:  12
compiled vars:  !0 = $parent, !1 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $2      'ParentClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   26     3        NEW                                              $5      'ChildClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   28     6        FETCH_OBJ_R                                      ~8      !0, 'table_name'
          7        CONCAT                                           ~9      ~8, '%3Cbr+%2F%3E'
          8        FETCH_OBJ_R                                      ~10     !1, 'table_name'
          9        CONCAT                                           ~11     ~9, ~10
         10        ECHO                                                     ~11
         11      > RETURN                                                   1

Class ParentClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hkSSL
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'strtolower'
          1        FETCH_CLASS_NAME                                 ~1      
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                         $2      
          4        ASSIGN_OBJ                                               'table_name'
          5        OP_DATA                                                  $2
   10     6      > RETURN                                                   null

End of function __construct

End of class ParentClass.

Class ChildClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hkSSL
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   21     2      > RETURN                                                   null

End of function __construct

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.22 ms | 1396 KiB | 15 Q