1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use Carbon\Carbon; |
4
|
|
|
use Punic\Calendar; |
5
|
|
|
|
6
|
|
|
Carbon::macro('toShortDateString', function() { |
7
|
3 |
|
return Calendar::formatDate($this, 'short'); |
|
|
|
|
8
|
144 |
|
}); |
9
|
|
|
|
10
|
|
|
Carbon::macro('toMediumDateString', function() { |
11
|
3 |
|
return Calendar::formatDate($this, 'medium'); |
|
|
|
|
12
|
144 |
|
}); |
13
|
|
|
|
14
|
|
|
Carbon::macro('toLongDateString', function() { |
15
|
3 |
|
return Calendar::formatDate($this, 'long'); |
|
|
|
|
16
|
144 |
|
}); |
17
|
|
|
|
18
|
|
|
Carbon::macro('toFullDateString', function() { |
19
|
3 |
|
return Calendar::formatDate($this, 'full'); |
|
|
|
|
20
|
144 |
|
}); |
21
|
|
|
|
22
|
|
|
Carbon::macro('toShortTimeString', function() { |
23
|
3 |
|
return Calendar::formatTime($this, 'short'); |
|
|
|
|
24
|
144 |
|
}); |
25
|
|
|
|
26
|
|
|
Carbon::macro('toMediumTimeString', function() { |
27
|
3 |
|
return Calendar::formatTime($this, 'medium'); |
|
|
|
|
28
|
144 |
|
}); |
29
|
|
|
|
30
|
|
|
Carbon::macro('toLongTimeString', function() { |
31
|
3 |
|
return Calendar::formatTime($this, 'long'); |
|
|
|
|
32
|
144 |
|
}); |
33
|
|
|
|
34
|
|
|
Carbon::macro('toFullTimeString', function() { |
35
|
3 |
|
return Calendar::formatTime($this, 'full'); |
|
|
|
|
36
|
144 |
|
}); |
37
|
|
|
|
38
|
|
|
Carbon::macro('toShortDatetimeString', function() { |
39
|
3 |
|
return Calendar::formatDatetime($this, 'short'); |
|
|
|
|
40
|
144 |
|
}); |
41
|
|
|
|
42
|
|
|
Carbon::macro('toMediumDatetimeString', function() { |
43
|
3 |
|
return Calendar::formatDatetime($this, 'medium'); |
|
|
|
|
44
|
144 |
|
}); |
45
|
|
|
|
46
|
|
|
Carbon::macro('toLongDatetimeString', function() { |
47
|
3 |
|
return Calendar::formatDatetime($this, 'long'); |
|
|
|
|
48
|
144 |
|
}); |
49
|
|
|
|
50
|
|
|
Carbon::macro('toFullDatetimeString', function() { |
51
|
|
|
return Calendar::formatDatetime($this, 'full'); |
|
|
|
|
52
|
|
|
}); |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.