Solved

Php operators

Posted on 2016-08-29
6
20 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 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

15 Experts available now in Live!

Get 1:1 Help Now