User Tools

Site Tools


uphp:functions:unpack

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
uphp:functions:unpack [2019/12/20 09:36]
admin created
uphp:functions:unpack [2021/09/13 05:57] (current)
Line 9: Line 9:
 <well size="sm"><html> <well size="sm"><html>
 <span style="font-size:125%;color:green">mixed <span style="font-size:125%;color:green">mixed
-<span style="color:black">pack (+<span style="color:black">unpack (
 <span style="color:green">string <span style="color:green">string
 <span style="color:blue">$format<span style="color:black">, <span style="color:blue">$format<span style="color:black">,
Line 29: Line 29:
 | C      | unsigned byte | | C      | unsigned byte |
  
-<html><b><span style="color:blue">$value<span style="color:black"></b>: Value is a binary string passed by reference (&).+<html><b><span style="color:blue">$value<span style="color:black"></b>: Value is a binary string passed by reference (&).</html>
  
 ====Return Values==== ====Return Values====
Line 49: Line 49:
  
   print("\r\nUn packed signed long:\r\n");   print("\r\nUn packed signed long:\r\n");
-  $v=unpack("l",&$str);+  $v=unpack("l",&$str);  // <--- Note the & symbol - this needs to be passed by reference.
  
   print($v);   print($v);
uphp/functions/unpack.1576834590.txt.gz · Last modified: 2021/09/13 05:56 (external edit)