pashugan / php-amf3 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from neoxic/php-amf3
PHP AMF3 extension
Home Page: http://neoxic.me/php-amf3/
License: Other
This project forked from neoxic/php-amf3
PHP AMF3 extension
Home Page: http://neoxic.me/php-amf3/
License: Other
AMF3 encoding/decoding extension for PHP ======================================== Description ----------- The PHP AMF3 extension provides two functions to use in PHP scripts: string amf3_encode(mixed $value [, $options = 0 ]) - Encodes $value into an AMF3 byte-stream. - On success, returns an AMF3 representation of the value. - On error, returns FALSE and issues a warning message (the only error case is wrong argument count). - The $options argument is a bitmask of options. The following bit constants are available in a PHP script: AMF3_FORCE_OBJECT Force encoding non-dense arrays as anonymous objects. mixed amf3_decode(string $amf3 [, int &$count [, $options = 0 ]]) - Decodes $amf3 (AMF3 byte-stream) into a PHP value. - On success, returns a resulting PHP value. - On error, returns NULL and issues a warning message. - If $count is provided, the number of bytes actually read from the string will be stored in it (the value of -1 indicates an error). - The $options argument is a bitmask of options. The following bit constants are available in a PHP script: AMF3_CLASS_MAP Enable class mapping (see the usage constrains below). AMF3_CLASS_AUTOLOAD Enable the PHP class autoloading mechanism in the class mapping mode. AMF3_CLASS_CONSTRUCT Call the default constructor of a decoded object's class in the class mapping mode. WARNING! Class mapping should be used with great care since it can potentially lead to a breach in security. Installation ------------ To install the extension, type the following in the source directory: phpize ./configure make make install This should install the extension to your default PHP extension directory. If it doesn't work as expected, manually put the target amf3.so library to what the 'extension_dir' variable in your php.ini points to. Add the following line to the corresponding extension section in your php.ini: extension=amf3.so To run tests, type: make test Usage constraints ----------------- - PHP NULL, boolean, integer, float (double), string, array and object values are fully convertible back and forth to their corresponding AMF3 types. - AMF3 Date becomes a float value whereas XML, XMLDocument and ByteArray become strings. - In a special case, PHP integers are converted into AMF3 doubles according to the specification (see the link below). - A PHP array is encoded as a dense array when it has ascending integer keys that start with zero and have no gaps. An empty array adheres to this rule. In all other cases, an array is considered non-dense and encoded as a purely associative array to avoid ambiguity. - When class mapping is disabled (the default), AMF3 objects are returned as associative arrays; otherwise, they are represented as objects of the corresponding PHP classes. Links ----- Project homepage: http://neoxic.me/php-amf3/ Official Adobe AMF3 specification: http://download.macromedia.com/pub/labs/amf/amf3_spec_121207.pdf History ------- Version 1.2.2 [31/Aug/2013] + Minor error reporting fixes Version 1.2.1 [18/Mar/2013] + Important security fixes + Minor fixes (build files, tests, README) Version 1.2.0 [03/Mar/2013] + Option to force encoding non-dense arrays as anonymous objects. + Option to perform automatic class mapping in the decoder. Version 1.1.0 [20/Feb/2013] + Support for previously unsupported AMF3 types. + Major code revision. + License changed from GPL to MIT. Version 1.0.0 [03/Feb/2010] + Encoding/decoding of basic PHP/AMF3 values.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.