3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class Expression { private $closure; public function getClosure() { return $this->closure; } public function setClosure(\Closure $closure) { $this->closure = $closure; } public function getReflection() { return new \ReflectionFunction($this->getClosure()); } private function getLines() { $reflection = $this->getReflection(); $startLine = $reflection->getStartLine(); $endLine = $reflection->getEndLine(); return array_slice(file($reflection->getFileName()), $startLine - 1, ($endLine - $startLine) + 1); } private function getAllTokens(array $lines) { $code = sprintf('<?php %s ;', implode($lines)); return array_map(function ($token) { if (is_array($token)) { list($id, $value) = $token; return new Token($id, $value); } return new Token(T_SYMBOL, $token); }, array_filter(token_get_all($code), function ($token) { if (is_array($token)) { switch ($token[0]) { case T_INLINE_HTML: case T_BAD_CHARACTER: case T_COMMENT: case T_WHITESPACE: return false; } } return true; })); } private function getFilteredTokens(array $tokens) { while (!empty($tokens)) { $token = array_shift($tokens); if ($token->getId() == T_FUNCTION) { $depth = 0; $filteredTokens = []; foreach ($tokens as $token) { $filteredTokens[] = $token; if ($token->getId() == T_SYMBOL) { switch ($token->getValue()) { case '{': $depth += 1; break; case '}': $depth -= 1; if ($depth == 0) { return $filteredTokens; } break; } } } } } return []; } public function test() { $lines = $this->getLines(); $tokens = $this->getAllTokens($lines); $filteredTokens = $this->getFilteredTokens($tokens); return $filteredTokens; } public function __construct(\Closure $closure) { $this->setClosure($closure); } } const T_SYMBOL = 1099; class Token { private $id; private $value; public function getId() { return $this->id; } private function setId($id) { $this->id = (int) $id; } public function getValue() { return $this->value; } private function setValue($value) { $this->value = (string) $value; } public function getName() { if ($this->id != 1099) { return (string) token_name($this->id); } return 'T_SYMBOL'; } public function __construct($id, $value) { $this->setId($id); $this->setValue($value); } public function __toString() { return vsprintf('%-30s %s', [ $this->getName(), $this->getValue(), ]); } } $id = 1; $password = 'foobar'; $expression = new Expression(function (User $u) use ($id, $password) { return $u->id == $id && $u->password == $password; }); foreach ($expression->test() as $token) { echo $token . PHP_EOL; } var_dump($expression->getReflection()->getStaticVariables());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/TDvqH
function name:  (null)
number of ops:  28
compiled vars:  !0 = $id, !1 = $password, !2 = $expression, !3 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  108     0  E >   DECLARE_CONST                                            'Test%5CT_SYMBOL', 1099
  110     1        DECLARE_CLASS                                            'test%5Ctoken'
  161     2        ASSIGN                                                   !0, 1
  162     3        ASSIGN                                                   !1, 'foobar'
  163     4        NEW                                              $6      'Test%5CExpression'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A163%243'
          6        BIND_LEXICAL                                             ~7, !0
          7        BIND_LEXICAL                                             ~7, !1
  165     8        SEND_VAL_EX                                              ~7
          9        DO_FCALL                                      0          
  163    10        ASSIGN                                                   !2, $6
  167    11        INIT_METHOD_CALL                                         !2, 'test'
         12        DO_FCALL                                      0  $10     
         13      > FE_RESET_R                                       $11     $10, ->19
         14    > > FE_FETCH_R                                               $11, !3, ->19
  169    15    >   FETCH_CONSTANT                                   ~12     'Test%5CPHP_EOL'
         16        CONCAT                                           ~13     !3, ~12
         17        ECHO                                                     ~13
  167    18      > JMP                                                      ->14
         19    >   FE_FREE                                                  $11
  172    20        INIT_NS_FCALL_BY_NAME                                    'Test%5Cvar_dump'
         21        INIT_METHOD_CALL                                         !2, 'getReflection'
         22        DO_FCALL                                      0  $14     
         23        INIT_METHOD_CALL                                         $14, 'getStaticVariables'
         24        DO_FCALL                                      0  $15     
         25        SEND_VAR_NO_REF_EX                                       $15
         26        DO_FCALL                                      0          
         27      > RETURN                                                   1

