Created
October 23, 2011 19:11
-
-
Save paulbarbu/1307738 to your computer and use it in GitHub Desktop.
PHP function vs construct
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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