3v4l.org

run code in 300+ PHP versions simultaneously
<?php class fake_pdo { public function execute($array){ echo '<pre>'; print_r($array); } } // Log each login attempt $st = new fake_pdo(); $ipAddress = $_SERVER['REMOTE_ADDR']; $logQuery = "INSERT INTO Logs.Logins (userName, ipAddress) VALUES (:userName,:ipAddress)"; $st = $db->prepare($logQuery); $st->execute(['userName' =>$myName,'ipAddress'=>$ipAddress]); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GrqQL
function name:  (null)
number of ops:  17
compiled vars:  !0 = $st, !1 = $ipAddress, !2 = $logQuery, !3 = $db, !4 = $myName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $5      'fake_pdo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
   11     3        FETCH_R                      global              ~8      '_SERVER'
          4        FETCH_DIM_R                                      ~9      ~8, 'REMOTE_ADDR'
          5        ASSIGN                                                   !1, ~9
   12     6        ASSIGN                                                   !2, 'INSERT+INTO+Logs.Logins+%28userName%2C+ipAddress%29+VALUES+%28%3AuserName%2C%3AipAddress%29'
   13     7        INIT_METHOD_CALL                                         !3, 'prepare'
          8        SEND_VAR_EX                                              !2
          9        DO_FCALL                                      0  $12     
         10        ASSIGN                                                   !0, $12
   14    11        INIT_METHOD_CALL                                         !0, 'execute'
         12        INIT_ARRAY                                       ~14     !4, 'userName'
         13        ADD_ARRAY_ELEMENT                                ~14     !1, 'ipAddress'
         14        SEND_VAL_EX                                              ~14
         15        DO_FCALL                                      0          
   15    16      > RETURN                                                   1

Class fake_pdo:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GrqQL
function name:  execute
number of ops:  6
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     '%3Cpre%3E'
    5     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5      > RETURN                                                   null

End of function execute

End of class fake_pdo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.75 ms | 1395 KiB | 15 Q