Re: [PHP] PHP Dev Facts

2008-10-17 Thread Michal Sokolowski
2008/10/17 Nathan Rixham <[EMAIL PROTECTED]>

> Evening All,
>
> I'd be /really/ interested to know who uses what!
>
> *Procedural or OOP?*
>
Mostly OO

>
> *Dev OS*
>
Ubuntu Hardy

>
> *Dev PHP Version*
>
5.2.? - I don't remember

>
> *Live Server OS*
>
CentOS, Fedora

>
> *Live Server PHP Version*
>
5.2.?

>
> *Which HTTP Server Software (+version)?*
>
Apache 2.2

>
> *IDE / Dev Environment*
>
Eclipse Ganymede + PDT

>
> *Preferred Framework(s)?*

Hopefully Zend soon, as I'm learning it now.

>
>
> *Do you Unit Test?*

No

>
>
> *Most Used Internal PHP Class*

PDO, Mysqli

>
>
> *Preferred OS CMS*

WordPress

>
>
> *Anything else you use frequently in you're PHP'ing that's worth
> mentioning:*

No

>
>
> ps: I'm not asking for any kind of research project, just interested and
> interested to know what's most common + might learn something/find some new
> tools/toys!
>
> pps: will reply myself as well but if I do here it'll make your intertwined
> replies messy!
>
> Many Regards
>
> Nathan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] PHP tags - any reasons to close ?>

2008-09-23 Thread Michal Sokolowski
Hi,

First time I've seen code without closing tag is when I've read about Zend
Framework and bellow is what they say about it.

"For files that contain only PHP code, the closing tag ("?>") is never
permitted. It is not required by PHP, and omitting it prevents the
accidental injection of trailing whitespace into the response. "

Regards,
Michal Sokolowski

2008/9/23 Martin ZvarĂ­k <[EMAIL PROTECTED]>

> Hi,
> I have seen some projects where people start with opening tag  they DON'T close it with ?>
> This is especially the case of CONFIG.php files...
>
> 1) What's the reason of that?
>
> 2) What if you would not close any 100% PHP files?
>
> 3) What's the reason of making an empty space after ?>
> I've also seen this in some projects.
>
>
> Thanks for ideas,
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Re: Google Maps Distance Between UK Postcodes

2008-09-01 Thread Michal Sokolowski
2008/9/1 Tom Chubb <[EMAIL PROTECTED]>

> On 01/09/2008, Colin Guthrie <[EMAIL PROTECTED]> wrote:
> >
> > Tom Chubb wrote:
> >
> >> I thought it would be easy but it seems that I need to convert each
> >> postcode
> >> to Lat/Long using Geocoding and then work it out from there.
> >>
> >
> > That's the best way: then just do something like:
> >
> > Here's how I do it in SQL, but the principle is the same in PHP, so I'm
> > sure you'll be able to convert it.
> >
> > HTHs
> >
> > Col
> >
> > 
> >  public static function Distance($latA, $lngA, $latB, $lngB, $blnMiles =
> > false)
> >  {
> >$multiplier = 6371;
> >if ($blnMiles)
> >  $multiplier *= 1.609344;
> >
> >$rv = << >  (ACOS(
> >SIN(RADIANS($latA)) * SIN(RADIANS($latB))
> >+ COS(RADIANS($latA)) * COS(RADIANS($latB)) * COS(RADIANS($lngB) -
> > RADIANS($lngA)))
> >  * $multiplier)
> > ESQL;
> >return $rv;
> >  }
> > 
> >
> >
> >
> >
> > --
> >
> > Colin Guthrie
> > gmane(at)colin.guthr.ie
> > http://colin.guthr.ie/
> >
> > Day Job:
> >  Tribalogic Limited [http://www.tribalogic.net/]
> > Open Source:
> >  Mandriva Linux Contributor [http://www.mandriva.com/]
> >  PulseAudio Hacker [http://www.pulseaudio.org/]
> >  Trac Hacker [http://trac.edgewall.org/]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> Thanks Colin,
> That's all way above my head, but I think I'll be able to understand it
> after a strong coffee!
> Any idea how you get the co-ords from the UK Postcode though?
> There seems to be a privacy factor with UK postcodes, but I'm only after
> the
> first section: eg SW11 6**
>


This address should help you. Thay have distance calculator on the page but
also you can download database with postcodes and their co-ords ->
http://www.pc-i.co.uk/postcode-distance.php