3v4l.org

run code in 500+ 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); // suddenly, PHP becomes lazy var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tcnv63
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
    8     7        INIT_FCALL                                                   'bar'
          8        PRE_INC                                              ~6      !0
          9        SEND_VAL                                                     ~6
         10        DO_FCALL                                          0          
   10    11        NEW                                                  $8      'WTF'
         12        PRE_INC                                              ~9      !0
         13        SEND_VAL_EX                                                  ~9
         14        DO_FCALL                                          0          
         15        FREE                                                         $8
   12    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/tcnv63
function name:  bar
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     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/tcnv63
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.5.0


preferences:
169.33 ms | 2883 KiB | 15 Q