3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dbh = new PDO("sqlite::memory:"); $calories = (int) 150; $colour = 'red'; $sth = $dbh->prepare('SELECT 1 WHERE 1 = :calories AND 2 = :colour'); if ($sth->bindParam(':calories', $calories, PDO::PARAM_INT) !== true) die('die on ' . __LINE__. "\n"); if ($sth->bindValue(':colour', $colour, PDO::PARAM_STR) !== true) die('die on ' . __LINE__. "\n"); $sth->debugDumpParams();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lfMaV
function name:  (null)
number of ops:  30
compiled vars:  !0 = $dbh, !1 = $calories, !2 = $colour, !3 = $sth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'PDO'
          1        SEND_VAL_EX                                              'sqlite%3A%3Amemory%3A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        CAST                                          4  ~7      150
          5        ASSIGN                                                   !1, ~7
    4     6        ASSIGN                                                   !2, 'red'
    5     7        INIT_METHOD_CALL                                         !0, 'prepare'
          8        SEND_VAL_EX                                              'SELECT+1+WHERE+1+%3D+%3Acalories+AND+2+%3D+%3Acolour'
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !3, $10
    6    11        INIT_METHOD_CALL                                         !3, 'bindParam'
         12        SEND_VAL_EX                                              '%3Acalories'
         13        SEND_VAR_EX                                              !1
         14        SEND_VAL_EX                                              1
         15        DO_FCALL                                      0  $12     
         16        TYPE_CHECK                                  1014          $12
         17      > JMPZ                                                     ~13, ->19
    7    18    > > EXIT                                                     'die+on+7%0A'
    8    19    >   INIT_METHOD_CALL                                         !3, 'bindValue'
         20        SEND_VAL_EX                                              '%3Acolour'
         21        SEND_VAR_EX                                              !2
         22        SEND_VAL_EX                                              2
         23        DO_FCALL                                      0  $14     
         24        TYPE_CHECK                                  1014          $14
         25      > JMPZ                                                     ~15, ->27
    9    26    > > EXIT                                                     'die+on+9%0A'
   11    27    >   INIT_METHOD_CALL                                         !3, 'debugDumpParams'
         28        DO_FCALL                                      0          
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.93 ms | 1399 KiB | 13 Q