3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Anagrafica { private $contactableFrom; private $contactableTo; public function getContactableFrom () { return $this->contactableFrom; } public function setContactableFrom ($cF) { $this->contactableFrom = $cF; } public function getContactableTo () { return $this->contactableTo; } public function setContactableTo ($cT) { $this->contactableTo = $cT; } } $anagrafica = new Anagrafica(); $contactableFrom = ($anagrafica->getContactableFrom()) ? $anagrafica->getContactableFrom()->format('His') : '080000'; $contactableTo = ($anagrafica->getContactableTo()) ? $anagrafica->getContactableTo()->format('His') : '220000'; $currentTime = (new \DateTime())->format('His'); if ($currentTime < $contactableFrom || $currentTime > $contactableTo) { echo 'false'; } else { echo 'true'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 47) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
Branch analysis from position: 25
2 jumps found. (Code = 47) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
Branch analysis from position: 37
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
Branch analysis from position: 25
filename:       /in/3NuFB
function name:  (null)
number of ops:  42
compiled vars:  !0 = $anagrafica, !1 = $contactableFrom, !2 = $contactableTo, !3 = $currentTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $4      'Anagrafica'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   26     3        INIT_METHOD_CALL                                         !0, 'getContactableFrom'
          4        DO_FCALL                                      0  $7      
          5      > JMPZ                                                     $7, ->13
   27     6    >   INIT_METHOD_CALL                                         !0, 'getContactableFrom'
          7        DO_FCALL                                      0  $8      
          8        INIT_METHOD_CALL                                         $8, 'format'
          9        SEND_VAL_EX                                              'His'
         10        DO_FCALL                                      0  $9      
         11        QM_ASSIGN                                        ~10     $9
         12      > JMP                                                      ->14
   28    13    >   QM_ASSIGN                                        ~10     '080000'
   26    14    >   ASSIGN                                                   !1, ~10
   29    15        INIT_METHOD_CALL                                         !0, 'getContactableTo'
         16        DO_FCALL                                      0  $12     
         17      > JMPZ                                                     $12, ->25
   30    18    >   INIT_METHOD_CALL                                         !0, 'getContactableTo'
         19        DO_FCALL                                      0  $13     
         20        INIT_METHOD_CALL                                         $13, 'format'
         21        SEND_VAL_EX                                              'His'
         22        DO_FCALL                                      0  $14     
         23        QM_ASSIGN                                        ~15     $14
         24      > JMP                                                      ->26
   31    25    >   QM_ASSIGN                                        ~15     '220000'
   29    26    >   ASSIGN                                                   !2, ~15
   32    27        NEW                                              $17     'DateTime'
         28        DO_FCALL                                      0          
         29        INIT_METHOD_CALL                                         $17, 'format'
         30        SEND_VAL_EX                                              'His'
         31        DO_FCALL                                      0  $19     
         32        ASSIGN                                                   !3, $19
   34    33        IS_SMALLER                                       ~21     !3, !1
         34      > JMPNZ_EX                                         ~21     ~21, ->37
         35    >   IS_SMALLER                                       ~22     !2, !3
         36        BOOL                                             ~21     ~22
         37    > > JMPZ                                                     ~21, ->40
   35    38    >   ECHO                                                     'false'
         39      > JMP                                                      ->41
   37    40    >   ECHO                                                     'true'
   38    41    > > RETURN                                                   1

Class Anagrafica:
Function getcontactablefrom:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3NuFB
function name:  getContactableFrom
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'contactableFrom'
          1      > RETURN                                                   ~0
    9     2*     > RETURN                                                   null

End of function getcontactablefrom

Function setcontactablefrom:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3NuFB
function name:  setContactableFrom
number of ops:  4
compiled vars:  !0 = $cF
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'contactableFrom'
          2        OP_DATA                                                  !0
   13     3      > RETURN                                                   null

End of function setcontactablefrom

Function getcontactableto:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3NuFB
function name:  getContactableTo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~0      'contactableTo'
          1      > RETURN                                                   ~0
   17     2*     > RETURN                                                   null

End of function getcontactableto

Function setcontactableto:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3NuFB
function name:  setContactableTo
number of ops:  4
compiled vars:  !0 = $cT
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        ASSIGN_OBJ                                               'contactableTo'
          2        OP_DATA                                                  !0
   21     3      > RETURN                                                   null

End of function setcontactableto

End of class Anagrafica.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.38 ms | 1399 KiB | 13 Q