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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1rEOm
function name:  (null)
number of ops:  10
compiled vars:  !0 = $range, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $2      'hisRange'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   26     3        INIT_METHOD_CALL                                         !0, 'run'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   27     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/1rEOm
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/1rEOm
function name:  run
number of ops:  25
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'print_r'
          1        FETCH_OBJ_R                                      ~1      's'
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
   15     4        INIT_FCALL                                               'range'
          5        FETCH_OBJ_R                                      ~3      's'
          6        SEND_VAL                                                 ~3
          7        FETCH_OBJ_R                                      ~4      'e'
          8        SEND_VAL                                                 ~4
          9        FETCH_OBJ_R                                      ~5      'r'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
   16    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   17    16        INIT_FCALL                                               'array_map'
         17        FETCH_THIS                                       ~9      
         18        INIT_ARRAY                                       ~10     ~9
         19        ADD_ARRAY_ELEMENT                                ~10     'fm'
         20        SEND_VAL                                                 ~10
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $11     
         23      > RETURN                                                   $11
   18    24*     > 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/1rEOm
function name:  fm
number of ops:  8
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     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
   22     7*     > RETURN                                                   null

End of function fm

End of class hisRange.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.78 ms | 1400 KiB | 23 Q