Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); namespace Doctrine\DBAL\Driver\PgSQL; use Doctrine\DBAL\..
Decoded Output download
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Driver\PgSQL;
use Doctrine\DBAL\Driver\AbstractException;
use PgSql\Result as PgSqlResult;
use function pg_result_error_field;
use const PGSQL_DIAG_MESSAGE_PRIMARY;
use const PGSQL_DIAG_SQLSTATE;
/**
* @internal
*
* @psalm-immutable
*/
final class Exception extends AbstractException
{
public static function fromResult(PgSqlResult $result): self
{
$sqlstate = pg_result_error_field($result, PGSQL_DIAG_SQLSTATE);
if ($sqlstate === false) {
$sqlstate = null;
}
return new self((string) pg_result_error_field($result, PGSQL_DIAG_MESSAGE_PRIMARY), $sqlstate);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Driver\PgSQL;
use Doctrine\DBAL\Driver\AbstractException;
use PgSql\Result as PgSqlResult;
use function pg_result_error_field;
use const PGSQL_DIAG_MESSAGE_PRIMARY;
use const PGSQL_DIAG_SQLSTATE;
/**
* @internal
*
* @psalm-immutable
*/
final class Exception extends AbstractException
{
public static function fromResult(PgSqlResult $result): self
{
$sqlstate = pg_result_error_field($result, PGSQL_DIAG_SQLSTATE);
if ($sqlstate === false) {
$sqlstate = null;
}
return new self((string) pg_result_error_field($result, PGSQL_DIAG_MESSAGE_PRIMARY), $sqlstate);
}
}
Function Calls
None |
Stats
MD5 | e9a7e267a606b735929a5fc48cd88094 |
Eval Count | 0 |
Decode Time | 113 ms |