Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Bug #GH-7746 mysqli_sql_exception->sqlstate is inaccessible --EXTENSIONS-- mysqli..
Decoded Output download
--TEST--
Bug #GH-7746 mysqli_sql_exception->sqlstate is inaccessible
--EXTENSIONS--
mysqli
--SKIPIF--
<?php
require_once "connect.inc";
require_once 'skipifconnectfailure.inc';
?>
--FILE--
<?php
require 'connect.inc';
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
try {
$link->query("stuff");
} catch (mysqli_sql_exception $exception) {
var_dump($exception->getSqlState());
}
?>
--EXPECT--
string(5) "42000"
Did this file decode correctly?
Original Code
--TEST--
Bug #GH-7746 mysqli_sql_exception->sqlstate is inaccessible
--EXTENSIONS--
mysqli
--SKIPIF--
<?php
require_once "connect.inc";
require_once 'skipifconnectfailure.inc';
?>
--FILE--
<?php
require 'connect.inc';
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
try {
$link->query("stuff");
} catch (mysqli_sql_exception $exception) {
var_dump($exception->getSqlState());
}
?>
--EXPECT--
string(5) "42000"
Function Calls
None |
Stats
MD5 | cb0a2f396a14549b3ec73fdbb13f1ffd |
Eval Count | 0 |
Decode Time | 107 ms |