Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh yes they do: https://www.php.net/manual/en/language.oop5.magic.php

The programming languages world is broad/varied enough that any statement like "no other language does this!" is almost certainly wrong (outside of esoteric languages, which python and php most certainly are not)





Lua, too:

  __add, __sub, __mul, __div, __mod, __pow, __unm, __idiv
  __band, __bor, __bxor, __bnot, __shl, __shr
  __concat, __len
  __eq, __lt, __le
  __index, __newindex, __call
  __gc, __close, __mode, __name



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: