Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Donovan Brooke
Mari Masuda wrote: [snip] For a concrete example of responsive design in action, point your browser to http://www.sasquatchfestival.com/ and then slowly make the window wider/skinnier to see how the design adapts to different viewport sizes. Very nice... makes for an easy display to a wide r

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Donovan Brooke
Paul M Foster wrote: [snip] How about this: those of you with iPhones, Androids and the like, point your phones at a page which reports $_SERVER['HTTP_USER_AGENT'] (like a page which runs the phpinfo() function), and post what you get back from that exercise and what device made the query. I'd li

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Marco Behnke
Am 06.02.12 21:55, schrieb Adam Richardson: > On Mon, Feb 6, 2012 at 3:44 PM, Marco Behnke wrote: > >> Am 06.02.12 17:23, schrieb Alain Williams: >> >> many places to see if things should be done. That is just as bad as >> lots of GOTO -- often when having to write something like that I will >> ha

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Matijn Woudt
On Mon, Feb 6, 2012 at 11:34 PM, Tim Streater wrote: > On 06 Feb 2012 at 20:51, Simon J Welsh wrote: > >> On 7/02/2012, at 9:44 AM, Marco Behnke wrote: >> >>> Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a function that can fail in se

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Paul M Foster
On Mon, Feb 06, 2012 at 09:01:45PM +, Stuart Dallas wrote: > On 6 Feb 2012, at 05:58, Paul M Foster wrote: > > > This is sort of obliquely related to PHP. > > > > I don't have a smart phone, but I need to know a couple of things: > > There are simulators available for most smartphones. > >

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Paul M Foster
On Mon, Feb 06, 2012 at 04:04:28PM -0500, Adam Richardson wrote: >On Mon, Feb 6, 2012 at 3:50 PM, Adam Richardson <[1]simples...@gmail.com> >wrote: > > On Mon, Feb 6, 2012 at 12:58 AM, Paul M Foster > <[2]pa...@quillandmouse.com> wrote: > >This is sort of obliquely rela

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Donovan Brooke
Stuart Dallas wrote: On 6 Feb 2012, at 21:12, Marc Guay wrote: the way your site renders should be purely based upon the size of the display. Although I mostly agree with this statement, it ignores the most interesting aspects of mobile technology, such as being able to ask the user for their

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Donovan Brooke
Ashley Sheridan wrote: [snip] Keeping a PHP angle to this, have you looked at using an up-to-date browscap.ini file with PHP? Basically, you can use that to read in the raw user agent string from the browser, and it then finds a matching entry in the ini file and gives you back some values about

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Paul M Foster
On Mon, Feb 06, 2012 at 09:02:34PM +, Ashley Sheridan wrote: [snip] > > > Keeping a PHP angle to this, have you looked at using an up-to-date > browscap.ini file with PHP? Basically, you can use that to read in the > raw user agent string from the browser, and it then finds a matching > ent

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Paul M Foster
On Mon, Feb 06, 2012 at 02:28:42PM -0600, Donovan Brooke wrote: > Paul M Foster wrote: > >This is sort of obliquely related to PHP. > > > >I don't have a smart phone, but I need to know a couple of things: > > > >1) Do smart phones use the same browsers as the desktop, or do they have > >their own

