3v4l.org

run code in 300+ PHP versions simultaneously
<?php //============================================== // class //============================================== abstract class PDOWrapper { //============================================== // variables //============================================== private $exception = Null; private $username = Null; private $password = Null; private $dsn = Null; private $client = Null; private $pdoStatement = Null; //============================================== // constructor //============================================== final public function __construct() { $this->reset(); } //============================================== // overrides //============================================== abstract protected function getConfigFile(); //============================================== // main //============================================== final public function prepare($query) { if ($this->ready()) { $this->pdoStatement = $this->client->prepare($query); } return $this->checkError(); } final public function execute() { if ($this->ready() && $this->pdoStatement) { return $this->pdoStatement->execute(); } return $this->checkError(); } final public function fetch() { if ($this->ready() && $this->pdoStatement) { return $this->pdoStatement->fetch(); } return False; } final public function fetchAll() { if ($this->ready() && $this->pdoStatement) { return $this->pdoStatement->fetchAll(); } return False; } final public function query($query) { if ($this->ready()) { $this->pdoStatement = $this->client->query($query); } return $this->checkError(); } final public function ready() { return !$this->hasException(); } final public function reset() { $exception = Null; try { $this->loadConfigFile($this->getConfigFile()); //may throw error (see __get()) $this->client = new PDO($this->dsn, $this->username, $this->password); } catch (Exception $e) { $this->exception = $e; } } //============================================== // accessing //============================================== final public function hasException() { return isset($this->exception); } final public function getException() { return $this->exception; } final public function getRowCount() { if ($this->pdoStatement && !empty($this->pdoStatement->errorInfo()[2])) { return $this->pdoStatement->rowCount(); } return False; } final protected function setException($e) { $this->exception = $e; } //============================================== // utility //============================================== final private function checkError() { //pdoStatement->errorInfo() always returns array if ($this->pdoStatement == False) { $this->exception = new PDOException('Connection Error - Please Check Config File and Network'); return False; } if (!empty($this->pdoStatement->errorInfo()[2])) { $msg = $this->client->errorInfo()[2]; $errCode = $this->client->errorCode(); $this->exception = new PDOException($msg, $code = $errCode); return False; } return True; } final private function loadConfigFile($filepath) { $string = @file_get_contents($filepath); if ($string === False) { throw new FileIOException($filepath); } $json = @json_decode($string, true); if ($json === False || !$json['USERNAME'] || !$json['PASSWORD'] || !$json['DSN']) { throw new InvalidFileFormatException($filepath . ' : ' . json_last_error_msg(), $code = json_last_error()); } $this->username = $json['USERNAME']; $this->password = $json['PASSWORD']; $this->dsn = $json['DSN']; } } class MySqlDB extends PDOWrapper { //============================================== // overrides //============================================== final protected function getConfigFile() { return '~/.mysql/config.json'; } } class RedshiftDB extends PDOWrapper { //============================================== // overrides //============================================== final protected function getConfigFile() { return '~/.redshift/config.json'; } } $a = new RedshiftDB();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  188     0  E >   NEW                                              $1      'RedshiftDB'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class PDOWrapper:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_METHOD_CALL                                         'reset'
          1        DO_FCALL                                      0          
   27     2      > RETURN                                                   null

End of function __construct

Function getconfigfile:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  getConfigFile
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E > > RETURN                                                   null

End of function getconfigfile

Function prepare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/uB2Dj
function name:  prepare
number of ops:  14
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
   42     1        INIT_METHOD_CALL                                         'ready'
          2        DO_FCALL                                      0  $1      
          3      > JMPZ                                                     $1, ->10
   43     4    >   FETCH_OBJ_R                                      ~3      'client'
          5        INIT_METHOD_CALL                                         ~3, 'prepare'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $4      
          8        ASSIGN_OBJ                                               'pdoStatement'
          9        OP_DATA                                                  $4
   46    10    >   INIT_METHOD_CALL                                         'checkError'
         11        DO_FCALL                                      0  $5      
         12      > RETURN                                                   $5
   47    13*     > RETURN                                                   null

End of function prepare

Function execute:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/uB2Dj
function name:  execute
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   INIT_METHOD_CALL                                         'ready'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ_EX                                          ~1      $0, ->5
          3    >   FETCH_OBJ_R                                      ~2      'pdoStatement'
          4        BOOL                                             ~1      ~2
          5    > > JMPZ                                                     ~1, ->10
   51     6    >   FETCH_OBJ_R                                      ~3      'pdoStatement'
          7        INIT_METHOD_CALL                                         ~3, 'execute'
          8        DO_FCALL                                      0  $4      
          9      > RETURN                                                   $4
   54    10    >   INIT_METHOD_CALL                                         'checkError'
         11        DO_FCALL                                      0  $5      
         12      > RETURN                                                   $5
   55    13*     > RETURN                                                   null

