3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public static function myStaticFunction() { echo "I'm declared static! Calling me statically works great.\n"; } public function myNonStaticFunction() { echo "I'm not static, if you try to call me statically you'll get a deprecated warning\n"; } public function __call($name, $args) { echo 123;exit; } } foo::myStaticFunction(); foo::myNonStaticFunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/60OvC
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'foo', 'myStaticFunction'
          1        DO_FCALL                                      0          
   19     2        INIT_STATIC_METHOD_CALL                                  'foo', 'myNonStaticFunction'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class foo:
Function mystaticfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/60OvC
function name:  myStaticFunction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'I%27m+declared+static%21+Calling+me+statically+works+great.%0A'
    6     1      > RETURN                                                   null

End of function mystaticfunction

Function mynonstaticfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/60OvC
function name:  myNonStaticFunction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'I%27m+not+static%2C+if+you+try+to+call+me+statically+you%27ll+get+a+deprecated+warning%0A'
   10     1      > RETURN                                                   null

End of function mynonstaticfunction

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/60OvC
function name:  __call
number of ops:  5
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        ECHO                                                     123
          3      > EXIT                                                     
   15     4*     > RETURN                                                   null

End of function __call

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.2 ms | 1394 KiB | 13 Q