File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/Symfony/Bridge/PhpUnit Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,15 @@ public static function hrtime($asNumber = false)
109109 return [(int ) self ::$ now , (int ) $ ns ];
110110 }
111111
112+ public static function strtotime (string $ datetime , ?int $ timestamp = null ): false |int
113+ {
114+ if (null === $ timestamp ) {
115+ $ timestamp = self ::time ();
116+ }
117+
118+ return \strtotime ($ datetime , $ timestamp );
119+ }
120+
112121 public static function register ($ class ): void
113122 {
114123 $ self = static ::class;
@@ -161,6 +170,11 @@ function hrtime(\$asNumber = false)
161170{
162171 return \\ $ self::hrtime( \$asNumber);
163172}
173+
174+ function strtotime( \$datetime, \$timestamp = null)
175+ {
176+ return \\ $ self::strtotime( \$datetime, \$timestamp);
177+ }
164178EOPHP
165179 );
166180 }
You can’t perform that action at this time.
0 commit comments