3v4l.org

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

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

End of function instance

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.99 ms | 1393 KiB | 13 Q