Re: [PHP] A Strange Problem

2013-06-21 Thread tamouse mailing lists
On Jun 20, 2013 7:20 PM, "Tedd Sperling" wrote: > > On Jun 20, 2013, at 7:12 PM, Stuart Dallas wrote: > > Whatever the reason for this, I'd recommend you always specify a path relative to the current script. > > > > In PHP 5.3+: > > > > $fcontents = file(__DIR__.'/docs/admin-email.txt'); > > > >

Re: [PHP] A Strange Problem

2013-06-20 Thread Tedd Sperling
On Jun 20, 2013, at 7:12 PM, Stuart Dallas wrote: > Whatever the reason for this, I'd recommend you always specify a path > relative to the current script. > > In PHP 5.3+: > > $fcontents = file(__DIR__.'/docs/admin-email.txt'); > > Prior to 5.3: > > $fcontents = file(dirname(__FILE__).'/docs

Re: [PHP] A Strange Problem

2013-06-20 Thread Stuart Dallas
On 20 Jun 2013, at 18:39, Tedd Sperling wrote: > Hi gang: > > I have a very strange problem. > > I can use this statement in one folder: > > $fcontents = file('docs/admin-email.txt'); > > But in a different folder with an exact path having 'docs/admin-email.txt', I > get: > > Warning:

Re: [PHP] A Strange Problem

2013-06-20 Thread Marc Guay
Never used it but searching turned up http://php.net/manual/en/function.chdir.php Marc On 20 June 2013 12:57, Tedd Sperling wrote: > On Jun 20, 2013, at 1:44 PM, Bastien wrote: >> >> It sounds like a current working directory issue. Try running a getcwd() in >> both places to see how they are

Re: [PHP] A Strange Problem

2013-06-20 Thread Tedd Sperling
Daniel: I placed it at root and it reports: /home/content/64//html/sdi That's the same path that had problems. tedd _ tedd.sperl...@gmail.com http://sperling.com On Jun 20, 2013, at 2:22 PM, Daniel Brown wrote: > On Thu, Jun 20, 2013 at 2:14 PM, Tedd Sperling > wro

Re: [PHP] A Strange Problem

2013-06-20 Thread Daniel Brown
On Thu, Jun 20, 2013 at 2:14 PM, Tedd Sperling wrote: > Bastien: > > You were right on - by changing the directory to what I needed, everything > works. > > My follow-up question is "Why?" > > I have *never* had to specifically tell any script to chdir() -- why with > that one? Sounds like

Re: [PHP] A Strange Problem

2013-06-20 Thread Bastien
Bastien Koert On 2013-06-20, at 2:14 PM, Tedd Sperling wrote: > Bastien: > > You were right on - by changing the directory to what I needed, everything > works. > > My follow-up question is "Why?" > > I have *never* had to specifically tell any script to chdir() -- why with > that one? >

Re: [PHP] A Strange Problem

2013-06-20 Thread Bastien
Bastien Koert On 2013-06-20, at 1:57 PM, Tedd Sperling wrote: > On Jun 20, 2013, at 1:44 PM, Bastien wrote: >> >> It sounds like a current working directory issue. Try running a getcwd() in >> both places to see how they are set >> >> Bastien > > I think you have something, here's the rep

Re: [PHP] A Strange Problem

2013-06-20 Thread Tedd Sperling
Bastien: You were right on - by changing the directory to what I needed, everything works. My follow-up question is "Why?" I have *never* had to specifically tell any script to chdir() -- why with that one? Cheers and Thanks! tedd _ tedd.sperl...@gmail.com http://sperli

Re: [PHP] A Strange Problem

2013-06-20 Thread Tedd Sperling
On Jun 20, 2013, at 1:44 PM, Bastien wrote: > > It sounds like a current working directory issue. Try running a getcwd() in > both places to see how they are set > > Bastien I think you have something, here's the reports: Works: /home/content/64//html/sdi/tedd/php-mail Does NOT work:

Re: [PHP] A Strange Problem

2013-06-20 Thread Tedd Sperling
Matijin: My mistake in posting -- I have tried it several different ways including absolute. Nothing works. Cheers, tedd --- On Jun 20, 2013, at 1:43 PM, Matijn Woudt wrote: > > > > On Thu, Jun 20, 2013 at 7:39 PM, Tedd Sperling wrote: > Hi gang: > > I have a very strange problem. > >

Re: [PHP] A Strange Problem

2013-06-20 Thread Bastien
On 2013-06-20, at 1:39 PM, Tedd Sperling wrote: > Hi gang: > > I have a very strange problem. > > I can use this statement in one folder: > >$fcontents = file('docs/admin-email.txt'); > > But in a different folder with an exact path having 'docs/admin-email.txt', I > get: > > Warning:

Re: [PHP] A Strange Problem

2013-06-20 Thread Matijn Woudt
On Thu, Jun 20, 2013 at 7:39 PM, Tedd Sperling wrote: > Hi gang: > > I have a very strange problem. > > I can use this statement in one folder: > > $fcontents = file('docs/admin-email.txt'); > > But in a different folder with an exact path having > 'docs/admin-email.txt', I get: > > Warni

[PHP] A Strange Problem

2013-06-20 Thread Tedd Sperling
Hi gang: I have a very strange problem. I can use this statement in one folder: $fcontents = file('docs/admin-email.txt'); But in a different folder with an exact path having 'docs/admin-email.txt', I get: Warning: file(/docs/admin-email.txt) [function.file]: failed to open stream: No

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-21 Thread Dan Joseph
Hey guys, thanks again for the talk and education. I've purchased the book, and started reading thru the links given. Take care! -Dan On Sun, May 19, 2013 at 12:28 PM, Tedd Sperling wrote: > To all: > > Thanks to Stuart, I finally got it. > > The concept of Interface is a bit difficult to ex

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-19 Thread Tedd Sperling
To all: Thanks to Stuart, I finally got it. The concept of Interface is a bit difficult to explain, but his excellent console made the concept clear. Many thanks to all for their efforts to educate me. Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-19 Thread Tedd Sperling
On May 19, 2013, at 5:19 AM, mrfroasty wrote: > On 05/16/2013 11:28 PM, Tedd Sperling wrote: >> So, if you find a good reference, please let me know. > > In my point of view, Interfaces and Abstracts are completely different stuffs > not related at all.Interface is a kind of a way of defining h

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread David Harkness
On Fri, May 17, 2013 at 7:04 AM, Tedd Sperling wrote: > To me there is no difference between an abstract class (without method > declarations) and an interface. > The key difference in OO languages that do not allow multiple inheritance is that you can always add an interface to an existing class

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Přemysl Fiala
Interfaces...I will add my 2 cents to what was already said.You don't need them, but they improve quality of your code. Your application is easily maintained, improved, understandable, accessible,   more cleaner, modules can be added easily...They implements some behavior (example):interface toastA

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Stuart Dallas
On 17 May 2013, at 15:04, Tedd Sperling wrote: > Stuart: > > You said: > >> An interface does what it says on the tin: it describes an interface that a >> class can then tell the world it implements. >> >> An abstract class provides functionality as well as an interface >> description. An ab

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Matijn Woudt
On Fri, May 17, 2013 at 4:04 PM, Tedd Sperling wrote: > Stuart: > > You said: > > > An interface does what it says on the tin: it describes an interface > that a class can then tell the world it implements. > > > > An abstract class provides functionality as well as an interface > description. An

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Tedd Sperling
Stuart: You said: > An interface does what it says on the tin: it describes an interface that a > class can then tell the world it implements. > > An abstract class provides functionality as well as an interface description. > An abstract class cannot be instantiated, it can only be extended.

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Sebastian Krebs
2013/5/17 Tedd Sperling > Nick: > > I thank you for your addition, but what you provided did nothing to > explain the difference between abstract and interface. > > In your example: > > An abstract Shape with Circle and Square inheriting. > > OR > > An interface Shape with Circle and Squa

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Stuart Dallas
On 17 May 2013, at 14:04, Tedd Sperling wrote: > I thank you for your addition, but what you provided did nothing to explain > the difference between abstract and interface. > > In your example: > >An abstract Shape with Circle and Square inheriting. > > OR > >An interface Shape with

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Tedd Sperling
Nick: I thank you for your addition, but what you provided did nothing to explain the difference between abstract and interface. In your example: An abstract Shape with Circle and Square inheriting. OR An interface Shape with Circle and Square implementing. Does exactly the same thin

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread tamouse mailing lists
Back to the OP's request, Ken Pugh's "Interface Oriented Design" goes quite a long way in describing OO* and directly to the heart of why interfaces make so much sense as a way of designing your code. It does not show PHP examples, it tries to remain agnostic to language.

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Dan Joseph
Hey Guys, Thanks for all this good information so far. I'll keep you posted on my edumacation! -Dan On Thu, May 16, 2013 at 11:16 PM, Larry Garfield wrote: > On 05/16/2013 06:45 PM, Tedd Sperling wrote: > >> Thanks to both Bastien and Sebastian: >> >> While I understand that an interface is l

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Larry Garfield
On 05/16/2013 06:45 PM, Tedd Sperling wrote: Thanks to both Bastien and Sebastian: While I understand that an interface is like an abstract Class, in that you don't have to flesh-out your methods, but rather where you define exactly how Classes who implement that interface will be required to

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Nick Khamis
interface Shape { public double getArea(); } class Circle implements Shape { double radius; public Circle(int double radius) { this.radius = radius; } public double getArea() { return (radius * radius * 3.1415); } } class Square implements Shape { double side; public

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Tedd Sperling
Thanks to both Bastien and Sebastian: While I understand that an interface is like an abstract Class, in that you don't have to flesh-out your methods, but rather where you define exactly how Classes who implement that interface will be required to flesh-out those methods. But so what? What's t

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Bastien
Bastien Koert On 2013-05-16, at 5:28 PM, Tedd Sperling wrote: > -Dan: > > I teach this stuff and still don't fully understand the why/when for > interfaces. > > Even the guru's I talk with can't give me a good explanation as to what the > advantages are in using them. I've done a lot of ex

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Sebastian Krebs
2013/5/16 Tedd Sperling > -Dan: > > I teach this stuff and still don't fully understand the why/when for > interfaces. > > Even the guru's I talk with can't give me a good explanation as to what > the advantages are in using them. I've done a lot of experimenting and > can't see any advantage for

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Nick Khamis
OO comes from the heart. You know you have it when everything you look at turn into objects, attributes, accessors, mutators, and constructors. When IBM transitioned from functional to OO level programming, they had their top level engineers walk into a room and tell their employees that 80% of th

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Tedd Sperling
-Dan: I teach this stuff and still don't fully understand the why/when for interfaces. Even the guru's I talk with can't give me a good explanation as to what the advantages are in using them. I've done a lot of experimenting and can't see any advantage for them other than grouping different cl

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Dan Joseph
Thanks! This looks like a good start. Covers some things I have questions on. I like his approach. Now I just need something advanced to continue on after this. I'd like to learn more about extending, interfaces, abstracts, and why/when they should be used. Appreciate it! -Dan On Thu, May

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Francisco C Soares
On 05/16/2013 11:55 AM, Dan Joseph wrote: Hey Folks, I'm looking to refine my PHP 5 OOP skills. I know the basics, understand patterns, but have clearly missed a few things along the way. Do any of you have some real good PHP 5 OOP tutorials/reads bookmarked you could share? Something other t

[PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Dan Joseph
Hey Folks, I'm looking to refine my PHP 5 OOP skills. I know the basics, understand patterns, but have clearly missed a few things along the way. Do any of you have some real good PHP 5 OOP tutorials/reads bookmarked you could share? Something other than php.net/oop5. Thanks! -- -Dan Joseph

Re: [PHP] A little confused

2013-04-23 Thread Marco Behnke
Am 23.04.13 12:07, schrieb Chris Knipe: > Hi All, > > $_SESSION['ExpiryDate'] = "2013-04-23"; > echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); > > Required Result: Mon, the 23rd of Apr 2013 > > I get however: PHP Warning: date_format() expects parameter 1 to be > DateTime, in

Re: [PHP] A little confused

2013-04-23 Thread Chris Knipe
Thanks for the replies guys - figured it out! Using date() directly with strtotime() and the appropriate formating works :) date("D, \\t\h\e jS \o\\f M Y", strtotime($_SESSION['ExpiryTime'])) On Tue, Apr 23, 2013 at 12:16 PM, shiplu wrote: > > On Tue, Apr 23, 2013 at 4:07 PM, Chris Knipe w