Function %00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A36%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  Test\{closure}
number of ops:  23
compiled vars:  !0 = $token, !1 = $id, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
   37     1        INIT_NS_FCALL_BY_NAME                                    'Test%5Cis_array'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $3      
          4      > JMPZ                                                     $3, ->16
   39     5    >   QM_ASSIGN                                        ~4      !0
          6        FETCH_LIST_R                                     $5      ~4, 0
          7        ASSIGN                                                   !1, $5
          8        FETCH_LIST_R                                     $7      ~4, 1
          9        ASSIGN                                                   !2, $7
         10        FREE                                                     ~4
   40    11        NEW                                              $9      'Test%5CToken'
         12        SEND_VAR_EX                                              !1
         13        SEND_VAR_EX                                              !2
         14        DO_FCALL                                      0          
         15      > RETURN                                                   $9
   42    16    >   NEW                                              $11     'Test%5CToken'
         17        FETCH_CONSTANT                                   ~12     'Test%5CT_SYMBOL'
         18        SEND_VAL_EX                                              ~12
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0          
         21      > RETURN                                                   $11
   43    22*     > RETURN                                                   null

End of function %00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A36%240

Function %00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A43%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 19
Branch analysis from position: 19
Branch analysis from position: 22
filename:       /in/TDvqH
function name:  Test\{closure}
number of ops:  24
compiled vars:  !0 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
   44     1        INIT_NS_FCALL_BY_NAME                                    'Test%5Cis_array'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > JMPZ                                                     $1, ->22
   46     5    >   FETCH_DIM_R                                      ~2      !0, 0
   48     6        FETCH_CONSTANT                                   ~4      'Test%5CT_INLINE_HTML'
          7        CASE                                                     ~2, ~4
          8      > JMPNZ                                                    ~3, ->19
   49     9    >   FETCH_CONSTANT                                   ~5      'Test%5CT_BAD_CHARACTER'
         10        CASE                                                     ~2, ~5
         11      > JMPNZ                                                    ~3, ->19
   50    12    >   FETCH_CONSTANT                                   ~6      'Test%5CT_COMMENT'
         13        CASE                                                     ~2, ~6
         14      > JMPNZ                                                    ~3, ->19
   51    15    >   FETCH_CONSTANT                                   ~7      'Test%5CT_WHITESPACE'
         16        CASE                                                     ~2, ~7
         17      > JMPNZ                                                    ~3, ->19
         18    > > JMP                                                      ->21
   52    19    >   FREE                                                     ~2
         20      > RETURN                                                   <false>
         21    >   FREE                                                     ~2
   55    22    > > RETURN                                                   <true>
   56    23*     > RETURN                                                   null

End of function %00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A43%241

Function %00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A163%243:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/TDvqH
function name:  Test\{closure}
number of ops:  11
compiled vars:  !0 = $u, !1 = $id, !2 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  163     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
  164     3        FETCH_OBJ_R                                      ~3      !0, 'id'
          4        IS_EQUAL                                         ~4      !1, ~3
          5      > JMPZ_EX                                          ~4      ~4, ->9
          6    >   FETCH_OBJ_R                                      ~5      !0, 'password'
          7        IS_EQUAL                                         ~6      !2, ~5
          8        BOOL                                             ~4      ~6
          9    > > RETURN                                                   ~4
  165    10*     > RETURN                                                   null

End of function %00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A163%243

Class Test\Expression:
Function getclosure:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  getClosure
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~0      'closure'
          1      > RETURN                                                   ~0
   13     2*     > RETURN                                                   null

End of function getclosure

Function setclosure:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  setClosure
number of ops:  4
compiled vars:  !0 = $closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        ASSIGN_OBJ                                               'closure'
          2        OP_DATA                                                  !0
   18     3      > RETURN                                                   null

End of function setclosure

Function getreflection:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  getReflection
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $0      'ReflectionFunction'
          1        INIT_METHOD_CALL                                         'getClosure'
          2        DO_FCALL                                      0  $1      
          3        SEND_VAR_NO_REF_EX                                       $1
          4        DO_FCALL                                      0          
          5      > RETURN                                                   $0
   23     6*     > RETURN                                                   null

End of function getreflection

