Solved

Php operators

Posted on 2016-08-29
6
30 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 110

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 110

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 110

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

749 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