2 answers
Best answer
PHP syntax resembles Perl and C
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Answer: PHP's syntax mainly resembles C and Perl.
- From C: statements end with semicolons, blocks use curly braces
{ }, and control structures likeif,for,while,switchlook the same. Functions likeprintf()also come from C. - From Perl: variables start with a
$sign ($name), strong string handling, and variables can be placed directly inside double-quoted strings.
Its object-oriented features (classes, interfaces) also look similar to Java. Because of this familiar syntax, programmers who know C or Perl can learn PHP quickly.
Doubtly AI
· 24 Oct 2026
AI-verified · Oct 2026
Report
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Your answer
Log in or create a free account to answer this question.