0

I know this may sound easy for a lot of people, but I've tried to look into it (stackoverflow , php net), and I didn't find a clear answer about what Flags are in PHP. Maybe I didn't look it right. I would appreciate if someone could explain this, and also where they are commonly used.

Aaron Bertrand
  • 272,866
  • 37
  • 466
  • 490
Mircea Voivod
  • 721
  • 1
  • 10
  • 20
  • 1
    What kind of flags do you mean? In what context did you come across the term? Although I'm pretty sure you mean http://php.net/manual/en/configuration.changes.php – Pekka Oct 17 '12 at 14:08
  • 3
    In what context are you seeing reference to PHP Flags? There are flags on the command line... – Michael Berkowski Oct 17 '12 at 14:08
  • depends on the context. http://www.google.com/search?q=php+flags – Karoly Horvath Oct 17 '12 at 14:14
  • I found something about flags here http://stackoverflow.com/questions/9635301/what-are-php-flags-in-function-arguments , but still I'm not exactly sure what do they do – Mircea Voivod Oct 17 '12 at 14:14
  • 2
    That is a so called **Bitmask**. It allows you to pass multiple values (often for On/Off) with one variable. Common for option-flags. Like flag up (on) and flag down (off). See [http://en.wikipedia.org/wiki/Flag_(computing)](http://en.wikipedia.org/wiki/Flag_(computing)) - Also edit your question so it is more clear what you ask about otherwise the question is not clear. – hakre Oct 17 '12 at 14:16
  • @Vodaldrien what don't you understand in the answer of the linked question? – 1r0n1k Oct 17 '12 at 14:22

1 Answers1

1

if you try to mention the msql_field_flags, I found this on w3schools:

The mysql_field_flags() function returns the flags of a field in a recordset.

This function gets field data from the mysql_query() function and returns a string on success, or FALSE on failure or when there are no more rows.

example:

mysql_field_flags(data,field_offset)
  • data: Required. Specifies which data pointer to use. The data pointer is the result from the mysql_query() function

  • field_offset: Required. Specifies which field to start returning. 0 indicates the first field

hakre
  • 193,403
  • 52
  • 435
  • 836
Elendas
  • 733
  • 3
  • 8
  • 22