3v4l.org

run code in 300+ PHP versions simultaneously
<?php $event_types = array('ea', 'ec'); $type_count = count($event_types); $evtypes = rtrim(str_repeat('?,', $type_count), ','); $query = <<<QUERY DELETE FROM events WHERE evtype IN({$evtypes}) AND cameraid = ? AND endtime < ? QUERY; $params['types'] = str_repeat('s', $type_count) . 'si'; $params += $event_types; var_export($query); var_export($params);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u9O6E
function name:  (null)
number of ops:  31
compiled vars:  !0 = $event_types, !1 = $type_count, !2 = $evtypes, !3 = $query, !4 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        COUNT                                            ~6      !0
          2        ASSIGN                                                   !1, ~6
    6     3        INIT_FCALL                                               'rtrim'
          4        INIT_FCALL                                               'str_repeat'
          5        SEND_VAL                                                 '%3F%2C'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $8      
          8        SEND_VAR                                                 $8
          9        SEND_VAL                                                 '%2C'
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    8    12        ROPE_INIT                                     3  ~12     '++++DELETE+FROM%0A++++++events%0A++++WHERE%0A++++++evtype+IN%28'
   11    13        ROPE_ADD                                      1  ~12     ~12, !2
         14        ROPE_END                                      2  ~11     ~12, '%29+AND%0A++++++cameraid+%3D+%3F+AND%0A++++++endtime+%3C+%3F'
    7    15        ASSIGN                                                   !3, ~11
   16    16        INIT_FCALL                                               'str_repeat'
         17        SEND_VAL                                                 's'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $16     
         20        CONCAT                                           ~17     $16, 'si'
         21        ASSIGN_DIM                                               !4, 'types'
         22        OP_DATA                                                  ~17
   17    23        ASSIGN_OP                                     1          !4, !0
   19    24        INIT_FCALL                                               'var_export'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                                 
   21    27        INIT_FCALL                                               'var_export'
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.18 ms | 1396 KiB | 19 Q