hex2bin

Supported Versions: PHP 5 >= 5.4.0, PHP 7, PHP 8
Decodes a hexadecimally encoded binary string
<?php hex2bin(string $string): string|false
<?php     public function testEscapeBinary()

    {

        $this->assertSame("x'dead00beef'", $this->app['db']->escape(hex2bin('dead00beef'), true));

    }



    public function testEscapeString()
<?php     public function testEscapeBinary()

    {

        $this->assertSame("x'dead00beef'", $this->app['db']->escape(hex2bin('dead00beef'), true));

    }



    public function testEscapeString()
<?php     public function testEscapeBinary()

    {

        $this->assertSame("'\\xdead00beef'::bytea", $this->app['db']->escape(hex2bin('dead00beef'), true));

    }



    public function testEscapeString()
<?php     public function testEscapeBinary()

    {

        $this->assertSame("x'dead00beef'", $this->app['db']->escape(hex2bin('dead00beef'), true));

    }



    public function testEscapeString()
<?php     public function testEscapeBinary()

    {

        $this->assertSame('0xdead00beef', $this->app['db']->escape(hex2bin('dead00beef'), true));

    }



    public function testEscapeString()