3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test() { var_dump(isset($argc), isset($argv)); } public function test2() { global $argc, $argv; var_dump(isset($argc), isset($argv)); } } function test() { var_dump(isset($argc), isset($argv)); } var_dump(isset($argc), isset($argv)); test(); $f = new Foo; $f->test(); $f->test2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C2Tol
function name:  (null)
number of ops:  16
compiled vars:  !0 = $argc, !1 = $argv, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'var_dump'
          1        ISSET_ISEMPTY_CV                                 ~3      !0
          2        SEND_VAL                                                 ~3
          3        ISSET_ISEMPTY_CV                                 ~4      !1
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                                 
   20     6        INIT_FCALL                                               'test'
          7        DO_FCALL                                      0          
   21     8        NEW                                              $7      'Foo'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $7
   22    11        INIT_METHOD_CALL                                         !2, 'test'
         12        DO_FCALL                                      0          
   23    13        INIT_METHOD_CALL                                         !2, 'test2'
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C2Tol
function name:  test
number of ops:  7
compiled vars:  !0 = $argc, !1 = $argv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        ISSET_ISEMPTY_CV                                 ~2      !0
          2        SEND_VAL                                                 ~2
          3        ISSET_ISEMPTY_CV                                 ~3      !1
          4        SEND_VAL                                                 ~3
          5        DO_ICALL                                                 
   17     6      > RETURN                                                   null

End of function test

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C2Tol
function name:  test
number of ops:  7
compiled vars:  !0 = $argc, !1 = $argv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        ISSET_ISEMPTY_CV                                 ~2      !0
          2        SEND_VAL                                                 ~2
          3        ISSET_ISEMPTY_CV                                 ~3      !1
          4        SEND_VAL                                                 ~3
          5        DO_ICALL                                                 
    6     6      > RETURN                                                   null

End of function test

Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C2Tol
function name:  test2
number of ops:  9
compiled vars:  !0 = $argc, !1 = $argv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   BIND_GLOBAL                                              !0, 'argc'
          1        BIND_GLOBAL                                              !1, 'argv'
   10     2        INIT_FCALL                                               'var_dump'
          3        ISSET_ISEMPTY_CV                                 ~2      !0
          4        SEND_VAL                                                 ~2
          5        ISSET_ISEMPTY_CV                                 ~3      !1
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function test2

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.89 ms | 1403 KiB | 16 Q