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(); $anagrafica->setContactableFrom(null); $anagrafica->setContactableTo(null); $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 = 12, Position 2 = 19
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 47) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 31
2 jumps found. (Code = 47) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
Branch analysis from position: 43
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
Branch analysis from position: 31
filename:       /in/GZ4pQ
function name:  (null)
number of ops:  48
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
   25     3        INIT_METHOD_CALL                                         !0, 'setContactableFrom'
          4        SEND_VAL_EX                                              null
          5        DO_FCALL                                      0          
   26     6        INIT_METHOD_CALL                                         !0, 'setContactableTo'
          7        SEND_VAL_EX                                              null
          8        DO_FCALL                                      0          
   28     9        INIT_METHOD_CALL                                         !0, 'getContactableFrom'
         10        DO_FCALL                                      0  $9      
         11      > JMPZ                                                     $9, ->19
   29    12    >   INIT_METHOD_CALL                                         !0, 'getContactableFrom'
         13        DO_FCALL                                      0  $10     
         14        INIT_METHOD_CALL                                         $10, 'format'
         15        SEND_VAL_EX                                              'His'
         16        DO_FCALL                                      0  $11     
         17        QM_ASSIGN                                        ~12     $11
         18      > JMP                                                      ->20
   30    19    >   QM_ASSIGN                                        ~12     '080000'
   28    20    >   ASSIGN                                                   !1, ~12
   31    21        INIT_METHOD_CALL                                         !0, 'getContactableTo'
         22        DO_FCALL                                      0  $14     
         23      > JMPZ                                                     $14, ->31
   32    24    >   INIT_METHOD_CALL                                         !0, 'getContactableTo'
         25        DO_FCALL                                      0  $15     
         26        INIT_METHOD_CALL                                         $15, 'format'
         27        SEND_VAL_EX                                              'His'
         28        DO_FCALL                                      0  $16     
         29        QM_ASSIGN                                        ~17     $16
         30      > JMP                                                      ->32
   33    31    >   QM_ASSIGN                                        ~17     '220000'
   31    32    >   ASSIGN                                                   !2, ~17
   34    33        NEW                                              $19     'DateTime'
         34        DO_FCALL                                      0          
         35        INIT_METHOD_CALL                                         $19, 'format'
         36        SEND_VAL_EX                                              'His'
         37        DO_FCALL                                      0  $21     
         38        ASSIGN                                                   !3, $21
   36    39        IS_SMALLER                                       ~23     !3, !1
         40      > JMPNZ_EX                                         ~23     ~23, ->43
         41    >   IS_SMALLER                                       ~24     !2, !3
         42        BOOL                                             ~23     ~24
         43    > > JMPZ                                                     ~23, ->46
   37    44    >   ECHO                                                     'false'
         45      > JMP                                                      ->47
   39    46    >   ECHO                                                     'true'
   40    47    > > RETURN                                                   1

Class Anagrafica:
Function getcontactablefrom:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GZ4pQ
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/GZ4pQ
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/GZ4pQ
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/GZ4pQ
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:
165.3 ms | 1403 KiB | 13 Q