This is a SAMPLE TESTING MESSAGE sent through Cell Broadcasting System by Department of Telecommunication

Image
  This is a SAMPLE TESTING MESSAGE sent through Cell Broadcasting System by Department of Telecommunication, Government of India. Please ignore this message as no action is required from your end. This message has been sent to test Pan-India Emergency Alert System being implemented by National Disaster Management Authority. It aims to enhance public safety and provide timely alerts during emergencies. Timestamp: 12-10-2023 12:13 PM 21

Here's a comparison of PHP and Python syntax in a table format

 



FeaturePHPPython
Comments// Single-line comment<br>/* Multi-line comment */# Single-line comment<br>''' Multi-line comment '''
Variables$variable_namevariable_name
Variable Assignment$variable = value;variable = value
Data TypesDynamic typingDynamic 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 Structuresif, else, elseif, switch, while, for, foreachif, 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 = {"name": "John"}
Functionsfunction functionName() { ... }def function_name():<br>\t...
Function ArgumentsfunctionName($arg1, $arg2)function_name(arg1, arg2)
Classesclass ClassName { ... }class ClassName:<br>\t...
Class Methodspublic function methodName() { ... }def method_name(self):<br>\t...
Class Properties$propertyself.property
Exceptionstry { ... } catch (Exception $e) { ... }try:<br>\t...<br>except Exception as e:<br>\t...
File Inclusionrequire_once('filename.php');import module_name<br>from module_name import *
Regular Expressions/pattern/re.compile(r'pattern')

Comments

Popular posts from this blog

Google doodle celebrates India Republic Day

This is a SAMPLE TESTING MESSAGE sent through Cell Broadcasting System by Department of Telecommunication

Shell script to check domain expiry date and send alerts to Slack on Ubuntu