[PHP] Re: Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 20:51, Simon J Welsh wrote: > On 7/02/2012, at 9:44 AM, Marco Behnke wrote: > >> Am 06.02.12 17:23, schrieb Alain Williams: >>> However: a few GOTOs can make things clearer. Think of a function that >>> can fail in several different places (eg data validation, ...). But it >>>

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Stuart Dallas
On 6 Feb 2012, at 21:12, Marc Guay wrote: >> the way your site renders should be purely based upon the size of the >> display. > > Although I mostly agree with this statement, it ignores the most > interesting aspects of mobile technology, such as being able to ask > the user for their GPS locat

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Mari Masuda
On Feb 6, 2012, at 1:01 PM, Stuart Dallas wrote: [snip] > Generally speaking you're better off with a design that automatically adapts > to the viewport on which it's being displayed. [snip] For a concrete example of responsive design in action, point your browser to http://www.sasquatchfest

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Marc Guay
> the way your site renders should be purely based upon the size of the display. Although I mostly agree with this statement, it ignores the most interesting aspects of mobile technology, such as being able to ask the user for their GPS location and deliver content accordingly. I worked on some r

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Stuart Dallas
On 6 Feb 2012, at 20:44, Marco Behnke wrote: > Am 06.02.12 17:23, schrieb Alain Williams: >> However: a few GOTOs can make things clearer. Think of a function that >> can fail in several different places (eg data validation, ...). But it >> is reading a file which needs to be closed before the fun

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 3:50 PM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 12:58 AM, Paul M Foster wrote: > >> This is sort of obliquely related to PHP. >> >> I don't have a smart phone, but I need to know a couple of things: >> >> 1) Do smart phones use the same browsers as the desktop, or d

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Stuart Dallas
On 6 Feb 2012, at 05:58, Paul M Foster wrote: > This is sort of obliquely related to PHP. > > I don't have a smart phone, but I need to know a couple of things: There are simulators available for most smartphones. > 1) Do smart phones use the same browsers as the desktop, or do they have > thei

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Ashley Sheridan
On Mon, 2012-02-06 at 14:28 -0600, Donovan Brooke wrote: > Paul M Foster wrote: > > This is sort of obliquely related to PHP. > > > > I don't have a smart phone, but I need to know a couple of things: > > > > 1) Do smart phones use the same browsers as the desktop, or do they have > > their own st

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 3:44 PM, Marco Behnke wrote: > Am 06.02.12 17:23, schrieb Alain Williams: > > However: a few GOTOs can make things clearer. Think of a function that > > can fail in several different places (eg data validation, ...). But it > > is reading a file which needs to be closed bef

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Simon J Welsh
On 7/02/2012, at 9:44 AM, Marco Behnke wrote: > Am 06.02.12 17:23, schrieb Alain Williams: >> However: a few GOTOs can make things clearer. Think of a function that >> can fail in several different places (eg data validation, ...). But it >> is reading a file which needs to be closed before the f

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 12:58 AM, Paul M Foster wrote: > This is sort of obliquely related to PHP. > > I don't have a smart phone, but I need to know a couple of things: > > 1) Do smart phones use the same browsers as the desktop, or do they have > their own stripped down versions of browsers? > B

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Marco Behnke
Am 06.02.12 17:23, schrieb Alain Williams: > However: a few GOTOs can make things clearer. Think of a function that > can fail in several different places (eg data validation, ...). But it > is reading a file which needs to be closed before the function > returns. I have seen code where some $IsErr

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Donovan Brooke
Paul M Foster wrote: This is sort of obliquely related to PHP. I don't have a smart phone, but I need to know a couple of things: 1) Do smart phones use the same browsers as the desktop, or do they have their own stripped down versions of browsers? 2) When a browser broadcasts its header telli

[PHP] How can I debug wsf/php in eclipse?

2012-02-06 Thread Ali Asghar Toraby Parizy
Hi. I'm developing a wsf/php web service. I'm using doc/lit messaging format and every thing is OK. But I don't know how i can debug my web services using eclipse. Although I can directly run my web service in debug mode, Unfortunately when I debug my client it never jump into web service code and

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 11:07 AM, Daniel Brown wrote: > On Mon, Feb 6, 2012 at 12:59, Larry Martell > wrote: >> >> I just pulled out my notes from that job - it took me 59 hours to do >> the conversion and remove the gotos and recursion, and another 67 >> hours for testing, verification, integrat

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Daniel Brown
On Mon, Feb 6, 2012 at 12:59, Larry Martell wrote: > > I just pulled out my notes from that job - it took me 59 hours to do > the conversion and remove the gotos and recursion, and another 67 > hours for testing, verification, integration, documentation, and > certification. And, having contr

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 10:13 AM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 12:09 PM, Larry Martell > wrote: > >> >> The source is my own personal experience working for an avionics >> company and working with the FAA to get our code certified under the >> DO-178B standard. I never saw anythi

Re: [PHP] Long Live GOTO

2012-02-06 Thread Jim Giner
"Robert Cummings" wrote in message news:4f30086a.6080...@interjinn.com... 1) deal with the trivial and error cases first > > Some say you should never return early from a function... I too think that > early returns can improve the readability of a function-- > especially if they are short sn

Re: [PHP] Long Live GOTO

