3v4l.org

run code in 300+ PHP versions simultaneously
<?php $method = 'method'; class Test { function method() { echo 'method'; } } $test = new Test(); $test->method(); $test->$method(); $test->{'method'}(); Test::method(); Test::$method(); Test::{'method'}();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lMeJn
function name:  (null)
number of ops:  17
compiled vars:  !0 = $method, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'method'
   13     1        NEW                                              $3      'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   15     4        INIT_METHOD_CALL                                         !1, 'method'
          5        DO_FCALL                                      0          
   16     6        INIT_METHOD_CALL                                         !1, !0
          7        DO_FCALL                                      0          
   17     8        INIT_METHOD_CALL                                         !1, 'method'
          9        DO_FCALL                                      0          
   19    10        INIT_STATIC_METHOD_CALL                                  'Test', 'method'
         11        DO_FCALL                                      0          
   20    12        INIT_STATIC_METHOD_CALL                                  'Test', !0
         13        DO_FCALL                                      0          
   21    14        INIT_STATIC_METHOD_CALL                                  'Test', 'method'
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

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

End of function method

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.69 ms | 1385 KiB | 13 Q