3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { private $name; public function __construct($name) { $this->name = $name; } public function getName() { return $this->name; } public function getTitle() { return $this->getName()." the person"; } public function sayHello() { echo "Hello, I'm ".$this->getTitle()."<br/>"; } public function sayGoodbye() { echo "Goodbye from ".self::getTitle()."<br/>"; } } class Geek extends Person { public function __construct($name) { parent::__construct($name); } public function getTitle() { return $this->getName()." the geek"; } } $geekObj = new Geek("Ludwig"); $geekObj->sayHello(); $geekObj->sayGoodbye();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  (null)
number of ops:  9
compiled vars:  !0 = $geekObj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   NEW                                              $1      'Geek'
          1        SEND_VAL_EX                                              'Ludwig'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   38     4        INIT_METHOD_CALL                                         !0, 'sayHello'
          5        DO_FCALL                                      0          
   39     6        INIT_METHOD_CALL                                         !0, 'sayGoodbye'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   12     2*     > RETURN                                                   null

End of function getname

Function gettitle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  getTitle
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_METHOD_CALL                                         'getName'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      $0, '+the+person'
          3      > RETURN                                                   ~1
   16     4*     > RETURN                                                   null

End of function gettitle

Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  sayHello
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_METHOD_CALL                                         'getTitle'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Hello%2C+I%27m+', $0
          3        CONCAT                                           ~2      ~1, '%3Cbr%2F%3E'
          4        ECHO                                                     ~2
   20     5      > RETURN                                                   null

End of function sayhello

Function saygoodbye:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  sayGoodbye
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_STATIC_METHOD_CALL                                  'getTitle'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Goodbye+from+', $0
          3        CONCAT                                           ~2      ~1, '%3Cbr%2F%3E'
          4        ECHO                                                     ~2
   24     5      > RETURN                                                   null

End of function saygoodbye

End of class Person.

Class Geek:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  __construct
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   29     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   30     4      > RETURN                                                   null

End of function __construct

Function gettitle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  getTitle
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_METHOD_CALL                                         'getName'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      $0, '+the+geek'
          3      > RETURN                                                   ~1
   34     4*     > RETURN                                                   null

End of function gettitle

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   12     2*     > RETURN                                                   null

End of function getname

Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  sayHello
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_METHOD_CALL                                         'getTitle'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Hello%2C+I%27m+', $0
          3        CONCAT                                           ~2      ~1, '%3Cbr%2F%3E'
          4        ECHO                                                     ~2
   20     5      > RETURN                                                   null

End of function sayhello

Function saygoodbye:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lf5b6
function name:  sayGoodbye
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_STATIC_METHOD_CALL                                  'getTitle'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Goodbye+from+', $0
          3        CONCAT                                           ~2      ~1, '%3Cbr%2F%3E'
          4        ECHO                                                     ~2
   24     5      > RETURN                                                   null

End of function saygoodbye

End of class Geek.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.81 ms | 1403 KiB | 13 Q