3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { function foo() { print __METHOD__.PHP_EOL; print __CLASS__.PHP_EOL; print __FUNCTION__.PHP_EOL; } } (new x)->foo(); function foo() { print __METHOD__.PHP_EOL; print __CLASS__.PHP_EOL; print __FUNCTION__.PHP_EOL; } foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JuFfn
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $0      'x'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'foo'
          3        DO_FCALL                                          0          
   19     4        INIT_FCALL                                                   'foo'
          5        DO_FCALL                                          0          
          6      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JuFfn
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                         'foo%0A'
   15     1        ECHO                                                         '%0A'
   16     2        ECHO                                                         'foo%0A'
   17     3      > RETURN                                                       null

End of function foo

Class X:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JuFfn
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                         'X%3A%3Afoo%0A'
    6     1        ECHO                                                         'X%0A'
    7     2        ECHO                                                         'foo%0A'
    8     3      > RETURN                                                       null

End of function foo

End of class X.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
133.41 ms | 1468 KiB | 14 Q