3v4l.org

run code in 300+ PHP versions simultaneously
<?php function meh() { static $a = 10; $a--; echo "$a\n"; if ($a > 0) { var_dump($a); yield $a; } } set_error_handler('meh'); trigger_error('lol', E_USER_ERROR);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lZUbT
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'meh'
          2        DO_ICALL                                                 
   15     3        INIT_FCALL                                               'trigger_error'
          4        SEND_VAL                                                 'lol'
          5        SEND_VAL                                                 256
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function meh:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 12
filename:       /in/lZUbT
function name:  meh
number of ops:  13
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    4     1        BIND_STATIC                                              !0
    5     2        PRE_DEC                                                  !0
    6     3        NOP                                                      
          4        FAST_CONCAT                                      ~2      !0, '%0A'
          5        ECHO                                                     ~2
    7     6        IS_SMALLER                                               0, !0
          7      > JMPZ                                                     ~3, ->12
    8     8    >   INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    9    11        YIELD                                                    !0
   11    12    > > GENERATOR_RETURN                                         

End of function meh

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.29 ms | 1395 KiB | 19 Q