RE: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo
Daevid Vincent wrote: -Original Message- From: Ben Dunlap [mailto:bdun...@agentintellect.com] Sent: Friday, October 02, 2009 2:58 PM To: php-general@lists.php.net; Daevid Vincent Subject: Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo mind-blowing. What the heck /is/ supposed to happen when you do this: $a = 2; $a = $a++; echo $a; Seems like any way you slice it the output should be 3. I guess what's ... and, in fact, that /is/ how C behaves. The following code: int a = 2; a = a++; printf(a = [%d]\n, a); Will output a = [3]. At least on Ubuntu 9 using gcc 4.3.3. So I retract my initial terse reply and apologize for misunderstanding your question. Ben EXACTLY! :) God (or diety of your choice) bless you for getting what I'm saying and proving that it's not C like either. That just adds credence to my/our argument. d Well, Daevid, I still do appreciate the difference between $a = 1; $b = $a++; // $b should be 1 and $a = $a++; $b = $a; // $b should be 2 unless PHP manages to exhibit some overlay problem (read: bug) for $a in the 2nd case. True? joost. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include Files in HTML
Bob McConnell wrote: From: sono-io at fannullone.us In my readings, I've run across examples showing include files being called from within the head/head tags, and other examples showing them called within body/body. I've always put them in the header section myself, but I was wondering if one is better than the other, or is it just personal preference? Depends on what you are including. The only tags that can be inside the head are base, link, meta, script, style, and title. Everything else is either body or prologue. The full specs can be found at http://www.w3schools.com/tags/default.asp. Bob McConnell Sure enough. What the OP might not have realized: In the end, what PHP evaluates to, is a stream of html, script, css etc text/data, which is sent to the browser. PHP's include( file ) statement inserts the content of file here-and-now. You can even put the include statement within a for loop in order to include something multiple times... In that sense it is more like a /function/ and really different from cpp's #include /directive/. file can contain PHP code, which is evaluated as if it was here-and-now in the including PHP file; it can contain text/data, which is appended to the text/data stream being produced. All in all, to PHP the spot of file inclusion is not interesting, as long as the resulting PHP code and/or stream data is meaningful. Now back to you, Bob :-) Regards, Joost. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] survey for graduation thesis
Hello Everybody, I am doing a research in the field of web application developing for my graduatation thesis for university. I am studying information management at the university of Tilburg in The Netherlands. I want to do a survey about some aspects of web application development. I am basically researching the methods of web application development, like C#, Java, PHP, .Net, etc. The reseach is focussed towards what the best developing methods are related to seven quality attributes. Now I have made an online survey and I want to ask you to be so kind to fill in this survey for me. It costs you approximately 10 minutes of your time, and I will certainly help me in my research and to graduate! You can find this online survey at: http://www.wilbrink.ws/survey/ Thank you all very much Best regards Joost Wilbrink -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php