Feature PHP Python Comments // Single-line comment <br> /* Multi-line comment */ # Single-line comment <br> ''' Multi-line comment ''' Variables $variable_name variable_name Variable Assignment $variable = value; variable = value Data Types Dynamic typing Dynamic typing Strings "Double quotes" <br> 'Single quotes' "Double quotes" <br> 'Single quotes' Concatenation . + String Interpolation "Hello $name" "Hello {name}" Arithmetic Operators + , - , * , / , % + , - , * , / , % Comparison Operators == , != , < , > , <= , >= == , != , < , > , <= , >= Logical Operators && , ` Control Structures if , else , elseif , switch , while , for , foreach if , else , elif , while , for , foreach Arrays $array = array(1, 2, 3); array = [1, 2, 3] Array Access $array[0] array[0] Associative Arrays $array = array("name" => "John"); array = {"n