I have two pieces of text! Every piece of text has some lines. Every line contains any sort of char/numbers;
I'd like to implement a PHP function that will tell :
- if a line has been deleted or inserted from the original one;
 - if a line has been edited;
 
Example :
    Text 1              Text 2                 Result
    my name is marco    my name is marco       OK
    I'm 25              I'm 26                 Return 1
    I like football     I hate baseball        Make newline on Text 2
    I hate baseball     
    I'm cold            I'm cold               OK
I tried many ways to do it, but I don't know how to identify if a line is NEW or if it's just edited. Maybe I should trace some index when user write the text?