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/GQXNn
function name:  (null)
number of ops:  28
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
    7    12        ASSIGN                                                   !3, '++++DELETE+FROM%0A++++++events%0A++++WHERE%0A++++++evtype+IN%28%24evtypes%29+AND%0A++++++cameraid+%3D+%3F+AND%0A++++++endtime+%3C+%3F'
   16    13        INIT_FCALL                                               'str_repeat'
         14        SEND_VAL                                                 's'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $13     
         17        CONCAT                                           ~14     $13, 'si'
         18        ASSIGN_DIM                                               !4, 'types'
         19        OP_DATA                                                  ~14
   17    20        ASSIGN_OP                                     1          !4, !0
   19    21        INIT_FCALL                                               'var_export'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
   21    24        INIT_FCALL                                               'var_export'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.82 ms | 1387 KiB | 19 Q