3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Set these right at the top! ini_set('display_errors', 'On'); error_reporting(-1); session_start(); include '../connect.php'; $_SESSION['db'] = 'concorso'; //name of database $_SESSION['quiz']='simulazione'; //name of table $_SESSION['quiz_id'] = 2; //generates casual numbers $sql = "SELECT COUNT(*) FROM {$_SESSION['quiz']}"; $stmt = $dbh->prepare($sql); $stmt->execute(); $rows = $stmt->fetch(PDO::FETCH_NUM); //Number of rows in table $_SESSION['numbers'] = range(1, $rows[0]); shuffle($_SESSION['numbers']); echo $rows[0]; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Test Page</title> </head> <body> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/otDJW
function name:  (null)
number of ops:  51
compiled vars:  !0 = $sql, !1 = $stmt, !2 = $dbh, !3 = $rows
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 'On'
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 -1
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'session_start'
          8        DO_ICALL                                                 
    8     9        INCLUDE_OR_EVAL                                          '..%2Fconnect.php', INCLUDE
    9    10        FETCH_W                      global              $8      '_SESSION'
         11        ASSIGN_DIM                                               $8, 'db'
         12        OP_DATA                                                  'concorso'
   10    13        FETCH_W                      global              $10     '_SESSION'
         14        ASSIGN_DIM                                               $10, 'quiz'
         15        OP_DATA                                                  'simulazione'
   11    16        FETCH_W                      global              $12     '_SESSION'
         17        ASSIGN_DIM                                               $12, 'quiz_id'
         18        OP_DATA                                                  2
   14    19        NOP                                                      
         20        FETCH_R                      global              ~14     '_SESSION'
         21        FETCH_DIM_R                                      ~15     ~14, 'quiz'
         22        FAST_CONCAT                                      ~16     'SELECT+COUNT%28%2A%29+FROM+', ~15
         23        ASSIGN                                                   !0, ~16
   15    24        INIT_METHOD_CALL                                         !2, 'prepare'
         25        SEND_VAR_EX                                              !0
         26        DO_FCALL                                      0  $18     
         27        ASSIGN                                                   !1, $18
   16    28        INIT_METHOD_CALL                                         !1, 'execute'
         29        DO_FCALL                                      0          
   17    30        INIT_METHOD_CALL                                         !1, 'fetch'
         31        SEND_VAL_EX                                              3
         32        DO_FCALL                                      0  $21     
         33        ASSIGN                                                   !3, $21
   18    34        INIT_FCALL                                               'range'
         35        SEND_VAL                                                 1
         36        FETCH_DIM_R                                      ~25     !3, 0
         37        SEND_VAL                                                 ~25
         38        DO_ICALL                                         $26     
         39        FETCH_W                      global              $23     '_SESSION'
         40        ASSIGN_DIM                                               $23, 'numbers'
         41        OP_DATA                                                  $26
   19    42        INIT_FCALL                                               'shuffle'
         43        FETCH_W                      global              $27     '_SESSION'
         44        FETCH_DIM_W                                      $28     $27, 'numbers'
         45        SEND_REF                                                 $28
         46        DO_ICALL                                                 
   20    47        FETCH_DIM_R                                      ~30     !3, 0
         48        ECHO                                                     ~30
   24    49        ECHO                                                     '+++++++++%0A+++++++++%0A++++++++%3Chtml%3E%0A++++++++%3Chead%3E%0A++++++++++++++++%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Dutf-8%22%3E%0A++++++++++++++++%3Ctitle%3ETest+Page%3C%2Ftitle%3E%0A++++++++++++++++++++++++%3C%2Fhead%3E%0A+++++++++++++++%0A++++++++++++++++%3Cbody%3E%0A+++++++++%0A+++++++++++++++++%0A+++++++++++++++++%3C%2Fbody%3E%0A+++++++++++++++++%0A+++++++++++++++++%3C%2Fhtml%3E'
   37    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.51 ms | 1400 KiB | 23 Q