3v4l.org

run code in 300+ PHP versions simultaneously
<?php class sqlConnection{ public $mysqli; public function __construct(){ $this->mysqli = new mysqli("private","private","private","private"); if($this->mysqli->connect_errno){ echo "MySQL Connection Is FUCKED!, Error:" . $this->mysqli->connect_error; die("EOF"); } } } class Transaction extends sqlConnection{ public function Add_Customer($cfn,$cln,$cmail){ //Prepare the statement and check if its all good or else MISSION ABORT! if(!$p_stmt = $mysqli->prepare("INSERT INTO customers(customer_first_name,customer_last_name,customer_email) VALUES (?,?,?)")){ die("Oh boy oh boy oooooohhhhh boy, Uhm so yeh its like ye not working..."); } //Bind the stuff to the prepared statement mysqli stage 2 if(!$p_stmt->bind_param("sss",$cfn,$cln,$cmail)){ die("Failed to glue the customer into the Database..."); } //AIM AND FIRE! if(!$p_stmt->execute()){ die("Super orbit Ion lasser not stronk enough to kill..."); } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5rp4
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E > > RETURN                                                   1

Class sqlConnection:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5rp4
function name:  __construct
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $1      'mysqli'
          1        SEND_VAL_EX                                              'private'
          2        SEND_VAL_EX                                              'private'
          3        SEND_VAL_EX                                              'private'
          4        SEND_VAL_EX                                              'private'
          5        DO_FCALL                                      0          
          6        ASSIGN_OBJ                                               'mysqli'
          7        OP_DATA                                                  $1
    6     8        FETCH_OBJ_R                                      ~3      'mysqli'
          9        FETCH_OBJ_R                                      ~4      ~3, 'connect_errno'
         10      > JMPZ                                                     ~4, ->16
    7    11    >   FETCH_OBJ_R                                      ~5      'mysqli'
         12        FETCH_OBJ_R                                      ~6      ~5, 'connect_error'
         13        CONCAT                                           ~7      'MySQL+Connection+Is+FUCKED%21%2C+Error%3A', ~6
         14        ECHO                                                     ~7
    8    15      > EXIT                                                     'EOF'
   10    16    > > RETURN                                                   null

End of function __construct

End of class sqlConnection.

Class Transaction:
Function add_customer:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5rp4
function name:  Add_Customer
number of ops:  25
compiled vars:  !0 = $cfn, !1 = $cln, !2 = $cmail, !3 = $p_stmt, !4 = $mysqli
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   17     3        INIT_METHOD_CALL                                         !4, 'prepare'
          4        SEND_VAL_EX                                              'INSERT+INTO+customers%28customer_first_name%2Ccustomer_last_name%2Ccustomer_email%29+VALUES+%28%3F%2C%3F%2C%3F%29'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                           ~6      !3, $5
          7        BOOL_NOT                                         ~7      ~6
          8      > JMPZ                                                     ~7, ->10
   18     9    > > EXIT                                                     'Oh+boy+oh+boy+oooooohhhhh+boy%2C+Uhm+so+yeh+its+like+ye+not+working...'
   21    10    >   INIT_METHOD_CALL                                         !3, 'bind_param'
         11        SEND_VAL_EX                                              'sss'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !1
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0  $8      
         16        BOOL_NOT                                         ~9      $8
         17      > JMPZ                                                     ~9, ->19
   22    18    > > EXIT                                                     'Failed+to+glue+the+customer+into+the+Database...'
   25    19    >   INIT_METHOD_CALL                                         !3, 'execute'
         20        DO_FCALL                                      0  $10     
         21        BOOL_NOT                                         ~11     $10
         22      > JMPZ                                                     ~11, ->24
   26    23    > > EXIT                                                     'Super+orbit+Ion+lasser+not+stronk+enough+to+kill...'
   28    24    > > RETURN                                                   null

End of function add_customer

Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5rp4
function name:  __construct
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $1      'mysqli'
          1        SEND_VAL_EX                                              'private'
          2        SEND_VAL_EX                                              'private'
          3        SEND_VAL_EX                                              'private'
          4        SEND_VAL_EX                                              'private'
          5        DO_FCALL                                      0          
          6        ASSIGN_OBJ                                               'mysqli'
          7        OP_DATA                                                  $1
    6     8        FETCH_OBJ_R                                      ~3      'mysqli'
          9        FETCH_OBJ_R                                      ~4      ~3, 'connect_errno'
         10      > JMPZ                                                     ~4, ->16
    7    11    >   FETCH_OBJ_R                                      ~5      'mysqli'
         12        FETCH_OBJ_R                                      ~6      ~5, 'connect_error'
         13        CONCAT                                           ~7      'MySQL+Connection+Is+FUCKED%21%2C+Error%3A', ~6
         14        ECHO                                                     ~7
    8    15      > EXIT                                                     'EOF'
   10    16    > > RETURN                                                   null

End of function __construct

End of class Transaction.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1399 KiB | 13 Q