FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » What *tasks* are hard for PHP?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: What *tasks* are hard for PHP? [message #172068 is a reply to message #172064] Sat, 29 January 2011 07:58 Go to previous messageGo to previous message
P E Schoen is currently offline  P E Schoen
Messages: 86
Registered: January 2011
Karma:
Member
"Curtis Dyer" wrote in message
news:ii09q8$gi6$1(at)news(dot)eternal-september(dot)org...

> Not necessarily that complicated, you can slurp the file
> into a string.

# see: perlvar
{
open my $fh, '<', 'foo.dat' or die $!;
local $/ = undef;
my $data = <$fh>;
close $fh;
}

> Unless you feel motivated to take on the academic task of
> better learning PHP, or any other language for that matter,
> I'd recommend using the language with which you're most
> comfortable.

Well, to be honest, I don't feel comfortable with either Perl or PHP. There
just seem to be too many arcane and obscure ways to do things, such as the
undef of the line by line file read above. It took me a while to find the
explanation, and to me it seemed like a hack. I have only recently (since
September) even tried to do server side scripting, and I basically found an
old Perl mailer script that did some of what I needed, and built from there.
I have several books on Perl and PHP, and HTML and MySQL and SQLite and
JScript for that matter. Most of them are at least 5-10 years old and
(especially for HTML) they are largely obsolete.

I suppose I've been spoiled by integrated development environments like
Borland Delphi, where I have the convenience of an extensive help menu with
examples and debugger built into the same application as the editor, and
I've been able to build upon a rudimentary general knowledge of the
programming language to add functionality as I need it. I feel most
comfortable when I can understand exactly what is going on, even down to
assembly language and machine code. In fact, I use a lot of assembly
language for simple PIC projects, and a C compiler for more complex projects
such as USB devices.

I started with BASIC and Fortran around 1967, and 15 years later I was using
CP/M, Z80 code, and various forms of BASIC. In 1987 I took a course in
structured programming which featured Pascal, and I used Borland Turbo
Pascal for about a year until I switched to Turbo C, which I used heavily
for MSDOS applications, and I used dBase and Clipper for database stuff. I
didn't like C++ so I discovered Borland Delphi for Windows GUI, and after I
became used to OOP it became my language of choice. However I still use PIC
code and its C compiler, and Z80 code and a C variant for some
microcontroller products. I've also used some VBScript and JavaScript for
some things using the WSH and also in web pages, and VBA for MS Access and
other Windows applications that use it.

So, I'm very new to server-side programming, and I've just found it
difficult to learn. I suppose I'm just somewhat resisting the concept of
context based typing and the myriad of alternate ways to do the same thing,
especially using very cryptic symbols instead of the much more verbose but
more intuitive and human-readable verbosity of Delphi Pascal. I actually
prefer C to some extent, but I've come to accept Delphi as my language of
choice, especially for Windows GUI.

I know I'm rambling on, and probably I should either try recoding my fairly
simple 575 line Perl script into its PHP equivalent, just to be able to
evaluate the relative merits of each for my purposes. I've had more
experience with Perl, if you can use that term to describe my sporadic
attempts to add functionality and fix problems in a server side script with
some parts I still don't really understand.

OK, by now I could have recoded half of that script in PHP. So, thanks for
the response, and maybe I'll check back in a couple of weeks when I have
gone far enough in my attempt to make a decision as to how to proceed.

Paul
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sanitising input
Next Topic: php include question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 16:36:31 GMT 2024

Total time taken to generate the page: 0.05163 seconds