Function getlines:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  getLines
number of ops:  24
compiled vars:  !0 = $reflection, !1 = $startLine, !2 = $endLine
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_METHOD_CALL                                         'getReflection'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
   28     3        INIT_METHOD_CALL                                         !0, 'getStartLine'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   29     6        INIT_METHOD_CALL                                         !0, 'getEndLine'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
   30     9        INIT_NS_FCALL_BY_NAME                                    'Test%5Carray_slice'
         10        INIT_NS_FCALL_BY_NAME                                    'Test%5Cfile'
         11        INIT_METHOD_CALL                                         !0, 'getFileName'
         12        DO_FCALL                                      0  $9      
         13        SEND_VAR_NO_REF_EX                                       $9
         14        DO_FCALL                                      0  $10     
         15        SEND_VAR_NO_REF_EX                                       $10
         16        SUB                                              ~11     !1, 1
         17        SEND_VAL_EX                                              ~11
         18        SUB                                              ~12     !2, !1
         19        ADD                                              ~13     ~12, 1
         20        SEND_VAL_EX                                              ~13
         21        DO_FCALL                                      0  $14     
         22      > RETURN                                                   $14
   31    23*     > RETURN                                                   null

End of function getlines

Function getalltokens:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  getAllTokens
number of ops:  24
compiled vars:  !0 = $lines, !1 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV                                             !0      
   35     1        INIT_NS_FCALL_BY_NAME                                    'Test%5Csprintf'
          2        SEND_VAL_EX                                              '%3C%3Fphp+%25s+%3B'
          3        INIT_NS_FCALL_BY_NAME                                    'Test%5Cimplode'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR_NO_REF_EX                                       $2
          7        DO_FCALL                                      0  $3      
          8        ASSIGN                                                   !1, $3
   36     9        INIT_NS_FCALL_BY_NAME                                    'Test%5Carray_map'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A36%240'
   43    11        SEND_VAL_EX                                              ~5
         12        INIT_NS_FCALL_BY_NAME                                    'Test%5Carray_filter'
         13        INIT_NS_FCALL_BY_NAME                                    'Test%5Ctoken_get_all'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $6      
         16        SEND_VAR_NO_REF_EX                                       $6
         17        DECLARE_LAMBDA_FUNCTION                                  '%00test%5C%7Bclosure%7D%2Fin%2FTDvqH%3A43%241'
   56    18        SEND_VAL_EX                                              ~7
         19        DO_FCALL                                      0  $8      
         20        SEND_VAR_NO_REF_EX                                       $8
         21        DO_FCALL                                      0  $9      
         22      > RETURN                                                   $9
   57    23*     > RETURN                                                   null

End of function getalltokens

Function getfilteredtokens:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 2
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 42
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 41
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 41
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 40
Branch analysis from position: 22
4 jumps found. (Code = 188) Position 1 = 30, Position 2 = 32, Position 3 = 39, Position 4 = 25
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 38
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 39
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 32
Branch analysis from position: 30
Branch analysis from position: 40
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 2
Branch analysis from position: 45
Branch analysis from position: 2
Branch analysis from position: 41
Branch analysis from position: 42
filename:       /in/TDvqH
function name:  getFilteredTokens
number of ops:  47
compiled vars:  !0 = $tokens, !1 = $token, !2 = $depth, !3 = $filteredTokens
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   59     0  E >   RECV                                             !0      
   61     1      > JMP                                                      ->42
   63     2    >   INIT_NS_FCALL_BY_NAME                                    'Test%5Carray_shift'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
   64     6        INIT_METHOD_CALL                                         !1, 'getId'
          7        DO_FCALL                                      0  $6      
          8        FETCH_CONSTANT                                   ~7      'Test%5CT_FUNCTION'
          9        IS_EQUAL                                                 $6, ~7
         10      > JMPZ                                                     ~8, ->42
   66    11    >   ASSIGN                                                   !2, 0
   67    12        ASSIGN                                                   !3, <array>
   68    13      > FE_RESET_R                                       $11     !0, ->41
         14    > > FE_FETCH_R                                               $11, !1, ->41
   70    15    >   ASSIGN_DIM                                               !3
         16        OP_DATA                                                  !1
   71    17        INIT_METHOD_CALL                                         !1, 'getId'
         18        DO_FCALL                                      0  $13     
         19        FETCH_CONSTANT                                   ~14     'Test%5CT_SYMBOL'
         20        IS_EQUAL                                                 $13, ~14
         21      > JMPZ                                                     ~15, ->40
   73    22    >   INIT_METHOD_CALL                                         !1, 'getValue'
         23        DO_FCALL                                      0  $16     
         24      > SWITCH_STRING                                            $16, [ '%7B':->30, '%7D':->32, ], ->39
   75    25    >   CASE                                                     $16, '%7B'
         26      > JMPNZ                                                    ~17, ->30
   78    27    >   CASE                                                     $16, '%7D'
         28      > JMPNZ                                                    ~17, ->32
         29    > > JMP                                                      ->39
   76    30    >   ASSIGN_OP                                     1          !2, 1
   77    31      > JMP                                                      ->39
   79    32    >   ASSIGN_OP                                     2          !2, 1
   80    33        IS_EQUAL                                                 !2, 0
         34      > JMPZ                                                     ~20, ->38
   82    35    >   FREE                                                     $16
         36        FE_FREE                                                  $11
         37      > RETURN                                                   !3
   84    38    > > JMP                                                      ->39
         39    >   FREE                                                     $16
   68    40    > > JMP                                                      ->14
         41    >   FE_FREE                                                  $11
   61    42    >   ISSET_ISEMPTY_CV                                 ~21     !0
         43        BOOL_NOT                                         ~22     ~21
         44      > JMPNZ                                                    ~22, ->2
   90    45    > > RETURN                                                   <array>
   91    46*     > RETURN                                                   null

