× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The variable value will stay the same. How you call it will determine
how it is interpreted. If you call it in an expression where it is used
as a string you will get a string value, but I'm pretty sure the
internal value stays the same unless you modify it. If you modify it,
then the operator that you are working with will determine the type.
For example, + will ALWAYS be a numerical result and . will ALWAYS be a
string result. I've found that my code is actually easier to read
because of that. I don't have to do any kind of type conversion in my
code. If I know what the type juggling rules are, and I properly filter
my values, then I can almost always make a pretty good assumption as to
what the type is.

Kevin Schroeder
Technology Evangelist
Zend Technologies, Ltd.
www.zend.com
www.twitter.com/kpschrade
www.eschrade.com

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Aaron Bartell
Sent: Tuesday, April 20, 2010 4:16 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Why use PHP? What are the disadvantages?

But here's my question. How often do you actually prefer a variable to
hold
a character in one line of code and then have that same variable hold an
integer in the next? In all my uses of PHP that has only led to hard to
read code and lots of bugs (as it relates to business logic code).

Loose typing is great/better for writing frameworks where you might not
know
(or care) what value is being passed through the bowels, but I feel much
more comfortable with a compiled object when it comes to my business
logic.
Maybe just a personal insecurity :-)

Aaron Bartell
http://mowyourlawn.com
http://mowyourlawn.com/blog/


On Tue, Apr 20, 2010 at 3:43 PM, Kelly Cookson
<KCookson@xxxxxxxxxxxx>wrote:

The main issue I have with PHP is really it's a scripting language.
Not that scripting languages are bad, but I just like my end
programs compiled. (Quick >Google search does show you can compile
PHP, I was unaware of that).

A nice feature of running PHP as an interpreted language is the
flexibility
in variable typing. Variable type in PHP depends on context. You don't
get
that when you compile a program. Compiled programs require that you
define
variable types in advance and they can't change.

I would _love_ to see a PHP-to-ILE compiler on the IBM i. That way, we
could use PHP as a scripting language for web apps and as a compiled
language for batch apps. We could also mix PHP with RPG, COBOL, C, and
CL as
ILE modules. We could do something like Facebook is doing with PHP and
C++
(except we'd be doing it with PHP and ILE).

Kelly Cookson
Senior Programmer/Analyst
Dot Foods, Inc.
217-773-4486 x12676
www.dotfoods.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.