Assuming you mean that the PHP script is on a web server somewhere and
the desktop app is hitting it over HTTP, it's no different than any
other response. Anything you print will be sent back to the client, in
this case your desktop a.. So if you want to send XML back, you'd build
a string wi
That's called method chaining. ->getColumns() will get called on the
object returned by ->getTable(). That is, getTable() returns an object
(presumably representing an SQL table, I guess), and that object has a
getColumns() method, which you call.
This is an extremely common style in Javascr
On 2/22/11 12:04 PM, Alexis wrote:
On 22/02/11 09:40, Dotan Cohen wrote:
On Tue, Feb 22, 2011 at 16:15, Robert Cummings
wrote:
If you switch to vertically aligned braces you will have an easier time
matching up open and close braces...
if (something)
{
// Code here
}
It's trivial to match us
On 1/19/11 3:44 PM, David Harkness wrote:
What about creating your own docblock tag such as @plugin-interface? While
it still requires each plugin to explicitly define the interface(s) it
implements, it won't be in the class declaration. This would be very easy to
nab for a tree of files using gr
On 1/19/11 10:52 AM, Richard Quadling wrote:
There is a pecl extension called inclued [1]&[2] which could be used I
think.
It can be used to produce a list of all the relationships between
included files, so a one off pass of all the class files (simply
include them) and then retrieve the a
On 1/19/11 11:16 AM, Adam Richardson wrote:
As long as the static analysis tool builds a composite of class
hierarchy
established in all the files (project wide, at least in terms of the
plugin), you wouldn't have to double declare interfaces so they could be
detected.
Adam
That is essentia
On 1/19/11 10:09 AM, Adam Richardson wrote:
On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadlingwrote:
On 19 January 2011 07:46, Adam Richardson wrote:
On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield
3) Static analysis. Instead of reflection, either tokenize or string
parse
all files to deter
Assuming that by "bare strings" you mean:
$foo[bar] = 'baz';
as opposed to:
$foo['bar'] = 'baz';
That is generally considered very bad form in PHP. That throws an
E_NOTICE error level, and therefore slows down your code (if only by a
small amount) for the error handling. Of course, if you
On 1/7/11 11:08 AM, Nicholas Kell wrote:
On Jan 7, 2011, at 11:01 AM, Joshua Kehn wrote:
On Jan 7, 2011, at 11:55 AM, la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a non-trivial
command line PHP application. Most of it will be nice and
Hi folks. I have a project coming up that will involve writing a
non-trivial command line PHP application. Most of it will be nice and
abstracted and standalone and all of that jazz, but it will need to do
command line interation. I'm not sure yet if it will be interactive or
if I just need
On 12/17/10 11:57 AM, Steve Staples wrote:
I had to show the people in my office, and we all got a chuckle from teh
XKCD comic in the PHP documentation for GOTO
http://ca2.php.net/goto
Steve
I was one of the people that argued in favour of GOTO on the Internals
list a few years ago. GOTO has
I'm the DB maintainer for Drupal 7, and we rebuilt our entire DB layer
on top of PDO. It's a rather nice API, although as others have noted it
does not abstract away SQL entirely; it abstracts the API calls you need
to use to get to SQL.
We then built a layer on top of that which does abstrac
On 12/10/10 8:53 AM, Robert Cummings wrote:
Use PHP the way God intended it to be used.
Could you cite a reference for where God states his intentions on PHP?
Thanks,
Rob.
According to Rasmus, it's as a thin integration layer on top of PECL
modules written in C, most of which are just wrap
Hi folks.
I have a project coming up where I will need to process a bazillion (OK,
a few million) records, possibly with multiple steps. (In this case I'm
reading data from one data archive into an Apache Solr server.) This is
a natural use case for a queue server, I believe, and while the
The fastest way is going to be array_values():
http://www.php.net/array_values
--Larry Garfield
On 8/31/10 10:43 AM, Tontonq Tontonq wrote:
a quick question
lets say i have an array like that
Array
(
[300] => 300
[301] => 301
[302] => 302
[303] => 303
[304] => 304
[305] => 305
[306] =>
On 7/29/10 2:32 AM, Nathan Rixham wrote:
What's your previous language/tech trail?
Started with QBasic and realized it was crap. Moved on to Java,
realized object rock but J2EE doesn't. Moved to PHP / Java.
QBasic was crap lol, that was my first language after playing with .bat
files!
Oh b
Performance-wise, SELECT * is slower than specifying fields
(marginally). If you just want a single field then mysql_result() will
be faster, but if you want multiple fields mysql_fetch_* is your best bet.
As far as the PHP goes, if you know there will be only a single record
I'd suggest usin
First spend time working with straight up PHP, writing your own stuff,
throwing it away, and writing it again. What you'll learn that way is
immeasurable.
Then pick a framework (Cake, Drupal, Symfony, Zend, PEAR, whatever) and
learn it, maybe two. Try working with it and extending it.
Then
On 5/27/10 3:15 PM, Adam Richardson wrote:
On Thu, May 27, 2010 at 3:59 PM, Waynn Lue wrote:
I've seen @inheritDoc used in Java before, though I'm not sure about
the php support.
Waynn
You're absolutely right, Waynn,
Phpdocumentor has this, too:
http://manual.phpdoc.org/HTMLSmartyConvert
On 5/27/10 12:10 PM, Adam Richardson wrote:
Larry,
I've thought about this very issue before (java developers sometimes lament
this issue, too), and I error on the side of duplication if I'm using
inheritance.
However, I'd say I rarely use inheritance for anything in my development,
and I'm mu
On 5/27/10 11:30 AM, Peter Lind wrote:
Sure, but @param, @access and possibly @return are but a part. I stand
by my words: document the parent as a stub and provide actual
documentation for the real implementations. Otherwise you're trying to
be *clever* and will see the age-old result: you'll e
On 5/27/10 11:13 AM, Peter Lind wrote:
I'm overriding the method because I want to change the *implementation*.
The *interface* of it, which is documented in the docblock, should not
change and it's a bug (and possibly compile error) if it does change. You
cannot, for instance, change what par
On 5/27/10 10:43 AM, Peter Lind wrote:
You're overriding the function. IDEs should *not* show the parent
documentation, because the parent function does *not* get called. It
only gets called if you do a specific parent::hello($a, $b);
*snip*
So it seems like no matter what I do, someone gets
Hi folks.
OK, so here's the deal. I am trying to figure out the "right" way to
document methods in OO code that includes method overriding in child
classes. Simple, right? Unfortunately, it seems the tools out there
are making this much more complicated than it should be. Example:
class
Hi folks. I am looking for a good iCal processing library (open source
/ GPL compatible). Unfortunately, everything I've been able to find so
far is half-assed, incomplete, buggy, or so horribly designed that I'd
be embarrassed to use it (or several of the above). I was hoping
someone could
http://www.php.net/svn.php
Everything is in SVN, although anything built-in is written in C code,
not in PHP.
--Larry Garfield
On 5/19/10 3:41 PM, Leandro de Oliveira wrote:
Hi,
I'd like to know where is the source code of built-in functions if it's freely
available. I'm interested in math
On 3/24/10 2:33 PM, Rene Veerman wrote:
It's a debate. The dev team consider proposals and weigh in on the merits. I
was a proponent for goto support during the development of PHP 5. We now
have it. If you arguments are valid and there's no technical issue
preventing it, and there's someone with
On 3/24/10 11:06 AM, Richard Quadling wrote:
On 24 March 2010 15:51, Robert Cummings wrote:
Yes you can do that also, you seemed to want constructors though :) As for
misused... variable parameters with mixed types is common enough that I
wouldn't call it misuse. It's succinct and solves a prob
On 3/23/10 6:04 PM, Tommy Pham wrote:
If throwing hardware at it won't work because of the above mentioned,
then you would change the design right? How long would that take?
What if PHP has threads, how long would it take you implement threads
with minor changes versus and overhaul of applicati
On 3/22/10 10:25 AM, Paul M Foster wrote:
That's the key. You can do anything you want inside __autoload(). If you
must consult something in the environment, there are a couple of ways to
do it. First, set a variable in the $_SESSION array, and consult it in
__autoload(). Second, use a configura
Add me to the list of people recommending PDO. It's much nicer to work
with than the ext/mysql API, and frankly more secure since you get
prepared statements. It won't get you complete database independence
for a number of reasons (mostly due to databases being too
unstandardized because they
I'd settle for Intellisense/code completion working consistently and
reliably in Eclipse PDT in the first place. I don't remember the last
time it did.
--Larry Garfield
On 3/12/10 2:43 PM, Daevid Vincent wrote:
Wow. Maybe the coolest IDE innovation I've seen since syntax highlighting
and in
ouple questions Larry is this application composed of classes or
straight up no holes barred procedural code?
la...@garfieldtech.com wrote:
That's not really what I'm after. Let me try an example:
function foo($id) {
static $foos = array();
if (empty($foos[$id]) {
$foos[$id]
That's not really what I'm after. Let me try an example:
function foo($id) {
static $foos = array();
if (empty($foos[$id]) {
$foos[$id] = load_foo($id);
}
return $foos[$id];
}
When load_foo() is slow (e.g., lots of DB traffic or remote-server calls
or whatever), such caching can h
Yep, I'm familiar with XDebug and KCacheGrind. As you say, though, it
doens't (as far as I am aware) offer the particular data that I'm after.
We've already got cachegrind gurus working on the code who know how to
use it better than I do. :-) What I'm looking for is "see this big
cache objec
Ashley Sheridan wrote:
On Tue, 2009-08-11 at 17:57 +0200, Aschwin Wesselius wrote:
Ashley Sheridan wrote:
And I really would use a PHP 5 server given the choice. I've tried
speaking to the hosting company a few times, but they brush me off!
Hi Ashley,
And how is their SLA then? Do you take
The "private" keyword was added in PHP 5. PHP 4 doesn't have visibility
identifiers. In PHP 4 you have to use "var", which is then always public.
Or you could just use PHP 5 instead of a dead language. :-)
Ashley Sheridan wrote:
Hey all,
Is there any reason why this shouldn't work correctly
Hi folks. A while back I inquired about "managed VPS" hosting services.
I have since gotten a recommendation for ServInt.net, which seems to
offer an actual managed VPS or something very close to it. Does anyone
else have experience with them, good or bad? Are they decently
responsible ab
38 matches
Mail list logo