Using C++ opcodes inside PHP - HIPHOP model

81 Views Asked by At

Can anybody explain about how practically it is possible to implement a coding structure which encapsulates C++ opcodes in php code. I assumes the consumption of memory and cpu are more in the case when executing DML statements in SQL queries having INSERT,SELECT, UPDATE, DELETE ?

Is it possible to convert following PHP code block of INSERT into a c++ opcode ?

// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
    }

$sql = "INSERT INTO MyGuests (firstname, lastname, email)
VALUES ('John', 'Doe', '[email protected]')";

 if ($conn->query($sql) === TRUE) {
 echo "New record created successfully";
     } 
    else {
  echo "Error: " . $sql . "<br>" . $conn->error;
     }

Which all are other situations we can use these coding structure in point to reduce the resource usage in server ?

0

There are 0 best solutions below