Re: [PHP] A little confused

2013-04-23 Thread shiplu
On Tue, Apr 23, 2013 at 4:07 PM, Chris Knipe wrote: > echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); > Why not construct DateTime object echo date_format(new DateTime($_SESSION['ExpiryDate']), "D, \t\h\e jS \o\f M Y"); Or $dt = new DateTime($_SESSION['ExpiryDate']); echo

Re: [PHP] A little confused

2013-04-23 Thread Stuart Dallas
On 23 Apr 2013, at 11:13, Chris Knipe wrote: > Yes, > > strtotime() does convert the $_SESSION value to a unix epoc, as expected. > However, date_format still complains that the argument is a Integer value, > instead of a DateTime. Sorry, I didn't read your email properly and didn't realise

Re: [PHP] A little confused

2013-04-23 Thread Chris Knipe
Yes, strtotime() does convert the $_SESSION value to a unix epoc, as expected. However, date_format still complains that the argument is a Integer value, instead of a DateTime. On Tue, Apr 23, 2013 at 12:09 PM, Stuart Dallas wrote: > On 23 Apr 2013, at 11:07, "Chris Knipe" wrote: > > > $_SE

Re: [PHP] A little confused

2013-04-23 Thread Stuart Dallas
On 23 Apr 2013, at 11:07, "Chris Knipe" wrote: > $_SESSION['ExpiryDate'] = "2013-04-23"; > echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); > > Required Result: Mon, the 23rd of Apr 2013 > > I get however: PHP Warning: date_format() expects parameter 1 to be > DateTime, int

