3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Geolocation { function myMethod($param1, $param2) { return $param1 . ' ' . $param2; } } $method = 'myMethod'; $params = [1, 2]; $geo = new Geolocation(); $res = $geo->{$method}(...$params); echo json_encode($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i9n28
function name:  (null)
number of ops:  15
compiled vars:  !0 = $method, !1 = $params, !2 = $geo, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'myMethod'
    9     1        ASSIGN                                                   !1, <array>
   11     2        NEW                                              $6      'Geolocation'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $6
   12     5        INIT_METHOD_CALL                                         !2, !0
          6        SEND_UNPACK                                              !1
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      1  $9      
          9        ASSIGN                                                   !3, $9
   14    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $11     
         13        ECHO                                                     $11
         14      > RETURN                                                   1

Class Geolocation:
Function mymethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i9n28
function name:  myMethod
number of ops:  6
compiled vars:  !0 = $param1, !1 = $param2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        CONCAT                                           ~2      !0, '++'
          3        CONCAT                                           ~3      ~2, !1
          4      > RETURN                                                   ~3
    5     5*     > RETURN                                                   null

End of function mymethod

End of class Geolocation.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.11 ms | 1395 KiB | 15 Q