3v4l.org

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

Class Anagrafica:
Function getcontactablefrom:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RWdh4
function name:  getContactableFrom
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'contactableFrom'
          1      > RETURN                                                   ~0
   10     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/RWdh4
function name:  setContactableFrom
number of ops:  4
compiled vars:  !0 = $contactableFrom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        ASSIGN_OBJ                                               'contactableFrom'
          2        OP_DATA                                                  !0
   15     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/RWdh4
function name:  getContactableTo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                      ~0      'contactableTo'
          1      > RETURN                                                   ~0
   20     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/RWdh4
function name:  setContactableTo
number of ops:  4
compiled vars:  !0 = $contactableTo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   24     1        ASSIGN_OBJ                                               'contactableTo'
          2        OP_DATA                                                  !0
   25     3      > RETURN                                                   null

End of function setcontactableto

End of class Anagrafica.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.26 ms | 1403 KiB | 13 Q