Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 227 Bytes

PossiblyUndefinedMethod.md

File metadata and controls

15 lines (11 loc) · 227 Bytes

PossiblyUndefinedMethod

Emitted when trying to access a method that may not be defined on the object

<?php

class A {
    public function bar() : void {}
}
class B {}

$a = rand(0, 1) ? new A : new B;
$a->bar();