Skip to content

Commit 648d5da

Browse files
committed
Remove array_key_last() declaration for PHP < 7.3.0
1 parent 57b6c23 commit 648d5da

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

src/main/php/peer/server/AsyncServer.class.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@
2323
class AsyncServer extends Server {
2424
private $select= [], $tasks= [], $continuation= [];
2525

26-
static function __static() {
27-
28-
// For PHP < 7.3.0
29-
if (!function_exists('array_key_last')) {
30-
eval('function array_key_last($array) { end($array); return key($array); }');
31-
}
32-
}
33-
3426
/**
3527
* Adds server socket to listen on, associating protocol handler with it
3628
*

src/main/php/peer/server/AsynchronousServer.class.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ class AsynchronousServer extends ServerImplementation {
2323
private $terminate= false;
2424
private $select= [], $tasks= [], $continuation= [];
2525

26-
static function __static() {
27-
28-
// For PHP < 7.3.0
29-
if (!function_exists('array_key_last')) {
30-
eval('function array_key_last($array) { end($array); return key($array); }');
31-
}
32-
}
33-
3426
/**
3527
* Adds server socket to listen on, associating protocol handler with it
3628
*

0 commit comments

Comments
 (0)