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() { $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);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: range(): Passing null to parameter #3 ($step) of type int|float is deprecated in /in/uUQiO on line 14 Fatal error: Uncaught ValueError: range(): Argument #3 ($step) must not exceed the specified range in /in/uUQiO:14 Stack trace: #0 /in/uUQiO(14): range(NULL, NULL, 0) #1 /in/uUQiO(25): hisRange->run() #2 {main} thrown in /in/uUQiO on line 14
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
72.8 ms | 401 KiB | 8 Q