Commit 2435e77 1 parent 4074471 commit 2435e77 Copy full SHA for 2435e77
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,18 @@ echo $some->get(); // prints #BlackLivesMatter
35
35
36
36
$none = None::new(); // return `None`
37
37
38
- // call `get` method on `None` will throw `NullPointerException`
38
+ // calling the `get` method on `None` will throw `NullPointerException`
39
39
echo $none->get(); // throw `NullPointerException`
40
40
41
41
echo $none->getOr('#BLM'); // prints #BLM
42
42
43
- // call `new` static method with `null` will return `None`
43
+ // calling the `new` static method with `null` will return `None`
44
44
Option::new(null); // return `None`
45
45
46
- // call `new` static method with `null will throw `NullPointerException`
46
+ // calling the `new` static method with `null will throw `NullPointerException`
47
47
Some::new(null); // throws `NullPointerException`
48
48
49
- // call `new` static method with `None will throw `NullPointerException`
49
+ // calling the `new` static method with `None will throw `NullPointerException`
50
50
Some::new(None::new()); // throws `NullPointerException`
51
51
52
52
--- Example
You can’t perform that action at this time.
0 commit comments