3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pdo = new pdo('sqlite::memory:', null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,PDO::ATTR_EMULATE_PREPARES => false]); $pdo->exec('create table test1 (id int, name text)'); $pdo->exec("insert into test1(id, name) values (1, 'abc'), (2, 'def')"); $stmt = $pdo->prepare('SELECT * FROM test1 WHERE id = :id AND name = :name'); var_dump($stmt->execute(['name' => 'abc', 'id' => 1])); foreach ($stmt as $row) { print_r($row); } echo "\n-----\n"; var_dump($stmt->execute(['name' => 'abc', 1])); foreach ($stmt as $row) { print_r($row); } echo "\n-----\n"; var_dump($stmt->execute(['name' => 'abc', 2])); foreach ($stmt as $row) { print_r($row); } echo "\n-----\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 29
2 jumps found. (Code = 77) Position 1 = 38, Position 2 = 43
Branch analysis from position: 38
2 jumps found. (Code = 78) Position 1 = 39, Position 2 = 43
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 43
2 jumps found. (Code = 77) Position 1 = 52, Position 2 = 57
Branch analysis from position: 52
2 jumps found. (Code = 78) Position 1 = 53, Position 2 = 57
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
Branch analysis from position: 57
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 57
Branch analysis from position: 43
Branch analysis from position: 29
filename:       /in/fKZFQ
function name:  (null)
number of ops:  60
compiled vars:  !0 = $pdo, !1 = $stmt, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'pdo'
          1        SEND_VAL_EX                                              'sqlite%3A%3Amemory%3A'
          2        SEND_VAL_EX                                              null
          3        SEND_VAL_EX                                              null
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
    4     7        INIT_METHOD_CALL                                         !0, 'exec'
          8        SEND_VAL_EX                                              'create+table+test1+%28id+int%2C+name+text%29'
          9        DO_FCALL                                      0          
    5    10        INIT_METHOD_CALL                                         !0, 'exec'
         11        SEND_VAL_EX                                              'insert+into+test1%28id%2C+name%29+values+%281%2C+%27abc%27%29%2C+%282%2C+%27def%27%29'
         12        DO_FCALL                                      0          
    7    13        INIT_METHOD_CALL                                         !0, 'prepare'
         14        SEND_VAL_EX                                              'SELECT+%2A+FROM+test1+WHERE+id+%3D+%3Aid+AND+name+%3D+%3Aname'
         15        DO_FCALL                                      0  $8      
         16        ASSIGN                                                   !1, $8
    9    17        INIT_FCALL                                               'var_dump'
         18        INIT_METHOD_CALL                                         !1, 'execute'
         19        SEND_VAL_EX                                              <array>
         20        DO_FCALL                                      0  $10     
         21        SEND_VAR                                                 $10
         22        DO_ICALL                                                 
   10    23      > FE_RESET_R                                       $12     !1, ->29
         24    > > FE_FETCH_R                                               $12, !2, ->29
   11    25    >   INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                                 
   10    28      > JMP                                                      ->24
         29    >   FE_FREE                                                  $12
   14    30        ECHO                                                     '%0A-----%0A'
   16    31        INIT_FCALL                                               'var_dump'
         32        INIT_METHOD_CALL                                         !1, 'execute'
         33        SEND_VAL_EX                                              <array>
         34        DO_FCALL                                      0  $14     
         35        SEND_VAR                                                 $14
         36        DO_ICALL                                                 
   17    37      > FE_RESET_R                                       $16     !1, ->43
         38    > > FE_FETCH_R                                               $16, !2, ->43
   18    39    >   INIT_FCALL                                               'print_r'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                                 
   17    42      > JMP                                                      ->38
         43    >   FE_FREE                                                  $16
   21    44        ECHO                                                     '%0A-----%0A'
   23    45        INIT_FCALL                                               'var_dump'
         46        INIT_METHOD_CALL                                         !1, 'execute'
         47        SEND_VAL_EX                                              <array>
         48        DO_FCALL                                      0  $18     
         49        SEND_VAR                                                 $18
         50        DO_ICALL                                                 
   24    51      > FE_RESET_R                                       $20     !1, ->57
         52    > > FE_FETCH_R                                               $20, !2, ->57
   25    53    >   INIT_FCALL                                               'print_r'
         54        SEND_VAR                                                 !2
         55        DO_ICALL                                                 
   24    56      > JMP                                                      ->52
         57    >   FE_FREE                                                  $20
   28    58        ECHO                                                     '%0A-----%0A'
         59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.43 ms | 1400 KiB | 17 Q