3v4l.org

run code in 300+ PHP versions simultaneously
<?php $db = new PDO("mysql:"); $s = $db->prepare('SELECT 3'); $s->execute(); $s->bindColumn(1, $test); $s->fetch(PDO::FETCH_BOUND); var_dump($test); # returns NULL instead of 3
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HlXTp
function name:  (null)
number of ops:  21
compiled vars:  !0 = $db, !1 = $s, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'PDO'
          1        SEND_VAL_EX                                              'mysql%3A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        INIT_METHOD_CALL                                         !0, 'prepare'
          5        SEND_VAL_EX                                              'SELECT+3'
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !1, $6
    5     8        INIT_METHOD_CALL                                         !1, 'execute'
          9        DO_FCALL                                      0          
    6    10        INIT_METHOD_CALL                                         !1, 'bindColumn'
         11        SEND_VAL_EX                                              1
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0          
    7    14        INIT_METHOD_CALL                                         !1, 'fetch'
         15        SEND_VAL_EX                                              6
         16        DO_FCALL                                      0          
    8    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.23 ms | 1386 KiB | 15 Q