cdef example

if (!filter_var(\ini_get('ffi.enable'), \FILTER_VALIDATE_BOOL)) {
            $this->markTestSkipped('FFI not enabled for CLI SAPI');
        }
    }

    public function testCastAnonymousStruct()
    {
        $this->assertDumpEquals(<<<'PHP' FFI\CData<struct <anonymous>> size 4 align 4 { uint32_t x: 0 } PHP, \FFI::cdef()->new('struct { uint32_t x; }'));
    }

    public function testCastNamedStruct()
    {
        $this->assertDumpEquals(<<<'PHP' FFI\CData<struct Example> size 4 align 4 { uint32_t x: 0 } PHP, \FFI::cdef()->new('struct Example { uint32_t x; }'));
    }

    
Home | Imprint | This part of the site doesn't use cookies.