End of function execute

Function fetch:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/uB2Dj
function name:  fetch
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   INIT_METHOD_CALL                                         'ready'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ_EX                                          ~1      $0, ->5
          3    >   FETCH_OBJ_R                                      ~2      'pdoStatement'
          4        BOOL                                             ~1      ~2
          5    > > JMPZ                                                     ~1, ->10
   59     6    >   FETCH_OBJ_R                                      ~3      'pdoStatement'
          7        INIT_METHOD_CALL                                         ~3, 'fetch'
          8        DO_FCALL                                      0  $4      
          9      > RETURN                                                   $4
   62    10    > > RETURN                                                   <false>
   63    11*     > RETURN                                                   null

End of function fetch

Function fetchall:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/uB2Dj
function name:  fetchAll
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   INIT_METHOD_CALL                                         'ready'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ_EX                                          ~1      $0, ->5
          3    >   FETCH_OBJ_R                                      ~2      'pdoStatement'
          4        BOOL                                             ~1      ~2
          5    > > JMPZ                                                     ~1, ->10
   67     6    >   FETCH_OBJ_R                                      ~3      'pdoStatement'
          7        INIT_METHOD_CALL                                         ~3, 'fetchAll'
          8        DO_FCALL                                      0  $4      
          9      > RETURN                                                   $4
   70    10    > > RETURN                                                   <false>
   71    11*     > RETURN                                                   null

End of function fetchall

Function query:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/uB2Dj
function name:  query
number of ops:  14
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   RECV                                             !0      
   74     1        INIT_METHOD_CALL                                         'ready'
          2        DO_FCALL                                      0  $1      
          3      > JMPZ                                                     $1, ->10
   75     4    >   FETCH_OBJ_R                                      ~3      'client'
          5        INIT_METHOD_CALL                                         ~3, 'query'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $4      
          8        ASSIGN_OBJ                                               'pdoStatement'
          9        OP_DATA                                                  $4
   78    10    >   INIT_METHOD_CALL                                         'checkError'
         11        DO_FCALL                                      0  $5      
         12      > RETURN                                                   $5
   79    13*     > RETURN                                                   null

End of function query

Function ready:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  ready
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   82     0  E >   INIT_METHOD_CALL                                         'hasException'
          1        DO_FCALL                                      0  $0      
          2        BOOL_NOT                                         ~1      $0
          3      > RETURN                                                   ~1
   83     4*     > RETURN                                                   null

End of function ready

Function reset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 20
Branch analysis from position: 20
2 jumps found. (Code = 107) Position 1 = 21, Position 2 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  reset
number of ops:  24
compiled vars:  !0 = $exception, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   86     0  E >   ASSIGN                                                   !0, null
   89     1        INIT_METHOD_CALL                                         'loadConfigFile'
          2        INIT_METHOD_CALL                                         'getConfigFile'
          3        DO_FCALL                                      0  $3      
          4        SEND_VAR_NO_REF_EX                                       $3
          5        DO_FCALL                                      0          
   91     6        NEW                                              $6      'PDO'
          7        CHECK_FUNC_ARG                                           
          8        FETCH_OBJ_FUNC_ARG                               $7      'dsn'
          9        SEND_FUNC_ARG                                            $7
         10        CHECK_FUNC_ARG                                           
         11        FETCH_OBJ_FUNC_ARG                               $8      'username'
         12        SEND_FUNC_ARG                                            $8
         13        CHECK_FUNC_ARG                                           
         14        FETCH_OBJ_FUNC_ARG                               $9      'password'
         15        SEND_FUNC_ARG                                            $9
         16        DO_FCALL                                      0          
         17        ASSIGN_OBJ                                               'client'
         18        OP_DATA                                                  $6
         19      > JMP                                                      ->23
   93    20  E > > CATCH                                       last         'Exception'
   94    21    >   ASSIGN_OBJ                                               'exception'
         22        OP_DATA                                                  !1
   96    23    > > RETURN                                                   null

End of function reset

Function hasexception:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  hasException
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  104     0  E >   ISSET_ISEMPTY_PROP_OBJ                           ~0      'exception'
          1      > RETURN                                                   ~0
  105     2*     > RETURN                                                   null

