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() { return array_map(array($this, 'fm'), range($this->s, $this->e, $this->r)); } function fm($t) { return date($this->f, $t); } } $range = new hisRange(); $s = $range->run(); print_r($s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P2mIA
function name:  (null)
number of ops:  10
compiled vars:  !0 = $range, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $2      'hisRange'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   23     3        INIT_METHOD_CALL                                         !0, 'run'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   24     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class hisRange:
Function __constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P2mIA
function name:  __constructor
number of ops:  19
compiled vars:  !0 = $s, !1 = $e, !2 = $r, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      '00%3A00%3A00'
          1        RECV_INIT                                        !1      '23%3A59%3A59'
          2        RECV_INIT                                        !2      3600
          3        RECV_INIT                                        !3      'H%3A00%3A00'
    7     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        ASSIGN_OBJ                                               's'
          8        OP_DATA                                                  $5
    8     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        ASSIGN_OBJ                                               'e'
         13        OP_DATA                                                  $7
    9    14        ASSIGN_OBJ                                               'r'
         15        OP_DATA                                                  !2
   10    16        ASSIGN_OBJ                                               'f'
         17        OP_DATA                                                  !3
   11    18      > RETURN                                                   null

End of function __constructor

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P2mIA
function name:  run
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'array_map'
          1        FETCH_THIS                                       ~0      
          2        INIT_ARRAY                                       ~1      ~0
          3        ADD_ARRAY_ELEMENT                                ~1      'fm'
          4        SEND_VAL                                                 ~1
          5        INIT_FCALL                                               'range'
          6        FETCH_OBJ_R                                      ~2      's'
          7        SEND_VAL                                                 ~2
          8        FETCH_OBJ_R                                      ~3      'e'
          9        SEND_VAL                                                 ~3
         10        FETCH_OBJ_R                                      ~4      'r'
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15      > RETURN                                                   $6
   15    16*     > RETURN                                                   null

End of function run

Function fm:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P2mIA
function name:  fm
number of ops:  8
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        INIT_FCALL                                               'date'
          2        FETCH_OBJ_R                                      ~1      'f'
          3        SEND_VAL                                                 ~1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
   19     7*     > RETURN                                                   null

End of function fm

End of class hisRange.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.7 ms | 1405 KiB | 23 Q