Bluehost.com Web Hosting $6.95

Is PHP the easier web programming language?

This is a discussion on Is PHP the easier web programming language? within the PHP Language forums, part of the PHP Programming Forums category; "d" <d@example.com> wrote in message news:<lKLrd.65021$F7.36820@fe1.news.blueyonder....


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 12-03-2004
Razzbar
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

"d" <d@example.com> wrote in message news:<lKLrd.65021$F7.36820@fe1.news.blueyonder.co. uk>...
> Perl is a completely different language. PHP just borrowed some good ideas
> from it, hence the similarity.
>

How completely is "completely"? Both are still imperative procedural
languages. Same step-by-step thought process in both languages.

Not as different as Lisp is from BASIC, eg.

> Perl still has lots of very good uses out there ;)


Sure.
Reply With Quote
  #12 (permalink)  
Old 12-03-2004
d
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

Completely as in PHP isn't "based" on anything in particular. The phrasing
of the first post insinuated PHP was a direct descendent of perl.

By your logic, a horse is a direct descendent of a dog - 4 legs, head, tail
;)

"Razzbar" <glakk@potatoradio.f2s.com> wrote in message
news:c48470fc.0412030948.2bbc5a6e@posting.google.c om...
> "d" <d@example.com> wrote in message
> news:<lKLrd.65021$F7.36820@fe1.news.blueyonder.co. uk>...
>> Perl is a completely different language. PHP just borrowed some good
>> ideas
>> from it, hence the similarity.
>>

> How completely is "completely"? Both are still imperative procedural
> languages. Same step-by-step thought process in both languages.
>
> Not as different as Lisp is from BASIC, eg.
>
>> Perl still has lots of very good uses out there ;)

>
> Sure.



Reply With Quote
  #13 (permalink)  
Old 12-05-2004
Razzbar
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

"d" <d@example.com> wrote in message news:<f34sd.70945$F7.55735@fe1.news.blueyonder.co. uk>...
> Completely as in PHP isn't "based" on anything in particular. The phrasing
> of the first post insinuated PHP was a direct descendent of perl.
>

.... which it is not. However...

PHP has some "genes" from PERL. You can tell the creators have experience
with PERL.

Of course PHP is not "based" on any language in particular. Not in the way
that Modula is based on Pascal, or C++ is based in C.

But PHP is still belongs to family of languages: Procedural languages like
C, BASIC, Pascal.... in contrast to a declarative language like SQL.


> By your logic, a horse is a direct descendent of a dog - 4 legs, head, tail
> ;)


No, but they share some traits. Did those traits develop independantly
of one another? Is it just a coincidence that both animals are so
similar, or do they possibly have common ancestry? Is it mere
coincidence that PERL and PHP both have features (such as the
notion of a 'here document') that aren't found in other languages?

PHP didn't 'descend from' PERL, but there certainly is some influence.
Reply With Quote
  #14 (permalink)  
Old 12-05-2004
Andy Hassall
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

On 5 Dec 2004 10:27:04 -0800, glakk@potatoradio.f2s.com (Razzbar) wrote:

>"d" <d@example.com> wrote in message news:<f34sd.70945$F7.55735@fe1.news.blueyonder.co. uk>...
>> Completely as in PHP isn't "based" on anything in particular. The phrasing
>> of the first post insinuated PHP was a direct descendent of perl.
>>

>... which it is not. However...
>
>PHP has some "genes" from PERL. You can tell the creators have experience
>with PERL.


PHP/FI, that-which-was-rewritten-to-become PHP, was actually written in Perl.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Reply With Quote
  #15 (permalink)  
Old 12-07-2004
Bruce Lewis
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

"Marta" <marta@mariapia.com> writes:

> Hi all!
>
> I would to study a web programming language to create a PHP script
> (output.php) that, given the following
> input page (input.htm) where the user select the weight and volume of a
> package to be shipped, returns the prices of various couriers ("yellow",
> "blue" and "black").
> Really is PHP my best choice? ASP is much more complicated? and what about
> Perl?


This sounds a lot like a homework problem, but if so, by now the
assignment must have been due already.

Here is a BRL version for you to compare against PHP, ASP and Perl
solutions.

[
(define-input (string->number volume) (string->number weight))
(define yellow-rate
(case weight
((100) 600)
((200) 900)
((300) 1200)))
(define blue-rate
(and (< volume 3)
(case weight
((100) 400)
((200) 700)
(else #f))))
(define black-rate
(and (> volume 1)
(case weight
((100) 800)
((200) 1100)
((300) 1500))))

] courier "yellow" = [yellow-rate]
[(brl-when blue-rate
] courier "blue" = [blue-rate]
[)]
[(brl-when black-rate
] courier "black" = [black-rate]
[)]



> ~~~ input page input.htm:
>
> <form method="GET" action="output.php" name="input">
>
> SELECT THE VOLUME OF YOUR PACKAGE:
>
> <input type="radio" name="volume" value="1"> from 0 to 1 m3
> <input type="radio" name="volume" value="2"> from 1 to 2 m3
> <input type="radio" name="volume" value="3"> from 2 to 3 m3
>
> <br>SELECT THE WEIGHT OF YOUR PACKAGE:
>
> <input type="radio" name="weight" value="100"> from 0 to 100 Kg
> <input type="radio" name="weight" value="200"> from 100 to 200 Kg
> <input type="radio" name="weight" value="300"> from 200 to 300 Kg
>
> </form>
>
> ~~~ istructions to be integrated in the "output.php" script:
>
> Courier "yellow" - for volume 1, 2 and 3:
> if weight=100 then rate=600
> if weight=200 then rate=900
> if weight=300 then rate=1200
>
> Courier "blue" - for volume 1 and 2:
> if weight=100 then rate=400
> if weight=200 then rate=700
>
> Courier "black" - for volume 2 and 3:
> if weight=100 then rate=800
> if weight=200 then rate=1100
> if weight=300 then rate=1500
>
>
> ~~~ sample request and result:
>
> Example A) With the user input:
> volume=2
> weight=300
>
> output.php must generate this result:
> courier "yellow" = 1200
> courier "black" = 1500
>
>
> Example B) With the user input:
> volume=1
> weight=100
>
> output.php must generate this result:
> courier "yellow" = 600
> courier "blue" = 400
>
>
>
>
>


--

http://ourdoings.com/ Let your digital photos organize themselves.
Sign up today for a 7-day free trial.
I rarely read mail sent to brlspam@yahoo.com
Reply With Quote
  #16 (permalink)  
Old 12-10-2004
Ginzo
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

Perhaps it's needless semantic bickering; but the post made it sound
as if he thought PHP had eveloved from Perl; which is absolutely not
true.

On 01 Dec 2004 16:06:41 GMT, Bill Bablefesche <bbable@nerspampalm.com>
wrote:

>>> Perl is the lanauge that php started from if im correct !!!
>>>

>> Wrong.
>>
>> Ciao,
>>
>> Ginzo
>> ---------------------------------
>> War is god's way of teaching
>> Americans geography

>
>Yes! PHP began as PHP/FI in 1995 as a set of Perl scripts.
>
>http://us2.php.net/history
>
>
>--splatter



Ciao,


Ginzo
---------------------------------
War is god's way of teaching
Americans geography
-- Ambrose Bierce
---------------------------------
Reply With Quote
  #17 (permalink)  
Old 12-13-2004
Marta
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

> This sounds a lot like a homework problem, but if so, by now the
> assignment must have been due already.


I can absure it was a business need. I finally paid $20 to a programmer to
have it done :)

> Here is a BRL version for you to compare against PHP, ASP and Perl
> solutions.


Anyway, I'm curious about this BRL. Why did you decide to study this minor
language?
Your code would be useful to me but I'm feared that I'ld be in difficulty
when I'll need to improve it. How many people knows BRL?

M.


Reply With Quote
  #18 (permalink)  
Old 12-13-2004
Bruce Lewis
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

"Marta" <marta@mariapia.com> writes:

> Anyway, I'm curious about this BRL. Why did you decide to study this minor
> language?


I learned Scheme in college, and created BRL by extending Scheme in a
way that was suitable for server-side web programming. That's actually
an oversimplification. There were 12 years of C programming in
between.

> Your code would be useful to me but I'm feared that I'ld be in difficulty
> when I'll need to improve it. How many people knows BRL?


Hundreds of high schools and colleges use Scheme in the course of
teaching other topics, because it's such an easy language that one can
focus most of the course on topics rather than nitty-gritty syntax
details. It's a simple step from Scheme to BRL.

Scheme programming is fun. Post a problem in comp.lang.scheme and once
people decide it isn't homework you'll get 5 or so solutions.

Note that despite PHP's reputation as being easy and fun, nobody would
supply you a PHP solution without being paid for it.

--

http://ourdoings.com/ Let your digital photos organize themselves.
Sign up today for a 7-day free trial.
Reply With Quote
  #19 (permalink)  
Old 12-16-2004
retlak@go.com
 
Posts: n/a
Default Re: Is PHP the easier web programming language?

Jordon Bedwell wrote:
> PHP is a good language if you have time. ASP sucks outright


A major problem with PHP is that it gives you less help with finding
mistakes.

If you use Perl, just use the -w option and "use strict", and it'll
tell you about things like undeclared (e.g. mis-spelled) variables
when you test your script from the command line. This is a huge
time-saver. PHP has no equivalent - you can set error_reporting to
E_ALL, but it's only for runtime errors. It won't detect an error in a
code path until that path gets executed.

(Arguably, this is a problem with PHP's current implementations, not
the language.)

BTW I agree with you about ASP. Learning something that works only on
one family of operating systems is a bad thing to do anyway.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0