开发者

AMFPHP AMF0 and AMF3 [closed]

It's difficult to tell what is being asked here. This开发者_运维百科 question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

What are the difference between them?


  • AMF 0: Introduced in Flash Player 6 in 2001 and remained unchanged with the introduction of ActionScript 2.0 in Flash Player 7 and with the release of Flash Player 8.
  • AMF 3: In Flash Player 9, Action Script 3.0 was introduced. The new data types and language features made possible by these improvements prompted AMF to be updated.
  • AMFPHP: Is a free open-source PHP implementation of the Action Message Format(AMF).


Programs/Frameworks like AMFPHP/ZendAMF tend to fall back to AMF0 unless it uses a specific AMF3 feature. AMF 3 can pass a lot more things by reference, as well as supports sending a ByteArray and XML objects.

From the Specification:

  • Object traits can now be sent by reference
  • Strings can now be sent by reference
  • int/uint type support
  • flash.utils.ByteArray type support, can also be sent by reference
  • flash.utils.IExternalizable support
  • Variable length encoding scheme for integers to reduce data size
  • References are sent using variable length integer
  • String UTF-8 length uses variable length integer
  • Array count uses variable length integer
  • A single Array type marker covers both strict and ECMA Arrays
  • Dates no longer send timezone information
  • Dates can now be sent by reference
  • XMLDocument UTF-8 length uses variable length integer
  • XMLDocument can now be sent by reference
  • XML type support, can also be sent by reference
  • XML UTF-8 length uses variable length integer
  • ByteArray type length uses variable length integer
  • Boolean true and false are now sent as one byte type markers
  • Unsupported type marker has been removed
  • Reserved RecordSet and Movieclip type markers have been removed
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