3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait tSB_FormFieldObject { } interface iSB_FormFieldObject { } class SB_FormFieldObject implements iSB_FormFieldObject { use tSB_FormFieldObject; public $Test2 = "aa"; } function test($a=null) { echo "trait: " .($a instanceof tSB_FormFieldObject) . PHP_EOL; echo "interface: " .($a instanceof iSB_FormFieldObject) . PHP_EOL; } $a = new SB_FormFieldObject(); test($a); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NjDaN
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'sb_formfieldobject'
   16     1        NEW                                              $1      'SB_FormFieldObject'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   17     4        INIT_FCALL                                               'test'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
   18     7      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NjDaN
function name:  test
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                        !0      null
   12     1        INSTANCEOF                                       ~1      !0, 'tSB_FormFieldObject'
          2        CONCAT                                           ~2      'trait%3A+', ~1
          3        CONCAT                                           ~3      ~2, '%0A'
          4        ECHO                                                     ~3
   13     5        INSTANCEOF                                       ~4      !0, 'iSB_FormFieldObject'
          6        CONCAT                                           ~5      'interface%3A+', ~4
          7        CONCAT                                           ~6      ~5, '%0A'
          8        ECHO                                                     ~6
   14     9      > RETURN                                                   null

End of function test

Class tSB_FormFieldObject: [no user functions]
Class iSB_FormFieldObject: [no user functions]
Class SB_FormFieldObject: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.47 ms | 1389 KiB | 14 Q