PHP: Variable

PHP

Variables are identifiers for some data storage in the programming. We can save some data in memory using a variable, and the variable works as a named identifier of that data storage memory address. PHP variable naming starts with a dollar sign($) and then there is an identifier(variable name). The identifier/name of the variable should … Read more

Python: Data Types

General Data Types Data Type Python Type Immutable & Hashable Boolean bool Yes Integer int Yes Floating point number float Yes String str Yes Bytes bytes Yes Collection Data Types Data Type Python Type Immutable & Hashable Tuple tuple Yes Set set No Frozen Set frozenset Yes List list No Dictionary dictionary No

Python: Program Structure

We can structure our Python program in 3 ways- All these 3 ways can be combined together to create a full program. Sequential Steps Output: Conditional Steps Output: Repeated Steps Output:

PHP: SplFixedArray

PHP

SplFixedArray is a data structure provided by the Standard PHP Library(SPL). Works similar to the array but is memory efficient. So when memory consumption is a concern in some part of your PHP application then use SplFixedArray instead of standard array.