Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

使用vld生成opcode的时候,除了生成当前指定文件的opcode,还会莫名其妙的生成出swoole的opcode。。

/usr/bin/php -dvld.active=1 -dvld.verbosity=3 -dvld.execute=0 -dvld.dump_paths=0 test.php
filename:       /mnt/d/www/test.php
function name:  (null)
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0*       < 40> ECHO                                                      OP1[  IS_CONST (0) 'hello+world' ]
   7     1*       < 62> RETURN                                                    OP1[  IS_CONST (1) 1 ]

Function swoole_exec:
filename:       @swoole-src/library/std/exec.php
function name:  swoole_exec
number of ops:  48
compiled vars:  !0 = $command, !1 = $output, !2 = $returnVar, !3 = $result, !4 = $outputList, !5 = $value, !6 = $endLine
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  12     0*       < 63> RECV                                              RES[  IS_CV !0 ]       OP1[  IS_UNUSED  ]
         1*       < 64> RECV_INIT                                         RES[  IS_CV !1 ]       OP1[  IS_UNUSED  ] OP2[  IS_CONST (0) null ]
         2*       < 64> RECV_INIT                                         RES[  IS_CV !2 ]       OP1[  IS_UNUSED  ] OP2[  IS_CONST (1) null ]
  14     3*       <113> INIT_STATIC_METHOD_CALL                                   OP1[  IS_CONST (2) 'Swoole%5CCoroutine' ] OP2[ ,  IS_CONST (4) 'exec' ]
         4*       <117> SEND_VAR                                                  OP1[  IS_CV !0 ] OP2[  IS_UNUSED  ]
         5*       < 60> DO_FCALL                                      0   RES[  IS_VAR $7 ]       OP1[  IS_UNUSED  ]
         6*       < 38> ASSIGN                                                    OP1[  IS_CV !3 ] OP2[ ,  IS_VAR $7 ]
  15     7*       < 43> JMPZ                                                      OP1[  IS_CV !3 ] OP2[ , ->46 ]
  16     8*       < 61> INIT_FCALL                                                OP1[  IS_UNUSED  ] OP2[  IS_CONST (6) 'explode' ]
         9*       < 65> SEND_VAL                                                  OP1[  IS_CONST (7) '%0A' ]
        10*       < 81> FETCH_DIM_R                                       RES[  IS_VAR $9 ]       OP1[  IS_CV !3 ] OP2[ ,  IS_CONST (8) 'output' ]
        11*       <117> SEND_VAR                                                  OP1[  IS_VAR $9 ] OP2[  IS_UNUSED  ]
        12*       <129> DO_ICALL                                          RES[  IS_VAR $10 ]      OP1[  IS_UNUSED  ] OP2[  IS_UNUSED  ]
...省略

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
370 views
Welcome To Ask or Share your Answers For Others

1 Answer

这是swoole library,你可以在php.ini中设置swoole.enable_library=Off 或者使用命令行参数

php -d swoole.enable_library=Off -dvld.active=1 -dvld.verbosity=3 -dvld.execute=0 -dvld.dump_paths=0 test.php

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...