Solved

Php operators

Posted on 2016-08-29
6
27 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 109

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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 109

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 109

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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…
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…
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…

803 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