3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbstractDomainObject { protected $id = null; /** * Id */ public function setId($id) { if (!is_null($this->id)) { throw new Exception('This object already has an id set and it can not be changed. Use the data mapper to create a new domain object.'); } $this->id = $id; return $this; } public function getId() { return $this->id; } } class Article extends AbstractDomainObject { protected $title = null; protected $published = null; protected $content = null; /** * Title */ public function setTitle($title) { $this->title = $title; return $this; } public function getTitle() { return $this->title; } /** * Published at */ public function setPublished($published) { $this->published = $published; return $this; } public function getPublished() { return $this->published; } /** * Content */ public function setContent($content) { $this->content = $content; return $this; } public function getContent() { return $this->content; } } class Test { public function __construct(AbstractDomainObject $t) { } } $test = new Test(new Article()); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ejgCO
function name:  (null)
number of ops:  7
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   NEW                                              $1      'Test'
          1        NEW                                              $2      'Article'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   81     6      > RETURN                                                   1

Class AbstractDomainObject:
Function setid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ejgCO
function name:  setId
number of ops:  14
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        FETCH_OBJ_R                                      ~1      'id'
          2        TYPE_CHECK                                    2  ~2      ~1
          3        BOOL_NOT                                         ~3      ~2
          4      > JMPZ                                                     ~3, ->9
   13     5    >   NEW                                              $4      'Exception'
          6        SEND_VAL_EX                                              'This+object+already+has+an+id+set+and+it+can+not+be+changed.+Use+the+data+mapper+to+create+a+new+domain+object.'
          7        DO_FCALL                                      0          
          8      > THROW                                         0          $4
   15     9    >   ASSIGN_OBJ                                               'id'
         10        OP_DATA                                                  !0
   17    11        FETCH_THIS                                       ~7      
         12      > RETURN                                                   ~7
   18    13*     > RETURN                                                   null

End of function setid

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

End of function getid

End of class AbstractDomainObject.

Class Article:
Function settitle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ejgCO
function name:  setTitle
number of ops:  6
compiled vars:  !0 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
   36     1        ASSIGN_OBJ                                               'title'
          2        OP_DATA                                                  !0
   38     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   39     5*     > RETURN                                                   null

End of function settitle

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

End of function gettitle

Function setpublished:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ejgCO
function name:  setPublished
number of ops:  6
compiled vars:  !0 = $published
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   47     0  E >   RECV                                             !0      
   49     1        ASSIGN_OBJ                                               'published'
          2        OP_DATA                                                  !0
   51     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   52     5*     > RETURN                                                   null

End of function setpublished

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

End of function getpublished

Function setcontent:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ejgCO
function name:  setContent
number of ops:  6
compiled vars:  !0 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   60     0  E >   RECV                                             !0      
   62     1        ASSIGN_OBJ                                               'content'
          2        OP_DATA                                                  !0
   64     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   65     5*     > RETURN                                                   null

End of function setcontent

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

End of function getcontent

Function setid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ejgCO
function name:  setId
number of ops:  14
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        FETCH_OBJ_R                                      ~1      'id'
          2        TYPE_CHECK                                    2  ~2      ~1
          3        BOOL_NOT                                         ~3      ~2
          4      > JMPZ                                                     ~3, ->9
   13     5    >   NEW                                              $4      'Exception'
          6        SEND_VAL_EX                                              'This+object+already+has+an+id+set+and+it+can+not+be+changed.+Use+the+data+mapper+to+create+a+new+domain+object.'
          7        DO_FCALL                                      0          
          8      > THROW                                         0          $4
   15     9    >   ASSIGN_OBJ                                               'id'
         10        OP_DATA                                                  !0
   17    11        FETCH_THIS                                       ~7      
         12      > RETURN                                                   ~7
   18    13*     > RETURN                                                   null

End of function setid

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

End of function getid

End of class Article.

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ejgCO
function name:  __construct
number of ops:  2
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   74     0  E >   RECV                                             !0      
   76     1      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.82 ms | 1407 KiB | 13 Q