Fwd: [PHP] exif_read_data($image, 0, true)

From: Date: Sun, 01 Feb 2015 01:35:25 +0000
Subject: Fwd: [PHP] exif_read_data($image, 0, true)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-324361@lists.php.net to get a copy of this message
> Begin forwarded message: > > Subject: Re: [PHP] exif_read_data($image, 0, true) > From: Peter West <lists@pbw.id.au> > Date: 1 February 2015 11:15:33 am AEST > To: Abdul Abdul <abdul.sw84@gmail.com> > > When you ask some questions in code, you need a true or false answer. > > For example, the common form ( in just about all languages) of the "if" statement. > if (some-condition) > do something > > The "if" statement is a question: Is some-condition true or false? > > Languages which allow you to ask these questions need some convention for supply a true or > false answer, and those conventions differ. Frequently, one way of saying "false" is to > return the value 0 to the one asking the question. > > This lets you ask questions in the form of some kind of arithmetic expression that results in > either 0 or some other value. You can then do-something if the expression returns any value except > 0. The manual will tell you exactly what php takes as true and false, and you can formulate your > code questions accordingly. This allows you to write more compact code. > > When you provide a true or false (that is, a boolean) parameter to a function, the function > will internally ask a question using that parameter, and modify its behaviour accordingly. > > Find a basic php tutorial. Someone on the list can probably point you to one. People run out > of patience with those who have not taken the trouble to find out the basics for themselves. > > Peter West > > "Other seed fell among thorns, and the thorns grew up and choked it, and it yielded no > grain." > >> On 1 Feb 2015, at 10:52 am, Abdul Abdul <abdul.sw84@gmail.com> wrote: >> >> On Sat, Jan 31, 2015 at 4:39 PM, Aziz Saleh <azizsaleh@gmail.com> wrote: >> >>> >>> Documentation is here: >>> http://php.net/manual/en/function.exif-read-data.php >>> What exactly did you >>> not understand of it? >>> >>> If you are expecting someone to go through the entire paramter section and >>> explain it to you, give it some time and someone might eventually do. >>> >> >> Thanks for your reply. Sorry I'm totally new to this. The part I didn't >> understand is what "0" and "true" mean here? Since when I remove those >> parameters and keep $image, I don't get an output. >

« previous php.general (#324361) next »