3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Backup_Config { public $a = ''; function __construct() { $this->a = time(); } } class Backup extends Backup_Config { public $b = 'test'; function __construct() { parent::__construct(); echo __CLASS__ . ':' . $this->a . '<BR>'; } public function foo () { $helper = new Backup_Helper(); echo __FUNCTION__ . ':' . $this->a . '<BR>'; $helper->bar(); } } class Backup_Helper extends Backup { public function bar() { echo __FUNCTION__ . ':' . $this->a . ' and ' . $this->b . '<BR>'; } } $init = new Backup(); $init->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8go5j
function name:  (null)
number of ops:  6
compiled vars:  !0 = $init
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   NEW                                              $1      'Backup'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   31     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function __construct

End of class Backup_Config.

Class Backup:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8go5j
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   14     2        FETCH_OBJ_R                                      ~1      'a'
          3        CONCAT                                           ~2      'Backup%3A', ~1
          4        CONCAT                                           ~3      ~2, '%3CBR%3E'
          5        ECHO                                                     ~3
   15     6      > RETURN                                                   null

End of function __construct

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8go5j
function name:  foo
number of ops:  10
compiled vars:  !0 = $helper
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Backup_Helper'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        FETCH_OBJ_R                                      ~4      'a'
          4        CONCAT                                           ~5      'foo%3A', ~4
          5        CONCAT                                           ~6      ~5, '%3CBR%3E'
          6        ECHO                                                     ~6
   19     7        INIT_METHOD_CALL                                         !0, 'bar'
          8        DO_FCALL                                      0          
   20     9      > RETURN                                                   null

End of function foo

End of class Backup.

Class Backup_Helper:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8go5j
function name:  bar
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        CONCAT                                           ~1      'bar%3A', ~0
          2        CONCAT                                           ~2      ~1, '+and+'
          3        FETCH_OBJ_R                                      ~3      'b'
          4        CONCAT                                           ~4      ~2, ~3
          5        CONCAT                                           ~5      ~4, '%3CBR%3E'
          6        ECHO                                                     ~5
   27     7      > RETURN                                                   null

End of function bar

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8go5j
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   14     2        FETCH_OBJ_R                                      ~1      'a'
          3        CONCAT                                           ~2      'Backup%3A', ~1
          4        CONCAT                                           ~3      ~2, '%3CBR%3E'
          5        ECHO                                                     ~3
   15     6      > RETURN                                                   null

End of function __construct

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8go5j
function name:  foo
number of ops:  10
compiled vars:  !0 = $helper
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Backup_Helper'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        FETCH_OBJ_R                                      ~4      'a'
          4        CONCAT                                           ~5      'foo%3A', ~4
          5        CONCAT                                           ~6      ~5, '%3CBR%3E'
          6        ECHO                                                     ~6
   19     7        INIT_METHOD_CALL                                         !0, 'bar'
          8        DO_FCALL                                      0          
   20     9      > RETURN                                                   null

End of function foo

End of class Backup_Helper.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.55 ms | 1456 KiB | 14 Q