3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0; ++$a; // 1 class Foo { function __construct() {} } new Foo(++$a); // 2 function bar() {} bar(++$a); // 3 class WTF { } new WTF(++$a); // 4 var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2dsuI
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        PRE_INC                                                  !0
    6     2        NEW                                              $3      'Foo'
          3        PRE_INC                                          ~4      !0
          4        SEND_VAL_EX                                              ~4
          5        DO_FCALL                                      0          
          6        FREE                                                     $3
    9     7        INIT_FCALL                                               'bar'
          8        PRE_INC                                          ~6      !0
          9        SEND_VAL                                                 ~6
         10        DO_FCALL                                      0          
   12    11        NEW                                              $8      'WTF'
         12        PRE_INC                                          ~9      !0
         13        SEND_VAL_EX                                              ~9
         14        DO_FCALL                                      0          
         15        FREE                                                     $8
   14    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2dsuI
function name:  bar
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   null

End of function bar

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2dsuI
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function __construct

End of class Foo.

Class WTF: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.53 ms | 1398 KiB | 16 Q