3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Filter { // PHP 5: filter is a constructor // PHP 7: filter is a constructor and E_DEPRECATED is raised // PHP 8: filter is a normal method and is not a constructor; no E_DEPRECATED is raised function filter($a) {} } $filter = new ReflectionMethod('Filter', 'filter'); // PHP 5: bool(true) // PHP 7: bool(true) // PHP 8: bool(false) var_dump($filter->isConstructor());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g1IjY
function name:  (null)
number of ops:  11
compiled vars:  !0 = $filter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Filter'
          2        SEND_VAL_EX                                              'filter'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   16     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'isConstructor'
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Filter:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g1IjY
function name:  filter
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function filter

End of class Filter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1394 KiB | 15 Q