3v4l.org

run code in 300+ PHP versions simultaneously
<?php $connection = new PDO('sqlite::memory:'); $connection->exec('CREATE TABLE transactions (id INTEGER, amount NUMERIC, date TEXT)'); $stmt = $connection->query('SELECT * FROM transactions'); var_dump($stmt->columnCount(), $stmt->getColumnMeta(0), $stmt->getColumnMeta(1), $stmt->getColumnMeta(2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIjOj
function name:  (null)
number of ops:  29
compiled vars:  !0 = $connection, !1 = $stmt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'PDO'
          1        SEND_VAL_EX                                              'sqlite%3A%3Amemory%3A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    3     4        INIT_METHOD_CALL                                         !0, 'exec'
          5        SEND_VAL_EX                                              'CREATE+TABLE+transactions+%28id+INTEGER%2C+amount+NUMERIC%2C+date+TEXT%29'
          6        DO_FCALL                                      0          
    4     7        INIT_METHOD_CALL                                         !0, 'query'
          8        SEND_VAL_EX                                              'SELECT+%2A+FROM+transactions'
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                                   !1, $6
    5    11        INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !1, 'columnCount'
         13        DO_FCALL                                      0  $8      
         14        SEND_VAR                                                 $8
         15        INIT_METHOD_CALL                                         !1, 'getColumnMeta'
         16        SEND_VAL_EX                                              0
         17        DO_FCALL                                      0  $9      
         18        SEND_VAR                                                 $9
         19        INIT_METHOD_CALL                                         !1, 'getColumnMeta'
         20        SEND_VAL_EX                                              1
         21        DO_FCALL                                      0  $10     
         22        SEND_VAR                                                 $10
         23        INIT_METHOD_CALL                                         !1, 'getColumnMeta'
         24        SEND_VAL_EX                                              2
         25        DO_FCALL                                      0  $11     
         26        SEND_VAR                                                 $11
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.07 ms | 1395 KiB | 15 Q