3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IInterface { public function someMethod(); public function anotherMethod(); } function classData( ReflectionClass $class ) { $details = ""; $name = $class->getName(); if ( $class->isInterface() ) { $details .= "$name -- это интерфейс\n"; } if ( $class->isAbstract() ) { $details .= "$name -- это абстрактный класс\n"; } return $details; } $class_info = new ReflectionClass('IInterface'); echo classData($class_info);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9f7p6
function name:  (null)
number of ops:  9
compiled vars:  !0 = $class_info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'ReflectionClass'
          1        SEND_VAL_EX                                              'IInterface'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   23     4        INIT_FCALL                                               'classdata'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
          8      > RETURN                                                   1

Function classdata:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 11
filename:       /in/9f7p6
function name:  classData
number of ops:  19
compiled vars:  !0 = $class, !1 = $details, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN                                                   !1, ''
   10     2        INIT_METHOD_CALL                                         !0, 'getName'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !2, $4
   12     5        INIT_METHOD_CALL                                         !0, 'isInterface'
          6        DO_FCALL                                      0  $6      
          7      > JMPZ                                                     $6, ->11
   13     8    >   NOP                                                      
          9        FAST_CONCAT                                      ~7      !2, '+--+%D1%8D%D1%82%D0%BE+%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D1%84%D0%B5%D0%B9%D1%81%0A'
         10        ASSIGN_OP                                     8          !1, ~7
   16    11    >   INIT_METHOD_CALL                                         !0, 'isAbstract'
         12        DO_FCALL                                      0  $9      
         13      > JMPZ                                                     $9, ->17
   17    14    >   NOP                                                      
         15        FAST_CONCAT                                      ~10     !2, '+--+%D1%8D%D1%82%D0%BE+%D0%B0%D0%B1%D1%81%D1%82%D1%80%D0%B0%D0%BA%D1%82%D0%BD%D1%8B%D0%B9+%D0%BA%D0%BB%D0%B0%D1%81%D1%81%0A'
         16        ASSIGN_OP                                     8          !1, ~10
   19    17    > > RETURN                                                   !1
   20    18*     > RETURN                                                   null

End of function classdata

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

End of function somemethod

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

End of function anothermethod

End of class IInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.72 ms | 1407 KiB | 14 Q