PHPCfg\Operand::removeUsage PHP Method

removeUsage() public method

public removeUsage ( Op $op )
$op Op
    public function removeUsage(Op $op)
    {
        $key = array_search($op, $this->usages, true);
        if ($key !== false) {
            unset($this->usages[$key]);
        }
    }

Usage Example

Beispiel #1
0
 public function removeOperand(Operand $op)
 {
     foreach ($this->vars as $key => $value) {
         if ($op === $value) {
             $op->removeUsage($this);
             unset($this->vars[$key]);
             $this->vars = array_values($this->vars);
         }
     }
 }