[PHP] A little confused

2013-04-23 Thread Chris Knipe
Hi All, $_SESSION['ExpiryDate'] = "2013-04-23"; echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); Required Result: Mon, the 23rd of Apr 2013 I get however: PHP Warning: date_format() expects parameter 1 to be DateTime, integer given in I've had a look at the date/time functi

RE: [PHP] A relative date puzzle

2013-04-01 Thread Steven Staples
> Thanks for this - I'll experiment and see if I have it. Basically I never > read the strtotime doc close enough to get past the word "now" in the > syntax. Obviously it is EXACTLY what I needed. $var = strtotime('now'); Is the same as $var = time(); Unless of course, I didn't understand wha

Re: [PHP] A relative date puzzle

2013-04-01 Thread Jim Giner
On 4/1/2013 2:32 PM, Mattias Thorslund wrote: On 4/1/13 11:15 AM, Mattias Thorslund wrote: On 4/1/13 11:05 AM, Jim Giner wrote: I'm looking for some ideas on how to handle the following get a datetime value that is relative to a specific future date when presented with a partial day &time value

Re: [PHP] A relative date puzzle

2013-04-01 Thread Mattias Thorslund
On 4/1/13 11:15 AM, Mattias Thorslund wrote: On 4/1/13 11:05 AM, Jim Giner wrote: I'm looking for some ideas on how to handle the following get a datetime value that is relative to a specific future date when presented with a partial day &time value. Specifically, I have an appl that requires

Re: [PHP] A relative date puzzle

2013-04-01 Thread Mattias Thorslund
On 4/1/13 11:05 AM, Jim Giner wrote: I'm looking for some ideas on how to handle the following get a datetime value that is relative to a specific future date when presented with a partial day &time value. Specifically, I have an appl that requires some lengthy input involving days and times.

[PHP] A relative date puzzle

2013-04-01 Thread Jim Giner
I'm looking for some ideas on how to handle the following get a datetime value that is relative to a specific future date when presented with a partial day &time value. Specifically, I have an appl that requires some lengthy input involving days and times. I have streamlined the d/e effort so

[PHP] A Recent Emacs Mode for PHP

2012-12-22 Thread Eric James Michael Ritz
Hello everyone, I do not know how many PHP developers use GNU Emacs for writing code. But I assume it must be a decent amount since there are multiple PHP modes for Emacs floating around the Internet. For months I have worked to improve one of those modes, what seemed to be the most popular: htt

Re: [PHP] A string question

2012-09-28 Thread Simon J Welsh
On 29/09/2012, at 1:29 AM, Chris Payne wrote: > Hi there everyone, > > I basically have the following code, which grabs the 3 numbers to the right: > > $input = "250705023"; > > $resta = substr($input, -3, 3); > > Then I manipulate them a little, but my question is - how, once i've used > the

Re: [PHP] a little trickery

