3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class hisRange { public $s, $e, $r, $f; function __constructor($s= '00:00:00', $e= '23:59:59', $r= 3600, $f= 'H:00:00') { $this->s = strtotime($s); $this->e = strtotime($e); $this->r = $r; $this->f = $f; } function run() { print_r($this->s); $r = range($this->s, $this->e, $this->r); print_r($r); return array_map(array($this, 'fm'), $r); } function fm($t) { return date($this->f, $t); } } $range = new hisRange(); $s = $range->run(); print_r($s);

preferences:
37.3 ms | 402 KiB | 5 Q