Syntax Comparison
From mi-linux
Jump to navigationJump to searchBasics
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Multi-line comment | /* comment */ |
/* comment */ |
/* comment */ |
Doesn't have multi-line comments. |
Null object | NULL |
null |
TODO |
None |
+,-,*,/,%,* | +,-,*,/,%,* |
+,-,*,/,%,* |
+,-,*,/,%,* |
+,-,*,/,%,* |
True and false | TRUE, FALSE |
true, false |
TODO |
True, False |
Boolean operators | &&, ||, ! |
&&, ||, ! |
TODO |
and, or, not |
Relational operators | <, >, <=, >=, ==, != |
<, >, <=, >=, ==, != |
<, >, <=, >=, ==, != |
<, >, <=, >=, ==, != |
Selection
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Iteration
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Compound types (arrays, lists, etc)
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Input / output
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Exception handling
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Dealing with types
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Classes, objects, methods, etc
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |