What does - > mean in php

Discussion in 'PHP' started by baris22, Aug 11, 2012.

  1. #1
    Hello everybody,

    What does - > mean?

    
    
    <?php
     $d = new DateTime( '2010-01-08' );
     $d->modify( 'first day of next month' );
     echo $d->format( 'F' ), "\n";
     ?>
     
    <?php
     $d = new DateTime( '2010-01-08' );
     $d->modify( 'first day of +1 month' );
     echo $d->format( 'F' ), "\n";
     ?> 
    
    
    Code (markup):
     
    baris22, Aug 11, 2012 IP
  2. AuthoredFY

    AuthoredFY Active Member

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    88
    #2
    It means that $d has a class assigned to it and you're accessing something within that class (in this case, you're accessing the modify() function within the DateTime() class).

    Google PHP OOP (object oriented programming) if you need to learn more about classes.
     
    AuthoredFY, Aug 11, 2012 IP