wppaste
WordPress

AMFStream

Source
wp-includes/ID3/module.audio-video.flv.php:423

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 2

$bytesstringpublic
$posintpublic

Methods · 14

Source code

class AMFStream{	/**	 * @var string	 */	public $bytes; 	/**	 * @var int	 */	public $pos; 	/**	 * @param string $bytes	 */	public function __construct(&$bytes) {		$this->bytes =& $bytes;		$this->pos = 0;	} 	/**	 * @return int	 */	public function readByte() { //  8-bit		return ord(substr($this->bytes, $this->pos++, 1));	} 	/**	 * @return int	 */	public function readInt() { // 16-bit		return ($this->readByte() << 8) + $this->readByte();	} 	/**	 * @return int	 */	public function readLong() { // 32-bit		return ($this->readByte() << 24) + ($this->readByte() << 16) + ($this->readByte() << 8) + $this->readByte();	} 	/**	 * @return float|false	 */	public function readDouble() {		return getid3_lib::BigEndian2Float($this->read(8));	} 	/**	 * @return string	 */	public function readUTF() {		$length = $this->readInt();		return $this->read($length);	} 	/**	 * @return string	 */	public function readLongUTF() {		$length = $this->readLong();		return $this->read($length);	} 	/**	 * @param int $length	 *	 * @return string	 */	public function read($length) {		$val = substr($this->bytes, $this->pos, $length);		$this->pos += $length;		return $val;	} 	/**	 * @return int	 */	public function peekByte() {		$pos = $this->pos;

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/ID3/module.audio-video.flv.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.