3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public static function callMeStatic(){ return true; } } $methodToCall = 'callMeStatic'; var_dump( foo::{$methodToCall}() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5WZB
function name:  (null)
number of ops:  7
compiled vars:  !0 = $methodToCall
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'callMeStatic'
    7     1        INIT_FCALL                                               'var_dump'
    8     2        INIT_STATIC_METHOD_CALL                                  'foo', !0
          3        DO_FCALL                                      0  $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
    9     6      > RETURN                                                   1

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

End of function callmestatic

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.46 ms | 1394 KiB | 15 Q