3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Blah { function getOne() { return 1;} } abstract class AbstractTest { use Blah; } class Test extends AbstractTest {} $t = new Test; echo $t->getOne(); var_dump(class_uses($t));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/laECh
function name:  (null)
number of ops:  15
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'abstracttest'
   11     1        DECLARE_CLASS                                            'test', 'abstracttest'
   14     2        NEW                                              $1      'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   15     5        INIT_METHOD_CALL                                         !0, 'getOne'
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
   16     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'class_uses'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Blah:
Function getone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/laECh
function name:  getOne
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   1
          1*     > RETURN                                                   null

End of function getone

End of class Blah.

Class AbstractTest: [no user functions]
Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.21 ms | 1395 KiB | 17 Q