2012-09-09 Thread David McGlone
On Sunday, September 09, 2012 03:02:17 PM Stuart Dallas wrote: > On 9 Sep 2012, at 04:19, David McGlone wrote: > > On Saturday, September 08, 2012 03:49:27 PM you wrote: > >> On 8 Sep 2012, at 15:35, David McGlone wrote: > >>> I have a function that reads a directory and gets all the file names o

Re: [PHP] a little trickery

2012-09-09 Thread Stuart Dallas
On 9 Sep 2012, at 04:19, David McGlone wrote: > On Saturday, September 08, 2012 03:49:27 PM you wrote: >> On 8 Sep 2012, at 15:35, David McGlone wrote: >>> I have a function that reads a directory and gets all the file names of >>> images, and I am wondering if it's possible to concatinate this

Re: [PHP] a little trickery

2012-09-08 Thread David McGlone
On Saturday, September 08, 2012 11:19:29 PM David McGlone wrote: > On Saturday, September 08, 2012 03:49:27 PM you wrote: > > > > > function completeImageFilename($prefix) > > { > > > > $matches = glob('images/property_pics/'.$prefix.'*'); > > return $matches[0]; > > > > } > >

Re: [PHP] a little trickery

2012-09-08 Thread David McGlone
On Saturday, September 08, 2012 03:49:27 PM you wrote: > On 8 Sep 2012, at 15:35, David McGlone wrote: > > I have a function that reads a directory and gets all the file names of > > images, and I am wondering if it's possible to concatinate this function > > withint an image tag. Here's an exampl

Re: [PHP] a little trickery

2012-09-08 Thread Daniel Brown
On Sat, Sep 8, 2012 at 10:49 AM, Stuart Dallas wrote: > > Is there just one image in the folder that starts with the 9 digit number? In > that case it's dead simple (untested code): > >function completeImageFilename($prefix) > { > $matches = glob('images/property_pics/'.$prefix.'*'); >

Re: [PHP] a little trickery

