derickr / vld

BSD 2-Clause "Simplified" License
464 stars 87 forks source link

The return of FETCH_CLASS is <unknown> #51

Closed jimmyleeeeee closed 4 years ago

jimmyleeeeee commented 4 years ago

The issue of NEW instruction has been resolved. But , today, I met another issue. The php code is

class CConst { 
   const MIN_VALUE=1;
  public static function getMinValue()
  {
  return self::MIN_VALUE;
  }
}

$const_var=new CConst();
$c=$const_var::MIN_VALUE;

The dumped code is listed below.

line #* EIO op  fetch  ext  return  operands
-------------------------------------------------------------------------------------
10   0*    NEW                  $5    'CConst'
    1*    DO_FCALL          0
    2*    ASSIGN                      !0, $5
11   3*    FETCH_CLASS        0     &lt;**unkown**&gt; !0
    4*    FETCH_CLASS_CONSTANT         ~9    $8, 'MIN_VALUE'
    5*    ASSIGN                      !1, ~9

The return column of FETCH_CLASS is <unkown>.

derickr commented 4 years ago

Can you please format the text in your issue? Have a look at https://guides.github.com/features/mastering-markdown/ on how to do that.

jimmyleeeeee commented 4 years ago

Hi, Derick I have updated the format. Please review whether it is OK this time.