[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Php operators

Posted on 2016-08-29
6
Medium Priority
?
44 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 111

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 1000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1000 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 1000 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

650 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