End of function getfilteredtokens

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  test
number of ops:  13
compiled vars:  !0 = $lines, !1 = $tokens, !2 = $filteredTokens
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   95     0  E >   INIT_METHOD_CALL                                         'getLines'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
   96     3        INIT_METHOD_CALL                                         'getAllTokens'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
   97     7        INIT_METHOD_CALL                                         'getFilteredTokens'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $7      
         10        ASSIGN                                                   !2, $7
   98    11      > RETURN                                                   !2
   99    12*     > RETURN                                                   null

End of function test

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  __construct
number of ops:  5
compiled vars:  !0 = $closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  101     0  E >   RECV                                             !0      
  103     1        INIT_METHOD_CALL                                         'setClosure'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
  104     4      > RETURN                                                   null

End of function __construct

End of class Test\Expression.

Class Test\Token:
Function getid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  getId
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  118     0  E >   FETCH_OBJ_R                                      ~0      'id'
          1      > RETURN                                                   ~0
  119     2*     > RETURN                                                   null

End of function getid

Function setid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  setId
number of ops:  5
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  121     0  E >   RECV                                             !0      
  123     1        CAST                                          4  ~2      !0
          2        ASSIGN_OBJ                                               'id'
          3        OP_DATA                                                  ~2
  124     4      > RETURN                                                   null

End of function setid

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  getValue
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  128     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1      > RETURN                                                   ~0
  129     2*     > RETURN                                                   null

End of function getvalue

Function setvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  setValue
number of ops:  5
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  131     0  E >   RECV                                             !0      
  133     1        CAST                                          6  ~2      !0
          2        ASSIGN_OBJ                                               'value'
          3        OP_DATA                                                  ~2
  134     4      > RETURN                                                   null

End of function setvalue

Function getname:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  getName
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  138     0  E >   FETCH_OBJ_R                                      ~0      'id'
          1        IS_NOT_EQUAL                                             ~0, 1099
          2      > JMPZ                                                     ~1, ->10
  140     3    >   INIT_NS_FCALL_BY_NAME                                    'Test%5Ctoken_name'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $2      'id'
          6        SEND_FUNC_ARG                                            $2
          7        DO_FCALL                                      0  $3      
          8        CAST                                          6  ~4      $3
          9      > RETURN                                                   ~4
  142    10    > > RETURN                                                   'T_SYMBOL'
  143    11*     > RETURN                                                   null

End of function getname

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  __construct
number of ops:  9
compiled vars:  !0 = $id, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  145     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  147     2        INIT_METHOD_CALL                                         'setId'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
  148     5        INIT_METHOD_CALL                                         'setValue'
          6        SEND_VAR                                                 !1
          7        DO_FCALL                                      0          
  149     8      > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TDvqH
function name:  __toString
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  153     0  E >   INIT_NS_FCALL_BY_NAME                                    'Test%5Cvsprintf'
          1        SEND_VAL_EX                                              '%25-30s+%25s'
  154     2        INIT_METHOD_CALL                                         'getName'
          3        DO_FCALL                  

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.52 ms | 1428 KiB | 37 Q