Skip to content

Instantly share code, notes, and snippets.

@paulbarbu
Created October 23, 2011 19:11
Show Gist options
  • Save paulbarbu/1307738 to your computer and use it in GitHub Desktop.
Save paulbarbu/1307738 to your computer and use it in GitHub Desktop.
PHP function vs construct
[18:55] <+flavius> starlays: ca sa afli daca ceva e functie e simplu
[18:55] <+flavius> php -r "var_dump(token_get_all('<?php isset'));"
[18:56] <+flavius> iti va afisa numarul 350 pentru "isset"
[18:56] <+flavius> acela este numarul operatorului, sau pe intelesul lui paullik, 350 este opcode-ul lui isset()
[18:56] <+flavius> si apoi apelezi: php -r "var_dump(token_name(350));"
[18:57] <+flavius> un T_STRING ar însemna un apel de functie, altfel este un construct al limbajului
[18:57] <paullik> oho :) nice things
[18:58] <+flavius> veti avea nevoie de modulul tokens.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment