3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Programmer { public $name; public function __construct($name) { $this->name = $name; } } class Program { public $name; public function __construct($name) { $this->name = $name; } } function employ(Programmer $programmer, Company $company) { echo "Employing " . $programmer->name . " in " . $company->name; } $me = new Programmer("John"); $medicare = new Program("Medicare"); $enroll = employ($me, $medicare);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sQuWM
function name:  (null)
number of ops:  14
compiled vars:  !0 = $me, !1 = $medicare, !2 = $enroll
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $3      'Programmer'
          1        SEND_VAL_EX                                              'John'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   23     4        NEW                                              $6      'Program'
          5        SEND_VAL_EX                                              'Medicare'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   24     8        INIT_FCALL                                               'employ'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        DO_FCALL                                      0  $9      
         12        ASSIGN                                                   !2, $9
         13      > RETURN                                                   1

Function employ:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sQuWM
function name:  employ
number of ops:  9
compiled vars:  !0 = $programmer, !1 = $company
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     2        FETCH_OBJ_R                                      ~2      !0, 'name'
          3        CONCAT                                           ~3      'Employing+', ~2
          4        CONCAT                                           ~4      ~3, '+in+'
          5        FETCH_OBJ_R                                      ~5      !1, 'name'
          6        CONCAT                                           ~6      ~4, ~5
          7        ECHO                                                     ~6
   20     8      > RETURN                                                   null

End of function employ

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

End of function __construct

End of class Programmer.

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

End of function __construct

End of class Program.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.94 ms | 1402 KiB | 14 Q