3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Something { public function run() { $amount = 934; // instace method called statically. Crazy::doSomething(); } public function log($var) { echo $var; } } class Crazy { public function doSomething() { // log doesn't exist in this class $this->log('Hello World, ' . $amount); } } error_reporting(0); (new Something)->run(); echo "\n\n\n\n-------------\n\n\n\n"; error_reporting(E_ALL | E_STRICT); (new Something)->run();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZl6t
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   28     3        NEW                                              $1      'Something'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $1, 'run'
          6        DO_FCALL                                      0          
   30     7        ECHO                                                     '%0A%0A%0A%0A-------------%0A%0A%0A%0A'
   32     8        INIT_FCALL                                               'error_reporting'
          9        SEND_VAL                                                 32767
         10        DO_ICALL                                                 
   33    11        NEW                                              $5      'Something'
         12        DO_FCALL                                      0          
         13        INIT_METHOD_CALL                                         $5, 'run'
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Class Something:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZl6t
function name:  run
number of ops:  4
compiled vars:  !0 = $amount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 934
    9     1        INIT_STATIC_METHOD_CALL                                  'Crazy', 'doSomething'
          2        DO_FCALL                                      0          
   10     3      > RETURN                                                   null

End of function run

Function log:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZl6t
function name:  log
number of ops:  3
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ECHO                                                     !0
   14     2      > RETURN                                                   null

End of function log

End of class Something.

Class Crazy:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZl6t
function name:  doSomething
number of ops:  5
compiled vars:  !0 = $amount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_METHOD_CALL                                         'log'
          1        CONCAT                                           ~1      'Hello+World%2C+', !0
          2        SEND_VAL_EX                                              ~1
          3        DO_FCALL                                      0          
   23     4      > RETURN                                                   null

End of function dosomething

End of class Crazy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.98 ms | 1396 KiB | 15 Q