3v4l.org

run code in 500+ PHP versions simultaneously
<?php class MyClass { function myMethod() {} } $method = new ReflectionMethod('MyClass', 'myMethod'); echo 'signature 1, unchanged: ' . $method->isPublic() . "\n"; $method = new ReflectionMethod('MyClass::myMethod'); echo 'signature 2, deprecated in PHP 8.4: ' . $method->isPublic() . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hv24N
function name:  (null)
number of ops:  20
compiled vars:  !0 = $method
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   NEW                                                  $1      'ReflectionMethod'
          1        SEND_VAL_EX                                                  'MyClass'
          2        SEND_VAL_EX                                                  'myMethod'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
    9     5        INIT_METHOD_CALL                                             !0, 'isPublic'
          6        DO_FCALL                                          0  $4      
          7        CONCAT                                               ~5      'signature+1%2C+unchanged%3A+', $4
          8        CONCAT                                               ~6      ~5, '%0A'
          9        ECHO                                                         ~6
   11    10        NEW                                                  $7      'ReflectionMethod'
         11        SEND_VAL_EX                                                  'MyClass%3A%3AmyMethod'
         12        DO_FCALL                                          0          
         13        ASSIGN                                                       !0, $7
   12    14        INIT_METHOD_CALL                                             !0, 'isPublic'
         15        DO_FCALL                                          0  $10     
         16        CONCAT                                               ~11     'signature+2%2C+deprecated+in+PHP+8.4%3A+', $10
         17        CONCAT                                               ~12     ~11, '%0A'
         18        ECHO                                                         ~12
         19      > RETURN                                                       1

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

End of function mymethod

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.99 ms | 1456 KiB | 12 Q