3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = 1; register_tick_function(function () use (&$a) { ++$a; }); declare(ticks = 1) { $a === 1 or exit(1); $a === 2 or exit(1); $a === 3 or exit(1); } echo "a = $a\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHm52
function name:  (null)
number of ops:  32
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 1
    4     1        INIT_FCALL                                                   'register_tick_function'
          2        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          3        BIND_LEXICAL                                                 ~2, !0
    6     4        SEND_VAL                                                     ~2
    4     5        DO_ICALL                                                     
    8     6        IS_IDENTICAL                                         ~4      !0, 1
          7      > JMPNZ_EX                                             ~4      ~4, ->12
          8    > > INIT_FCALL                                                   'exit'
          9*       SEND_VAL                                                     1
         10*       DO_ICALL                                             $5      
         11*       BOOL                                                 ~4      $5
         12    >   TICKS                                                        
    9    13        IS_IDENTICAL                                         ~6      !0, 2
         14      > JMPNZ_EX                                             ~6      ~6, ->19
         15    > > INIT_FCALL                                                   'exit'
         16*       SEND_VAL                                                     1
         17*       DO_ICALL                                             $7      
         18*       BOOL                                                 ~6      $7
         19    >   TICKS                                                        
   10    20        IS_IDENTICAL                                         ~8      !0, 3
         21      > JMPNZ_EX                                             ~8      ~8, ->26
         22    > > INIT_FCALL                                                   'exit'
         23*       SEND_VAL                                                     1
         24*       DO_ICALL                                             $9      
         25*       BOOL                                                 ~8      $9
         26    >   TICKS                                                        
   12    27        ROPE_INIT                                         3  ~11     'a+%3D+'
         28        ROPE_ADD                                          1  ~11     ~11, !0
         29        ROPE_END                                          2  ~10     ~11, '%0A'
         30        ECHO                                                         ~10
         31      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHm52
function name:  {closure:/in/VHm52:4}
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                                  !0
    5     1        PRE_INC                                                      !0
    6     2      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.77 ms | 2004 KiB | 15 Q