3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace dunk { class funk { public static function slam() { return new self; } } } namespace jam { $class = "dunk\\funk"; $pow = $class::slam(); var_dump($pow); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4OKqd
function name:  (null)
number of ops:  9
compiled vars:  !0 = $class, !1 = $pow
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'dunk%5Cfunk'
   12     1        FETCH_CLASS                                   0  $3      !0
          2        INIT_STATIC_METHOD_CALL                                  $3, 'slam'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
   14     5        INIT_NS_FCALL_BY_NAME                                    'jam%5Cvar_dump'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
   15     8      > RETURN                                                   1

Class dunk\funk:
Function slam:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4OKqd
function name:  slam
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                          self                $0      
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function slam

End of class dunk\funk.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.57 ms | 1399 KiB | 15 Q