3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static function sayHi() { echo 'Hi'; } } $test = Test; echo $test::sayHi(); // This being done multiple times versus echo Test::sayHi(); // That being done multiple times
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FvnPH
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_CONSTANT                                   ~1      'Test'
          1        ASSIGN                                                   !0, ~1
   11     2        FETCH_CLASS                                   0  $3      !0
          3        INIT_STATIC_METHOD_CALL                                  $3, 'sayHi'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
   12     6        INIT_STATIC_METHOD_CALL                                  'Test', 'sayHi'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Class Test:
Function sayhi:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FvnPH
function name:  sayHi
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Hi'
    6     1      > RETURN                                                   null

End of function sayhi

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.62 ms | 1393 KiB | 13 Q