End of function hasexception

Function getexception:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  getException
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  108     0  E >   FETCH_OBJ_R                                      ~0      'exception'
          1      > RETURN                                                   ~0
  109     2*     > RETURN                                                   null

End of function getexception

Function getrowcount:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/uB2Dj
function name:  getRowCount
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  112     0  E >   FETCH_OBJ_R                                      ~0      'pdoStatement'
          1      > JMPZ_EX                                          ~0      ~0, ->8
          2    >   FETCH_OBJ_R                                      ~1      'pdoStatement'
          3        INIT_METHOD_CALL                                         ~1, 'errorInfo'
          4        DO_FCALL                                      0  $2      
          5        ISSET_ISEMPTY_DIM_OBJ                         1  ~3      $2, 2
          6        BOOL_NOT                                         ~4      ~3
          7        BOOL                                             ~0      ~4
          8    > > JMPZ                                                     ~0, ->13
  113     9    >   FETCH_OBJ_R                                      ~5      'pdoStatement'
         10        INIT_METHOD_CALL                                         ~5, 'rowCount'
         11        DO_FCALL                                      0  $6      
         12      > RETURN                                                   $6
  116    13    > > RETURN                                                   <false>
  117    14*     > RETURN                                                   null

End of function getrowcount

Function setexception:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  setException
number of ops:  4
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  119     0  E >   RECV                                             !0      
  120     1        ASSIGN_OBJ                                               'exception'
          2        OP_DATA                                                  !0
  121     3      > RETURN                                                   null

End of function setexception

Function checkerror:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 32
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  checkError
number of ops:  34
compiled vars:  !0 = $msg, !1 = $errCode, !2 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  129     0  E >   FETCH_OBJ_R                                      ~3      'pdoStatement'
          1        BOOL_NOT                                         ~4      ~3
          2      > JMPZ                                                     ~4, ->9
  130     3    >   NEW                                              $6      'PDOException'
          4        SEND_VAL_EX                                              'Connection+Error+-+Please+Check+Config+File+and+Network'
          5        DO_FCALL                                      0          
          6        ASSIGN_OBJ                                               'exception'
          7        OP_DATA                                                  $6
  132     8      > RETURN                                                   <false>
  135     9    >   FETCH_OBJ_R                                      ~8      'pdoStatement'
         10        INIT_METHOD_CALL                                         ~8, 'errorInfo'
         11        DO_FCALL                                      0  $9      
         12        ISSET_ISEMPTY_DIM_OBJ                         1  ~10     $9, 2
         13        BOOL_NOT                                         ~11     ~10
         14      > JMPZ                                                     ~11, ->32
  136    15    >   FETCH_OBJ_R                                      ~12     'client'
         16        INIT_METHOD_CALL                                         ~12, 'errorInfo'
         17        DO_FCALL                                      0  $13     
         18        FETCH_DIM_R                                      ~14     $13, 2
         19        ASSIGN                                                   !0, ~14
  137    20        FETCH_OBJ_R                                      ~16     'client'
         21        INIT_METHOD_CALL                                         ~16, 'errorCode'
         22        DO_FCALL                                      0  $17     
         23        ASSIGN                                                   !1, $17
  139    24        NEW                                              $20     'PDOException'
         25        SEND_VAR_EX                                              !0
         26        ASSIGN                                           ~21     !2, !1
         27        SEND_VAL_EX                                              ~21
         28        DO_FCALL                                      0          
         29        ASSIGN_OBJ                                               'exception'
         30        OP_DATA                                                  $20
  141    31      > RETURN                                                   <false>
  144    32    > > RETURN                                                   <true>
  145    33*     > RETURN                                                   null

End of function checkerror

