3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(sprintf('Exception thrown while deleting the job: %d — %d', "4", '5')); die; function unserialize_handler($errno, $errstr) { echo "Сериализуемое значение недопустимо.\n"; } $serialized = 'foo'; set_error_handler('unserialize_handler'); $original = unserialize($serialized); restore_error_handler(); function print_line($fd, $events, $arg) { static $max_requests = 0; $max_requests++; if ($max_requests == 10) { // exit loop after 10 writes event_base_loopexit($arg[1]); } // print the line echo fgets($fd); } // create base and event $base = event_base_new(); $event = event_new(); $fd = STDIN; // set event flags event_set($event, $fd, EV_READ | EV_PERSIST, "print_line", array($event, $base)); // set event base event_base_set($event, $base); // enable event event_add($event); // start event loop event_base_loop($base);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/0PP1n
function name:  (null)
number of ops:  50
compiled vars:  !0 = $serialized, !1 = $original, !2 = $base, !3 = $event, !4 = $fd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 'Exception+thrown+while+deleting+the+job%3A+%25d+%E2%80%94+%25d'
          3        SEND_VAL                                                 '4'
          4        SEND_VAL                                                 '5'
          5        DO_ICALL                                         $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                                 
    3     8      > EXIT                                                     
   12     9*       ASSIGN                                                   !0, 'foo'
   13    10*       INIT_FCALL                                               'set_error_handler'
         11*       SEND_VAL                                                 'unserialize_handler'
         12*       DO_ICALL                                                 
   14    13*       INIT_FCALL                                               'unserialize'
         14*       SEND_VAR                                                 !0
         15*       DO_ICALL                                         $9      
         16*       ASSIGN                                                   !1, $9
   15    17*       INIT_FCALL                                               'restore_error_handler'
         18*       DO_ICALL                                                 
   34    19*       INIT_FCALL_BY_NAME                                       'event_base_new'
         20*       DO_FCALL                                      0  $12     
         21*       ASSIGN                                                   !2, $12
   35    22*       INIT_FCALL_BY_NAME                                       'event_new'
         23*       DO_FCALL                                      0  $14     
         24*       ASSIGN                                                   !3, $14
   37    25*       FETCH_CONSTANT                                   ~16     'STDIN'
         26*       ASSIGN                                                   !4, ~16
   40    27*       INIT_FCALL_BY_NAME                                       'event_set'
         28*       SEND_VAR_EX                                              !3
         29*       SEND_VAR_EX                                              !4
         30*       FETCH_CONSTANT                                   ~18     'EV_READ'
         31*       FETCH_CONSTANT                                   ~19     'EV_PERSIST'
         32*       BW_OR                                            ~20     ~18, ~19
         33*       SEND_VAL_EX                                              ~20
         34*       SEND_VAL_EX                                              'print_line'
         35*       INIT_ARRAY                                       ~21     !3
         36*       ADD_ARRAY_ELEMENT                                ~21     !2
         37*       SEND_VAL_EX                                              ~21
         38*       DO_FCALL                                      0          
   42    39*       INIT_FCALL_BY_NAME                                       'event_base_set'
         40*       SEND_VAR_EX                                              !3
         41*       SEND_VAR_EX                                              !2
         42*       DO_FCALL                                      0          
   45    43*       INIT_FCALL_BY_NAME                                       'event_add'
         44*       SEND_VAR_EX                                              !3
         45*       DO_FCALL                                      0          
   47    46*       INIT_FCALL_BY_NAME                                       'event_base_loop'
         47*       SEND_VAR_EX                                              !2
         48*       DO_FCALL                                      0          
         49*     > RETURN                                                   1

Function unserialize_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0PP1n
function name:  unserialize_handler
number of ops:  4
compiled vars:  !0 = $errno, !1 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        ECHO                                                     '%D0%A1%D0%B5%D1%80%D0%B8%D0%B0%D0%BB%D0%B8%D0%B7%D1%83%D0%B5%D0%BC%D0%BE%D0%B5+%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5+%D0%BD%D0%B5%D0%B4%D0%BE%D0%BF%D1%83%D1%81%D1%82%D0%B8%D0%BC%D0%BE.%0A'
   10     3      > RETURN                                                   null

End of function unserialize_handler

Function print_line:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/0PP1n
function name:  print_line
number of ops:  17
compiled vars:  !0 = $fd, !1 = $events, !2 = $arg, !3 = $max_requests
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   20     3        BIND_STATIC                                              !3
   22     4        PRE_INC                                                  !3
   24     5        IS_EQUAL                                                 !3, 10
          6      > JMPZ                                                     ~5, ->12
   26     7    >   INIT_FCALL_BY_NAME                                       'event_base_loopexit'
          8        CHECK_FUNC_ARG                                           
          9        FETCH_DIM_FUNC_ARG                               $6      !2, 1
         10        SEND_FUNC_ARG                                            $6
         11        DO_FCALL                                      0          
   30    12    >   INIT_FCALL                                               'fgets'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $8      
         15        ECHO                                                     $8
   31    16      > RETURN                                                   null

End of function print_line

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.05 ms | 1400 KiB | 25 Q