3v4l.org

run code in 500+ PHP versions simultaneously
<?php $db = new SQLite3(":memory:"); $stmt = $db->prepare("select 1, 2, 3 from sqlite_master where 1 = ?"); // bindParam crash $i = 0; $stmt->bindParam(0, $i); // bindValue crash $stmt->bindParam(0, 1); echo "bound\n"; // not reached $stmt->execute(); $db->close();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hXF48
function name:  (null)
number of ops:  23
compiled vars:  !0 = $db, !1 = $stmt, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $3      'SQLite3'
          1        SEND_VAL_EX                                                  '%3Amemory%3A'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
    4     4        INIT_METHOD_CALL                                             !0, 'prepare'
          5        SEND_VAL_EX                                                  'select+1%2C+2%2C+3+from+sqlite_master+where+1+%3D+%3F'
          6        DO_FCALL                                          0  $6      
          7        ASSIGN                                                       !1, $6
    7     8        ASSIGN                                                       !2, 0
    8     9        INIT_METHOD_CALL                                             !1, 'bindParam'
         10        SEND_VAL_EX                                                  0
         11        SEND_VAR_EX                                                  !2
         12        DO_FCALL                                          0          
   11    13        INIT_METHOD_CALL                                             !1, 'bindParam'
         14        SEND_VAL_EX                                                  0
         15        SEND_VAL_EX                                                  1
         16        DO_FCALL                                          0          
   12    17        ECHO                                                         'bound%0A'
   14    18        INIT_METHOD_CALL                                             !1, 'execute'
         19        DO_FCALL                                          0          
   15    20        INIT_METHOD_CALL                                             !0, 'close'
         21        DO_FCALL                                          0          
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
149.58 ms | 2133 KiB | 13 Q