Search
 
SCRIPT & CODE EXAMPLE
 

PHP

What does this mean in PHP: -> or =>

The double arrow operator, =>, is used as an access mechanism for arrays. This means that what is on the left side of it will have a corresponding value of what is on the right side of it in array context. This can be used to set values of any acceptable type into a corresponding index of an array. The index can be associative (string based) or numeric.

$myArray = array(
    0 => 'Big',
    1 => 'Small',
    2 => 'Up',
    3 => 'Down'
);

The object operator, ->, is used in object scope to access methods and properties of an object. It’s meaning is to say that what is on the right of the operator is a member of the object instantiated into the variable on the left side of the operator. Instantiated is the key term here.

// Create a new instance of MyObject into $obj
$obj = new MyObject();
// Set a property in the $obj object called thisProperty
$obj->thisProperty = 'Fred';
// Call a method of the $obj object named getProperty
$obj->getProperty();
Comment

what does >= mean in php

//>= Stands for greater than or equal to.
$a = 1;
$b = 0;
  if($a >= $b){
   return true; 
  }else{
   return false; 
  }
//This would return false becaue 0 is not greater than or equal to 1.
Comment

PREVIOUS NEXT
Code Example
Php :: json encode unset array 
Php :: WP Hero Img 
Php :: Laravel FileManager Display Blank pop up page 
Php :: laravel 7 link to another page with language prefix 
Php :: PHP redirect parent page 
Php :: obtener tipo 
Php :: how to get the top_area in orders laravel 
Php :: call stored procedure in laravel 
Php :: adding array not updating php 
Php :: repalce 0 in phone with 234 
Php :: Differentiate PHP include and require statement 
Php :: an einem string etwas anfügen php 
Php :: php load select page from url 
Php :: Unregistering a variable with $_SESSION. 
Php :: integracao de webservice no php usando soap 
Php :: laravel after method() 
Php :: laravel migration add contraint to other database 
Php :: Laravel advanced sub queries 
Php :: laravel validation error messages are not showing on register oage 
Php :: edit order of columns for wordpress 
Php :: orocrm switch dev mode 
Php :: removing public from laravel url 
Php :: id de sesion php 
Php :: wordpress ftp functions.php 
Php :: separate powershell commands on one line 
Php :: !array_push($stack, "apple", "raspberry"); 
Php :: print csv file in php 
Php :: laravel blade all syntex description 
Php :: php retrieve data from database and show in text area greeper 
Php :: php strom key 2 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =