3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace foo; class bar { public static function baz() { return 'lol'; } } $cls = 'foo\\bar'; echo $cls::baz(); $cls = 'bar'; echo $cls::baz();
based on o90Ir
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/tE4BKV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $cls
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   NOP                                                      
   8     1        ASSIGN                                                   !0, 'foo%5Cbar'
   9     2        FETCH_CLASS                                 512  :3      !0
         3        INIT_STATIC_METHOD_CALL                                  $3, 'baz'
         4        DO_FCALL                                      0  $4      
         5        ECHO                                                     $4
  11     6        ASSIGN                                                   !0, 'bar'
  12     7        FETCH_CLASS                                 512  :6      !0
         8        INIT_STATIC_METHOD_CALL                                  $6, 'baz'
         9        DO_FCALL                                      0  $7      
        10        ECHO                                                     $7
        11      > RETURN                                                   1

Class foo\bar:
Function baz:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/tE4BKV
function name:  baz
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E > > RETURN                                                   'lol'
         1*     > RETURN                                                   null

End of function baz

End of class foo\bar.

Generated using Vulcan Logic Dumper, using php 7.1.0