3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait ExampleTrait { protected $developer; public function really() { echo 'yep'; } } class Work { protected $developer; use ExampleTrait; public function __construct() { $this->developer = 'Aaron'; echo $this->developer; } public function really() { echo 'noppers'; } } $work = new Work();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDWRn
function name:  (null)
number of ops:  5
compiled vars:  !0 = $work
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'work'
   32     1        NEW                                              $1      'Work'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class ExampleTrait:
Function really:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDWRn
function name:  really
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'yep'
   10     1      > RETURN                                                   null

End of function really

End of class ExampleTrait.

Class Work:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDWRn
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ASSIGN_OBJ                                               'developer'
          1        OP_DATA                                                  'Aaron'
   23     2        FETCH_OBJ_R                                      ~1      'developer'
          3        ECHO                                                     ~1
   24     4      > RETURN                                                   null

End of function __construct

Function really:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDWRn
function name:  really
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   ECHO                                                     'noppers'
   29     1      > RETURN                                                   null

End of function really

End of class Work.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.96 ms | 1394 KiB | 13 Q