Function loadconfigfile:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
2 jumps found. (Code = 47) Position 1 = 26, Position 2 = 29
Branch analysis from position: 26
2 jumps found. (Code = 47) Position 1 = 30, Position 2 = 33
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 46
Branch analysis from position: 34
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Branch analysis from position: 29
Branch analysis from position: 25
filename:       /in/uB2Dj
function name:  loadConfigFile
number of ops:  56
compiled vars:  !0 = $filepath, !1 = $string, !2 = $json, !3 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  147     0  E >   RECV                                             !0      
  148     1        BEGIN_SILENCE                                    ~4      
          2        INIT_FCALL                                               'file_get_contents'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        END_SILENCE                                              ~4
          6        ASSIGN                                                   !1, $5
  150     7        TYPE_CHECK                                    4          !1
          8      > JMPZ                                                     ~7, ->13
  151     9    >   NEW                                              $8      'FileIOException'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $8
  154    13    >   BEGIN_SILENCE                                    ~10     
         14        INIT_FCALL                                               'json_decode'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $11     
         18        END_SILENCE                                              ~10
         19        ASSIGN                                                   !2, $11
  156    20        TYPE_CHECK                                    4  ~13     !2
         21      > JMPNZ_EX                                         ~13     ~13, ->25
         22    >   FETCH_DIM_R                                      ~14     !2, 'USERNAME'
         23        BOOL_NOT                                         ~15     ~14
         24        BOOL                                             ~13     ~15
         25    > > JMPNZ_EX                                         ~13     ~13, ->29
         26    >   FETCH_DIM_R                                      ~16     !2, 'PASSWORD'
         27        BOOL_NOT                                         ~17     ~16
         28        BOOL                                             ~13     ~17
         29    > > JMPNZ_EX                                         ~13     ~13, ->33
         30    >   FETCH_DIM_R                                      ~18     !2, 'DSN'
         31        BOOL_NOT                                         ~19     ~18
         32        BOOL                                             ~13     ~19
         33    > > JMPZ                                                     ~13, ->46
  157    34    >   NEW                                              $20     'InvalidFileFormatException'
         35        CONCAT                                           ~21     !0, '+%3A+'
         36        INIT_FCALL                                               'json_last_error_msg'
         37        DO_ICALL                                         $22     
         38        CONCAT                                           ~23     ~21, $22
         39        SEND_VAL_EX                                              ~23
         40        INIT_FCALL                                               'json_last_error'
         41        DO_ICALL                                         $24     
         42        ASSIGN                                           ~25     !3, $24
         43        SEND_VAL_EX                                              ~25
         44        DO_FCALL                                      0          
         45      > THROW                                         0          $20
  160    46    >   FETCH_DIM_R                                      ~28     !2, 'USERNAME'
         47        ASSIGN_OBJ                                               'username'
         48        OP_DATA                                                  ~28
  161    49        FETCH_DIM_R                                      ~30     !2, 'PASSWORD'
         50        ASSIGN_OBJ                                               'password'
         51        OP_DATA                                                  ~30
  162    52        FETCH_DIM_R                                      ~32     !2, 'DSN'
         53        ASSIGN_OBJ                                               'dsn'
         54        OP_DATA                                                  ~32
  163    55      > RETURN                                                   null

End of function loadconfigfile

End of class PDOWrapper.

Class MySqlDB:
Function getconfigfile:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  getConfigFile
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  173     0  E > > RETURN                                                   '%7E%2F.mysql%2Fconfig.json'
  174     1*     > RETURN                                                   null

End of function getconfigfile

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2Dj
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_METHOD_CALL                                         'reset'
          1        DO_FCALL                                      0          
   27     2      > RETURN                                                   null

End of function __construct

Function prepare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/uB2Dj
function name:  prepare
number of ops:  14
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
   42     1        INIT_METHOD_CALL                                         'ready'
          2        DO_FCALL                                      0  $1      
          3      > JMPZ                                                     $1, ->10
   43     4    >   FETCH_OBJ_R                                      ~3      'client'
          5        INIT_METHOD_CALL                                         ~3, 'prepare'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $4      
          8        ASSIGN_OBJ                                               'pdoStatement'
          9        OP_DATA                                                  $4
   46    10    >   INIT_METHOD_CALL                                         'checkError'
         11        DO_FCALL                                      0  $5      
         12      > RETURN                                                   $5
   47    13*     > RETURN                                                   null

End of function prepare

Function execute:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/uB2Dj
function name:  execute
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   INIT_METHOD_CALL                                         'ready'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ_EX                                          ~1      $0, ->5
          3    >   FETCH_OBJ_R                                      ~2      'pdoStatement'
          4        BOOL                                             ~1      ~2
          5    > > JMPZ                                                     ~1, ->10
   51     6    >   FETCH_OBJ_R                                      ~3      'pdoStatement'
          7        INIT_METHOD_CALL                                         ~3, 'execute'
          8        DO_FCALL                                      0  $4      
          9      > RETURN                                                   $4
   54    10    >   INIT_METHOD_CALL                                         'checkError'
         11        DO_FCALL                                      0  $5      
         12      > RETURN                                                   $5
   55    13*     > RETURN                                                   null

End of function execute

Function fetch:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/uB2Dj
function name:  fetch
number of ops:  12
com

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.68 ms | 1420 KiB | 21 Q