code_junkie

What is the point of interfaces in PHP?

Nov 10th, 2011
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. interface Readable {
  2. String read();
  3. }
  4.  
  5. List<Readable> readables; // dunno what these actually are, but we know they have read();
  6. for(Readable reader : readables)
  7. System.out.println(reader.read());
Add Comment
Please, Sign In to add comment