3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
based on FvnPH
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/7K3AY
function name:  (null)
number of ops:  13
compiled vars:  !0 = $test
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   9     1        FETCH_CONSTANT                                   ~2      'Test'
         2        ASSIGN                                                   !0, ~2
  11     3        FETCH_CLASS                                 512  :4      !0
         4        INIT_STATIC_METHOD_CALL                                  $4, 'sayHi'
         5        SEND_VAL_EX                                              'me'
         6        DO_FCALL                                      0  $5      
         7        ECHO                                                     $5
  12     8        INIT_STATIC_METHOD_CALL                                  'Test', 'sayHi'
         9        SEND_VAL_EX                                              'you'
        10        DO_FCALL                                      0  $6      
        11        ECHO                                                     $6
        12      > RETURN                                                   1

Class Test:
Function sayhi:
Finding entry points
Branch analysis from position: 0
Jump found. 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 7.2.0