芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/vendor/bitwasp/buffertools/examples/usingTemplates2.php
hash('sha256', 'abc'), 'message_id' => 9123, 'message' => "Hi there! What's up?" ]; // Templates are read/write $template = (new TemplateFactory) ->bytestring(32) ->uint32() ->varstring() ->getTemplate(); // Write the structure $binary = $template->write([ Buffer::hex($structure->hash), $structure->message_id, new Buffer($structure->message) ]); echo $binary->getHex() . "\n"; // Use the template to read resulting Buffer $parsed = $template->parse(new Parser($binary)); print_r($parsed);