Solved

Php operators

Posted on 2016-08-29
6
23 Views
Last Modified: 2016-08-29
I see it in some codes
They use this -> symbol to assign something
But i want to learn more
What is this symbol for ->  ?
0
Comment
Question by:Braveheartli
  • 3
  • 2
6 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 41775404
It's the object-oriented code signal for property or method chains.
0
 
LVL 15

Assisted Solution

by:gplana
gplana earned 250 total points
ID: 41775407
The symbol -> is used to access to a property or method of an object.

This is related to object oriented programming, a set of capabilities that php has.
There is also the :: operator which is intendet to access a property or method of a class.

For more information see http://code.tutsplus.com/tutorials/object-oriented-php-for-beginners--net-12762

Hope it helps. Regards.
0
 
LVL 1

Author Comment

by:Braveheartli
ID: 41775408
There are 3 kind of code in php?
Which one should i learn?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 41775415
Please see an example here: https://iconoun.com/demo/temp_braveheartli.php
<?php // demo/temp_braveheartli.php
/**
 * https://www.experts-exchange.com/questions/28966379/Php-operators.html
 *
 * https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html
 */
error_reporting(E_ALL);

$thing = new StdClass;
$thing->property = 'Hello';
var_dump($thing);

Open in new window

Outputs:
object(stdClass)#1 (1) { ["property"]=> string(5) "Hello" }

Open in new window

0
 
LVL 15

Assisted Solution

by:gplana
gplana earned 250 total points
ID: 41775416
I would start in structured programming. When you  commit structured programming then I would move to object oriented programming.

This is the quite common way on computer programming in general, not just in php.

Regards.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 41775417
There are 3 kind of code in php?
Which one should i learn?
All of them!  They are used together to build applications.

Here's a good place to get started:
https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
<? versus <?php 5 37
PHPStorm debugging issues 1 24
WordPress syntax 2 27
How do I change the from header when sending a mail 1 18
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now