+ 1

Is Php similar to Perl?

Is Php similar to Perl?

19th Sep 2018, 6:23 AM
Titan Lex
Titan Lex - avatar
3 Answers
+ 3
Though in first look they appear same .But they are not!! Perl and PHP are more different than alike. Let's consider Perl 5, since Perl 6 is still under development. Some differences, grouped roughly by subject: Perl has native regular expression support, including regexp literals. PHP uses Perl's regexp functions as an extension. Perl has quite a few more operators, including matching (=~, !~), quote-like (qw, qx &c.), exponentiation (**),string repetition (x) and range (..and ...). PHP has a few operators Perl doesn't, such as the error suppression operator (@), instanceof(though Perl does have theUniversal::isa method) and clone. In PHP, new is an operator. In Perl, it's the conventional name of an object creation subroutine defined in packages, nothing special as far as the language is concerned. For better understanding you can visit: https://stackoverflow.com/questions/2534756/differences-between-perl-and-php
19th Sep 2018, 7:34 AM
Ananya Pandey
Ananya Pandey - avatar
+ 1
Hello World
19th Sep 2018, 7:34 AM
Duc Buivan
Duc Buivan - avatar
+ 1
The main similarity between php and perl is the fact that they both work at the server end when it comes to websites. They do a lot of similar things, but the style of coding is different. I learned perl long before php, and still like perl better, 😉 and one problem I found when I first started learning php was that I would go back to perl and suddenly be making mistakes with coding formats because I would get the 2 mixed up.
7th Mar 2019, 10:22 PM
Mike
Mike - avatar