3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dbh = new PDO("sqlite::memory:", "", "", [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); $dbh->exec("CREATE TABLE fruits (name TEXT, color TEXT)"); $dbh->exec("INSERT INTO fruits VALUES('banana', 'yellow')"); $sql = "SELECT * FROM fruits WHERE name = :name AND color = ?"; $sth = $dbh->prepare($sql); $sth->execute(["banana", "yellow"]); var_dump($sth->fetchAll());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6237m
function name:  (null)
number of ops:  27
compiled vars:  !0 = $dbh, !1 = $sql, !2 = $sth
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                                              ''
          3        SEND_VAL_EX                                              ''
          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+fruits+%28name+TEXT%2C+color+TEXT%29'
          9        DO_FCALL                                      0          
    5    10        INIT_METHOD_CALL                                         !0, 'exec'
         11        SEND_VAL_EX                                              'INSERT+INTO+fruits+VALUES%28%27banana%27%2C+%27yellow%27%29'
         12        DO_FCALL                                      0          
    6    13        ASSIGN                                                   !1, 'SELECT+%2A+FROM+fruits+WHERE+name+%3D+%3Aname+AND+color+%3D+%3F'
    7    14        INIT_METHOD_CALL                                         !0, 'prepare'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $9      
         17        ASSIGN                                                   !2, $9
    8    18        INIT_METHOD_CALL                                         !2, 'execute'
         19        SEND_VAL_EX                                              <array>
         20        DO_FCALL                                      0          
    9    21        INIT_FCALL                                               'var_dump'
         22        INIT_METHOD_CALL                                         !2, 'fetchAll'
         23        DO_FCALL                                      0  $12     
         24        SEND_VAR                                                 $12
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
12.86 ms | 415 KiB | 8 Q