2012-02-06 Thread Jim Giner
"Adam Richardson" wrote in message news:cac6cjqz5wku8c9ruqgc4rqg5cq35a-lfs1rryos3wtfys6r...@mail.gmail.com... > On Mon, Feb 6, 2012 at 10:05 AM, Robert Cummings > wrote: > >> On 12-02-06 04:07 AM, Tim Streater wrote: >> >>> On 06 Feb 2012 at 07:47, Adam >>> Richardson> >>> wrote: >>> >>> Whil

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 11:58 AM, Tim Streater wrote: > On 06 Feb 2012 at 09:48, Adam Richardson wrote: > > > On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardson >wrote: > > > >> On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater > wrote: > > >> I disagree that the nested function is a straw-man. I (just

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 12:09 PM, Larry Martell wrote: > > The source is my own personal experience working for an avionics > company and working with the FAA to get our code certified under the > DO-178B standard. I never saw anything that said 'no GOTOs' but that's > what I was told. I was also t

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 9:50 AM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 11:28 AM, Larry Martell > wrote: > >> On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams wrote: >> > On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: >> >> NO "GO"! >> >> As one who started back in the 70's with

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Robert Cummings
On 12-02-06 11:35 AM, Alain Williams wrote: On Mon, Feb 06, 2012 at 09:28:10AM -0700, Larry Martell wrote: On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams wrote: If I survey my code I find that I use one GOTO in about 4,000 lines of code - that I do not find excessive. There are, however, pe

Re: [PHP] Long Live GOTO

2012-02-06 Thread Robert Cummings
On 12-02-06 11:58 AM, Tim Streater wrote: On 06 Feb 2012 at 09:48, Adam Richardson wrote: On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardsonwrote: On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: I disagree that the nested function is a straw-man. I (just as the other authors I'd linked

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 09:48, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardson wrote: > >> On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: >> I disagree that the nested function is a straw-man. I (just as the other >> authors I'd linked to describing the "arrow" pattern

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 11:28 AM, Larry Martell wrote: > On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams wrote: > > On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: > >> NO "GO"! > >> As one who started back in the 70's with old style coding that utilized > GoTo > >> in Cobol, Fortran, et

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Alain Williams
On Mon, Feb 06, 2012 at 09:28:10AM -0700, Larry Martell wrote: > On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams wrote: > > If I survey my code I find that I use one GOTO in about 4,000 lines of code > > - > > that I do not find excessive. > > > > There are, however, people who consider any GOTO

Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 10:05 AM, Robert Cummings wrote: > On 12-02-06 04:07 AM, Tim Streater wrote: > >> On 06 Feb 2012 at 07:47, Adam >> Richardson> >> wrote: >> >> While not purely focused on PHP, I toss this out to the group because I >>> believe there are some novel, interesting points rega

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams wrote: > On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: >> NO "GO"! >> As one who started back in the 70's with old style coding that utilized GoTo >> in Cobol, Fortran, etc. and had to deal with "spaghetti code" written by >> even earlier

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Alain Williams
On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: > NO "GO"! > As one who started back in the 70's with old style coding that utilized GoTo > in Cobol, Fortran, etc. and had to deal with "spaghetti code" written by > even earlier developers who never considered that someone else would ha

[PHP] Re: Long Live GOTO

2012-02-06 Thread Jim Giner
NO "GO"! As one who started back in the 70's with old style coding that utilized GoTo in Cobol, Fortran, etc. and had to deal with "spaghetti code" written by even earlier developers who never considered that someone else would have to maintain their code, I feel strongly that GoTo is not to be

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 15:05, Robert Cummings wrote: > I've had a strong opinion on goto for a very long time. I was one of the > proponents who argued on internals for its inclusion several years ago. > I stand by its utility and refer the reader to the fact that many open > source projects, especia

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Marc Guay
> 1) Do smart phones use the same browsers as the desktop, or do they have > their own stripped down versions of browsers? Different browsers, some of which are worse than IE (see Blackberry). > 2) When a browser broadcasts its header telling the server what kind of > browser is involved, do the

Re: [PHP] Long Live GOTO

2012-02-06 Thread Robert Cummings
On 12-02-06 04:07 AM, Tim Streater wrote: On 06 Feb 2012 at 07:47, Adam Richardson wrote: While not purely focused on PHP, I toss this out to the group because I believe there are some novel, interesting points regarding the potential benefits of using the goto construct as implemented in PHP:

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Jim Giner
Nice article!! You should read up on responsive web design. http://www.alistapart.com/articles/responsive-web-design/ should get you started. HTH!= -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: > >> On 06 Feb 2012 at 07:47, Adam Richardson wrote: >> >> > While not purely focused on PHP, I toss this out to the group because I >> > believe there are some novel, interesting points

Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: > On 06 Feb 2012 at 07:47, Adam Richardson wrote: > > > While not purely focused on PHP, I toss this out to the group because I > > believe there are some novel, interesting points regarding the potential > > benefits of using the goto construc

Re: [PHP] Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 07:47, Adam Richardson wrote: > While not purely focused on PHP, I toss this out to the group because I > believe there are some novel, interesting points regarding the potential > benefits of using the goto construct as implemented in PHP: > > http://adamjonrichardson.com/2012