3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { static function f() { var_dump(__FUNCTION__); } } C::f(); "C::f"(); ["C", "f"](); implode('::', ["C", "f"])(); [C::class, "f"](); $c = new C; [$c, "f"](); [$c::class, "f"]();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7mPW4
function name:  (null)
number of ops:  27
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'C', 'f'
          1        DO_FCALL                                      0          
   13     2        INIT_STATIC_METHOD_CALL                                  'C', 'f'
          3        DO_FCALL                                      0          
   14     4        INIT_DYNAMIC_CALL                                        <array>
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               'implode'
          7        SEND_VAL                                                 '%3A%3A'
          8        SEND_VAL                                                 <array>
          9        DO_ICALL                                         $4      
         10        INIT_DYNAMIC_CALL                                        $4
         11        DO_FCALL                                      0          
   16    12        INIT_DYNAMIC_CALL                                        <array>
         13        DO_FCALL                                      0          
   18    14        NEW                                              $7      'C'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !0, $7
   19    17        INIT_ARRAY                                       ~10     !0
         18        ADD_ARRAY_ELEMENT                                ~10     'f'
         19        INIT_DYNAMIC_CALL                                        ~10
         20        DO_FCALL                                      0          
   20    21        FETCH_CLASS_NAME                                 ~12     !0
         22        INIT_ARRAY                                       ~13     ~12
         23        ADD_ARRAY_ELEMENT                                ~13     'f'
         24        INIT_DYNAMIC_CALL                                        ~13
         25        DO_FCALL                                      0          
         26      > RETURN                                                   1

Class C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7mPW4
function name:  f
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'f'
          2        DO_ICALL                                                 
    8     3      > RETURN                                                   null

End of function f

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.23 ms | 1000 KiB | 15 Q