2012-09-08 Thread Stuart Dallas
On 8 Sep 2012, at 15:35, David McGlone wrote: > I have a function that reads a directory and gets all the file names of > images, > and I am wondering if it's possible to concatinate this function withint an > image tag. Here's an example I tried. > > function pictures() { > >$dir = 'ima

[PHP] a little trickery

2012-09-08 Thread David McGlone
I have a function that reads a directory and gets all the file names of images, and I am wondering if it's possible to concatinate this function withint an image tag. Here's an example I tried. function pictures() { $dir = 'images/property_pics/'; $file = array(); if(is_dir($dir))

Re: [PHP] A quick ereg translation

2012-08-25 Thread Lester Caine
SagaciousDev PHP-Dev wrote: This should do the trick: preg_match('#(.*)#is', $content, $matches); TA - That has got it ;) That is tidier than what I had ended up with ... #([^\']*?)<\/body># from a 'tutorial' -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wi

RE: [PHP] A quick ereg translation

2012-08-25 Thread SagaciousDev PHP-Dev
: Sat, 25 Aug 2012 23:10:08 +0200 > From: krebs@gmail.com > To: php-general@lists.php.net > Subject: Re: [PHP] A quick ereg translation > > Am 25.08.2012 23:06, schrieb Lester Caine: > > ereg('(.*)', $phpinfo, $regs); > > > > Pulls the body of

Re: [PHP] A quick ereg translation

2012-08-25 Thread Sebastian Krebs
Am 25.08.2012 23:06, schrieb Lester Caine: ereg('(.*)', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm struggling to get a pcre alternative. Anybody already cracked this one? usually it's just fine to wrap the pattern into delimite

[PHP] A quick ereg translation

2012-08-25 Thread Lester Caine
ereg('(.*)', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm struggling to get a pcre alternative. Anybody already cracked this one? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=conta

Re: [PHP] A problem about sessions

2012-06-08 Thread Tazio Ceri
Stuart Dallas ha scritto: >On 8 Jun 2012, at 00:39, Tazio Ceri wrote: > >> I have a PHP script that takes very long time to execute. I manage it >using the following structure: >> >> ob_start(); >> >> // some code >> session_start(); >> // some code >> >> header("Content-length: ".ob_get_lengt

Re: [PHP] A problem about sessions

2012-06-07 Thread As'ad Djamalilleil
i can't undersans much of your question,, but i think you supposed to write the statement to set the variable's value after the "session_start()" called, like this ... session_start(); . some codes $_SESSION['some_var']; <--- don't put it before the session_start() On Thu, Jun 7, 2012 at 5

Re: [PHP] A problem about sessions

2012-06-07 Thread Stuart Dallas
On 8 Jun 2012, at 00:39, Tazio Ceri wrote: > I have a PHP script that takes very long time to execute. I manage it using > the following structure: > > ob_start(); > > // some code > session_start(); > // some code > > header("Content-length: ".ob_get_length()); > ob_end_flush(); > > // some

[PHP] A problem about sessions

2012-06-07 Thread Tazio Ceri
Hi all, I have a PHP script that takes very long time to execute. I manage it using the following structure: ob_start(); // some code session_start(); // some code header("Content-length: ".ob_get_length()); ob_end_flush(); // some other, very long, code! The problem I am facing is that, aft

Re: [PHP] A Question of SESSION

2012-06-07 Thread Matijn Woudt
On Thu, Jun 7, 2012 at 5:15 PM, Tedd Sperling wrote: > Hi Daniel and gang: > > Considering I'm never afraid to show my ignorance, please review the > following example. > > Because of the way I normally use sessions and considering this way works for > me, I thought I knew what sessions were abo

[PHP] A Question of SESSION

2012-06-07 Thread Tedd Sperling
Hi Daniel and gang: Considering I'm never afraid to show my ignorance, please review the following example. Because of the way I normally use sessions and considering this way works for me, I thought I knew what sessions were about -- but my faith is eroding. Cases in point 1. The following i

Re: [PHP] Re: PHP: a fractal of bad design

2012-04-17 Thread Jay Blanchard
[snip] a simple +1 will do [/snip] Ahthe good old days. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP: a fractal of bad design

2012-04-17 Thread Jim Lucas
On 04/17/2012 05:43 AM, Bogdan Ribic wrote: Where's the "Like" button on this list? :) On 4/13/2012 01:44, Ross McKay wrote: On Wed, 11 Apr 2012 17:06:10 -0700, Daevid Vincent wrote: "There are only two kinds of languages: the ones people complain about and the ones nobody uses." -- Bjarne

[PHP] Re: PHP: a fractal of bad design

2012-04-17 Thread Bogdan Ribic
Where's the "Like" button on this list? :) On 4/13/2012 01:44, Ross McKay wrote: On Wed, 11 Apr 2012 17:06:10 -0700, Daevid Vincent wrote: "There are only two kinds of languages: the ones people complain about and the ones nobody uses." -- Bjarne Stroustrup -- PHP General Mailing List (ht

[PHP] Re: PHP: a fractal of bad design

2012-04-12 Thread Ross McKay
On Wed, 11 Apr 2012 17:06:10 -0700, Daevid Vincent wrote: >http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ > >Can't say he doesn't have some good points, but he sure goes about it in a >dickish way. "There are only two kinds of languages: the ones pe

Re: [PHP] PHP: a fractal of bad design

2012-04-12 Thread ma...@behnke.biz
Daevid Vincent hat am 12. April 2012 um 02:06 geschrieben: > http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ > > Can't say he doesn't have some good points, but he sure goes about it in a > dickish way. Well, he only says what everybody knows. So there

Re: [PHP] PHP: a fractal of bad design

2012-04-12 Thread Simon Schick
2012/4/12 Daevid Vincent : > http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ > > Can't say he doesn't have some good points, but he sure goes about it in a > dickish way. Hi, Daevid I think this discussion is incomplete without mentioning the feedback from

Re: [PHP] PHP: a fractal of bad design

2012-04-11 Thread Paul M Foster
On Wed, Apr 11, 2012 at 05:06:10PM -0700, Daevid Vincent wrote: > http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ > > Can't say he doesn't have some good points, but he sure goes about it in a > dickish way. Wow. I wish I could find something that c

Re: [PHP] PHP: a fractal of bad design

2012-04-11 Thread Jay Blanchard
On 4/11/2012 7:06 PM, Daevid Vincent wrote: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ Can't say he doesn't have some good points, but he sure goes about it in a dickish way. Yes, he does have some good points and most, if not all, of those points have been di

[PHP] PHP: a fractal of bad design

2012-04-11 Thread Daevid Vincent
http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ Can't say he doesn't have some good points, but he sure goes about it in a dickish way.

Re: [PHP] A php bug or?..

2011-08-08 Thread Daniel P. Brown
On Mon, Aug 8, 2011 at 16:41, Andre Polykanine wrote: > >      For sure. But I'm asking: why it doesn't return 0 if it is not an array? > Logically: no array - no items! No, actually, if it's a string, it's a single item --- thus, 1. The documentation should probably reflect that as well. I

Re: [PHP] A php bug or?..

2011-08-08 Thread Stuart Dallas
On 8 Aug 2011, at 21:41, Andre Polykanine wrote: > DPB> does it return the number of characters within a string --- instead, > DPB> as you likely know, you'd use strlen(). > > For sure. But I'm asking: why it doesn't return 0 if it is not an array? > Logically: no array - no items! The ma

Re: [PHP] A php bug or?..

2011-08-08 Thread Andre Polykanine
Hello Daniel, DPB> does it return the number of characters within a string --- instead, DPB> as you likely know, you'd use strlen(). For sure. But I'm asking: why it doesn't return 0 if it is not an array? Logically: no array - no items! -- With best regards from Ukraine, Andre Sk

Re: [PHP] A php bug or?..

2011-08-08 Thread Daniel P. Brown
On Mon, Aug 8, 2011 at 16:20, Andre Polykanine wrote: > Hi everyone, > >                            As we all know, count() returns 1 if the variable > is not an array. > Question is: why in the world does it this? If a variable is *notA* an array, > it contains *zero* array elements. > You can

Re: [PHP] A php bug or?..

2011-08-08 Thread Simon J Welsh
On 9/08/2011, at 8:20 AM, Andre Polykanine wrote: > Hi everyone, > >As we all know, count() returns 1 if the variable > is not an array. > Question is: why in the world does it this? If a variable is *notA* an array, > it contains *zero* array elements. > You can ans

[PHP] A php bug or?..

2011-08-08 Thread Andre Polykanine
Hi everyone, As we all know, count() returns 1 if the variable is not an array. Question is: why in the world does it this? If a variable is *notA* an array, it contains *zero* array elements. You can answer: "but no, man, you can say $x="world"; $y=$x{3}; // $y="l"

Re: [PHP] A Question On Web Graphics

2011-07-12 Thread Mike Mackintosh
On Jul 12, 2011, at 3:10 PM, Thomas Dineen wrote: > Gentle People: > >Sorry if this appears off topic but I am not sure where to post the > question. Please do not get mad, just recommend a better venue! > >Currently I am quite experienced with C and learning C++ but I have > never writ

Re: [PHP] A Question On Web Graphics

2011-07-12 Thread Chris Stinemetz
> >   Also I have successfully experimented with Apache and PHP but have not yet > identified graphics applications for this venue either! Ideas? > You may want to look into PHP:GD link to manual: http://php.net/manual/en/book.image.php HTH, Chris -- PHP General Mailing List (http://www.php.n

[PHP] A Question On Web Graphics

2011-07-12 Thread Thomas Dineen
Gentle People: Sorry if this appears off topic but I am not sure where to post the question. Please do not get mad, just recommend a better venue! Currently I am quite experienced with C and learning C++ but I have never written graphical type applications in either! Can you recomme

RE: [PHP] A Review Request

2011-05-23 Thread Ford, Mike
> -Original Message- > From: tedd [mailto:tedd.sperl...@gmail.com] > Sent: 22 May 2011 22:33 > > At 5:50 PM +0200 5/22/11, Nisse =?utf-8?Q?Engstr=C3=B6m?= wrote: > >On Sat, 21 May 2011 09:26:02 -0400, tedd wrote: > > > >> The function strcmp() simply evaluates two strings and reports > ba

Re: [PHP] A Review Request

2011-05-22 Thread tedd
At 5:50 PM +0200 5/22/11, Nisse =?utf-8?Q?Engstr=C3=B6m?= wrote: On Sat, 21 May 2011 09:26:02 -0400, tedd wrote: The function strcmp() simply evaluates two strings and reports back -1, 0, or 1 depending upon their alphabetical relationship. It might do that, but don't bet your horse on it.

Re: [PHP] A Review Request

2011-05-22 Thread Nisse Engström
On Sat, 21 May 2011 09:26:02 -0400, tedd wrote: > The function strcmp() simply evaluates two strings and reports back > -1, 0, or 1 depending upon their alphabetical relationship. It might do that, but don't bet your horse on it. /Nisse --

Re: [PHP] A Review Request

2011-05-21 Thread Robert Cummings
On 11-05-21 09:26 AM, tedd wrote: At 2:49 PM -0400 5/19/11, Joshua Kehn wrote: On May 19, 2011, at 2:44 PM, Andre Polykanine wrote: Hello Alex, Two (stupid?) questions: 1. Why PHP_SELF is better than SCRIPT_NAME? 2. Why strcmp() is better than just comparing? -- With best regards

Re: [PHP] A Review Request

2011-05-21 Thread Alex
- From: "tedd" To: "Joshua Kehn" , "PHP General" Subject: [PHP] A Review Request Date: Sat, May 21, 2011 9:26 am At 2:49 PM -0400 5/19/11, Joshua Kehn wrote: >On May 19, 2011, at 2:44 PM, Andre Polykanine wrote: > >> Hello Alex, >> >>

Re: [PHP] a Debate here - How can you check a if a file is a UTF-8 without the BOM using PHP ?

2011-05-21 Thread Adam Richardson
On Sat, May 21, 2011 at 12:10 PM, Eli Orr (Office) wrote: > > Dear PHP Gurus, > > I have a debate on the following please let me know what is true / false. > > I'am using a PHP function *is_UTF_8_file ($file_name) *that I've found as > part of my PHP 5.3 installation. > This function checks if the

[PHP] a Debate here - How can you check a if a file is a UTF-8 without the BOM using PHP ?

2011-05-21 Thread Eli Orr (Office)
Dear PHP Gurus, I have a debate on the following please let me know what is true / false. I'am using a PHP function *is_UTF_8_file ($file_name) *that I've found as part of my PHP 5.3 installation. This function checks if the file start with the 3 UTF-8 BOM bytes. However another guy told me

Re: [PHP] A Review Request

2011-05-21 Thread tedd
At 2:49 PM -0400 5/19/11, Joshua Kehn wrote: On May 19, 2011, at 2:44 PM, Andre Polykanine wrote: Hello Alex, Two (stupid?) questions: 1. Why PHP_SELF is better than SCRIPT_NAME? 2. Why strcmp() is better than just comparing? -- With best regards from Ukraine, Andre Skype: Francophile

Re: [PHP] A Review Request

2011-05-20 Thread tedd
At 3:28 PM -0400 5/20/11, Alex Nikitin wrote: Just a comment on the building a house, a house is a page, but as programmers (at least decent ones) we are no longer building single pages, we build a house template and fill it with various elements to define what the house is and what it does, so

Re: [PHP] A Review Request

2011-05-20 Thread Richard Quadling
On 20 May 2011 19:32, tedd wrote: > I've never meet a person who I couldn't learn from. Yep. You can always serve as a bad example. Richard. (Is it still Friday)? -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP Gener

Re: [PHP] A Review Request

2011-05-20 Thread Alex Nikitin
@David Fair enough, then i have seen so many badly designed sewage systems, that the backed up sewage monsters come to me in my dreams... :) wait no the other one :( @Paul And my girlfriend, apparently -- The trouble with programmers is that you can never tell what a programmer is doing until it’

Re: [PHP] A Review Request

2011-05-20 Thread Paul M Foster
On Fri, May 20, 2011 at 02:32:42PM -0400, tedd wrote: [snip] > > >And I agree with the majority that your bracing style is horrid. But I > >long ago despaired of turning you from the Dark Side(tm). ;-} > > I understand, but like my wife often says "Bite me" :-) OMG! She must be related to *m

Re: [PHP] A Review Request

2011-05-20 Thread David Harkness
On Fri, May 20, 2011 at 12:28 PM, Alex Nikitin wrote: > Also you left out a database, your basement/foundation . . . I liken the database to the sewer: it's where all the crap goes. :D Happy Friday! David

Re: [PHP] A Review Request

2011-05-20 Thread Alex Nikitin
Just a comment on the building a house, a house is a page, but as programmers (at least decent ones) we are no longer building single pages, we build a house template and fill it with various elements to define what the house is and what it does, so in essense you actually are not building just one

  1   2   3   4   5   6   7   8   9   10   >