Pastebin, everyone should have one. Why? Well, uhm, because! Yeah.. For no particular reason other than coding one once again, here it is.

Pastebin v3 is better than any other pastebin ever! Forget about flat PHP, forget about Spyce. Here comes object oriented PHP! The main library file is only about 250 lines, but is packed with all kinds of nice features.


Each paste is given filename(and url at the same time) that consists of current unix timestamp and microseconds(8 and 6 hex digits respectively). In addition 2 hex digits worth of flags is also appended to file name[2].

Additionally paste file itself stores paste's title, submitter's ip and syntax coloring. Current file format does not support different paste file formats, so if new fields are added, old pastes must either be deleted or updated. In future a http-like header system might be added, allowing for flexible attribute store and access.

  1. Looks good, but unfortunately supports only few languages
  2. currently only is_unlisted