3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static function sayHi($who) { echo 'Hi '.$who; } } $test = Test; echo $test::sayHi('me'); // This being done multiple times versus echo Test::sayHi('you'); // That being done multiple times
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7K3AY
function name:  (null)
number of ops:  12
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        SEND_VAL_EX                                              'me'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   12     7        INIT_STATIC_METHOD_CALL                                  'Test', 'sayHi'
          8        SEND_VAL                                                 'you'
          9        DO_FCALL                                      0  $5      
         10        ECHO                                                     $5
         11      > RETURN                                                   1

Class Test:
Function sayhi:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7K3AY
function name:  sayHi
number of ops:  4
compiled vars:  !0 = $who
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        CONCAT                                           ~1      'Hi+', !0
          2        ECHO                                                     ~1
    6     3      > RETURN                                                   null

End of function sayhi

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.47 ms | 1394 KiB | 13 Q