3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DatabaseConnection { } class DoStuff { protected $connection; public function __construct(DatabaseConnection $connection) { $this->connection = $connection; } public function someQuery() { $this->connection->query("SELECT ... blah blah blah"); } public function __debugInfo() { return array('no', 'soup', 'for', 'you'); } } $stuff = new DoStuff(new DatabaseConnection); var_dump($stuff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/32ch7
function name:  (null)
number of ops:  10
compiled vars:  !0 = $stuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'DoStuff'
          1        NEW                                              $2      'DatabaseConnection'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   28     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class DatabaseConnection: [no user functions]
Class DoStuff:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/32ch7
function name:  __construct
number of ops:  4
compiled vars:  !0 = $connection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        ASSIGN_OBJ                                               'connection'
          2        OP_DATA                                                  !0
   14     3      > RETURN                                                   null

End of function __construct

Function somequery:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/32ch7
function name:  someQuery
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'connection'
          1        INIT_METHOD_CALL                                         ~0, 'query'
          2        SEND_VAL_EX                                              'SELECT+...+blah+blah+blah'
          3        DO_FCALL                                      0          
   19     4      > RETURN                                                   null

End of function somequery

Function __debuginfo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/32ch7
function name:  __debugInfo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E > > RETURN                                                   <array>
   24     1*     > RETURN                                                   null

End of function __debuginfo

End of class DoStuff.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.38 ms | 1396 KiB | 15 Q