PHP构造函数引用变量使其他变量不起作用

I have a constructor function. Everything works except the last part.

class Article {
  public $category;
  public $title;
  public $text;
  public $intro;


  public function __construct($category, $title, $text) {
      $this->category = $category;
      $this->title = $title;    
      $this->text = $text;
      $this->intro = substr($this->text, 0, 40);
  }
}

Intro is not being created.

It works just fine:

<?php

class Article {
  public $category;
  public $title;
  public $text;
  public $intro;


  public function __construct($category, $title, $text) {
      $this->category = $category;
      $this->title = $title;    
      $this->text = $text;
      $this->intro = substr($this->text, 0, 40);
  }
}

$test=new Article('a','b','A question is a linguistic expression used to make a request for information, or the request made using such an expression. The information requested may be provided in the form of an answer.');

echo $test->intro; //A question is a linguistic expression us

demo: http://codepad.org/3aXaWZHY