3v4l.org

run code in 300+ PHP versions simultaneously
<?php class appendiceHelper { public $document; public $documentDealer; public $documentDate; public $Luglio2015; public $Ottobre2015; public $special; public function __construct($dealer,$date) { $this->documentDealer = $dealer; $this->documentDate = new DateTime($date); $this->document = "pdf/appendice_EM.pdf"; $this->special = 0; $this->IsSpecial(); $this->Luglio2015 = new DateTime(); $this->Luglio2015->setDate(2015, 7, 1); $this->Luglio2015->setTime(00, 01); $this->Ottobre2015 = new DateTime(); $this->Ottobre2015->setDate(2015, 10, 1); $this->Ottobre2015->setTime(00, 01); } private function IsSpecial() { //Dealer Stracciari - Authos if ($this->documentDealer == 882) $this->special = 1; if ($this->documentDealer == 1821) $this->special = 1; if ($this->documentDealer == 2633) $this->special = 1; if ($this->documentDealer == 3194) $this->special = 1; if ($this->documentDealer == 3206) $this->special = 1; if ($this->documentDealer == 3210) $this->special = 1; if ($this->documentDealer == 3218) $this->special = 1; if ($this->documentDealer == 3223) $this->special = 1; } public function getDocument() { $this->document = "pdf/app_cert_4.pdf"; $intervalLuglio2015 = $this->Luglio2015->diff($this->documentDate)->invert; $intervalOttobre2015 = $this->Ottobre2015->diff($this->documentDate)->invert; if($intervalOttobre2015 == 1) $this->document = "pdf/app_cert_2.pdf"; if($intervalLuglio2015 == 1) $this->document = "pdf/app_cert_1.pdf"; if($this->special == 1) { $this->document = "pdf/app_cert_5_special.pdf"; if($intervalOttobre2015 == 1) $this->document = "pdf/app_cert_3_special.pdf"; if($intervalLuglio2015 == 1) $this->document = "pdf/app_cert_1.pdf"; } return $this->document; } } $test = new appendiceHelper(1, new DateTime()) ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iiYSS
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   NEW                                              $1      'appendiceHelper'
          1        SEND_VAL_EX                                              1
          2        NEW                                              $2      'DateTime'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $2
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
   69     7      > RETURN                                                   1

Class appendiceHelper:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iiYSS
function name:  __construct
number of ops:  46
compiled vars:  !0 = $dealer, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        ASSIGN_OBJ                                               'documentDealer'
          3        OP_DATA                                                  !0
   14     4        NEW                                              $4      'DateTime'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
          7        ASSIGN_OBJ                                               'documentDate'
          8        OP_DATA                                                  $4
   15     9        ASSIGN_OBJ                                               'document'
         10        OP_DATA                                                  'pdf%2Fappendice_EM.pdf'
   16    11        ASSIGN_OBJ                                               'special'
         12        OP_DATA                                                  0
   17    13        INIT_METHOD_CALL                                         'IsSpecial'
         14        DO_FCALL                                      0          
   19    15        NEW                                              $10     'DateTime'
         16        DO_FCALL                                      0          
         17        ASSIGN_OBJ                                               'Luglio2015'
         18        OP_DATA                                                  $10
   20    19        FETCH_OBJ_R                                      ~12     'Luglio2015'
         20        INIT_METHOD_CALL                                         ~12, 'setDate'
         21        SEND_VAL_EX                                              2015
         22        SEND_VAL_EX                                              7
         23        SEND_VAL_EX                                              1
         24        DO_FCALL                                      0          
   21    25        FETCH_OBJ_R                                      ~14     'Luglio2015'
         26        INIT_METHOD_CALL                                         ~14, 'setTime'
         27        SEND_VAL_EX                                              0
         28        SEND_VAL_EX                                              1
         29        DO_FCALL                                      0          
   23    30        NEW                                              $17     'DateTime'
         31        DO_FCALL                                      0          
         32        ASSIGN_OBJ                                               'Ottobre2015'
         33        OP_DATA                                                  $17
   24    34        FETCH_OBJ_R                                      ~19     'Ottobre2015'
         35        INIT_METHOD_CALL                                         ~19, 'setDate'
         36        SEND_VAL_EX                                              2015
         37        SEND_VAL_EX                                              10
         38        SEND_VAL_EX                                              1
         39        DO_FCALL                                      0          
   25    40        FETCH_OBJ_R                                      ~21     'Ottobre2015'
         41        INIT_METHOD_CALL                                         ~21, 'setTime'
         42        SEND_VAL_EX                                              0
         43        SEND_VAL_EX                                              1
         44        DO_FCALL                                      0          
   28    45      > RETURN                                                   null

End of function __construct

Function isspecial:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 35
Branch analysis from position: 30
Branch analysis from position: 25
Branch analysis from position: 20
Branch analysis from position: 15
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/iiYSS
function name:  IsSpecial
number of ops:  41
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   FETCH_OBJ_R                                      ~0      'documentDealer'
          1        IS_EQUAL                                                 ~0, 882
          2      > JMPZ                                                     ~1, ->5
          3    >   ASSIGN_OBJ                                               'special'
          4        OP_DATA                                                  1
   34     5    >   FETCH_OBJ_R                                      ~3      'documentDealer'
          6        IS_EQUAL                                                 ~3, 1821
          7      > JMPZ                                                     ~4, ->10
          8    >   ASSIGN_OBJ                                               'special'
          9        OP_DATA                                                  1
   35    10    >   FETCH_OBJ_R                                      ~6      'documentDealer'
         11        IS_EQUAL                                                 ~6, 2633
         12      > JMPZ                                                     ~7, ->15
         13    >   ASSIGN_OBJ                                               'special'
         14        OP_DATA                                                  1
   36    15    >   FETCH_OBJ_R                                      ~9      'documentDealer'
         16        IS_EQUAL                                                 ~9, 3194
         17      > JMPZ                                                     ~10, ->20
         18    >   ASSIGN_OBJ                                               'special'
         19        OP_DATA                                                  1
   37    20    >   FETCH_OBJ_R                                      ~12     'documentDealer'
         21        IS_EQUAL                                                 ~12, 3206
         22      > JMPZ                                                     ~13, ->25
         23    >   ASSIGN_OBJ                                               'special'
         24        OP_DATA                                                  1
   38    25    >   FETCH_OBJ_R                                      ~15     'documentDealer'
         26        IS_EQUAL                                                 ~15, 3210
         27      > JMPZ                                                     ~16, ->30
         28    >   ASSIGN_OBJ                                               'special'
         29        OP_DATA                                                  1
   39    30    >   FETCH_OBJ_R                                      ~18     'documentDealer'
         31        IS_EQUAL                                                 ~18, 3218
         32      > JMPZ                                                     ~19, ->35
         33    >   ASSIGN_OBJ                                               'special'
         34        OP_DATA                                                  1
   40    35    >   FETCH_OBJ_R                                      ~21     'documentDealer'
         36        IS_EQUAL                                                 ~21, 3223
         37      > JMPZ                                                     ~22, ->40
         38    >   ASSIGN_OBJ                                               'special'
         39        OP_DATA                                                  1
   41    40    > > RETURN                                                   null

End of function isspecial

Function getdocument:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 39
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 35
Branch analysis from position: 39
Branch analysis from position: 26
Branch analysis from position: 22
filename:       /in/iiYSS
function name:  getDocument
number of ops:  42
compiled vars:  !0 = $intervalLuglio2015, !1 = $intervalOttobre2015
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   ASSIGN_OBJ                                               'document'
          1        OP_DATA                                                  'pdf%2Fapp_cert_4.pdf'
   46     2        FETCH_OBJ_R                                      ~3      'Luglio2015'
          3        INIT_METHOD_CALL                                         ~3, 'diff'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $4      'documentDate'
          6        SEND_FUNC_ARG                                            $4
          7        DO_FCALL                                      0  $5      
          8        FETCH_OBJ_R                                      ~6      $5, 'invert'
          9        ASSIGN                                                   !0, ~6
   47    10        FETCH_OBJ_R                                      ~8      'Ottobre2015'
         11        INIT_METHOD_CALL                                         ~8, 'diff'
         12        CHECK_FUNC_ARG                                           
         13        FETCH_OBJ_FUNC_ARG                               $9      'documentDate'
         14        SEND_FUNC_ARG                                            $9
         15        DO_FCALL                                      0  $10     
         16        FETCH_OBJ_R                                      ~11     $10, 'invert'
         17        ASSIGN                                                   !1, ~11
   50    18        IS_EQUAL                                                 !1, 1
         19      > JMPZ                                                     ~13, ->22
         20    >   ASSIGN_OBJ                                               'document'
         21        OP_DATA                                                  'pdf%2Fapp_cert_2.pdf'
   51    22    >   IS_EQUAL                                                 !0, 1
         23      > JMPZ                                                     ~15, ->26
         24    >   ASSIGN_OBJ                                               'document'
         25        OP_DATA                                                  'pdf%2Fapp_cert_1.pdf'
   53    26    >   FETCH_OBJ_R                                      ~17     'special'
         27        IS_EQUAL                                                 ~17, 1
         28      > JMPZ                                                     ~18, ->39
   55    29    >   ASSIGN_OBJ                                               'document'
         30        OP_DATA                                                  'pdf%2Fapp_cert_5_special.pdf'
   56    31        IS_EQUAL                                                 !1, 1
         32      > JMPZ                                                     ~20, ->35
         33    >   ASSIGN_OBJ                                               'document'
         34        OP_DATA                                                  'pdf%2Fapp_cert_3_special.pdf'
   57    35    >   IS_EQUAL                                                 !0, 1
         36      > JMPZ                                                     ~22, ->39
         37    >   ASSIGN_OBJ                                               'document'
         38        OP_DATA                                                  'pdf%2Fapp_cert_1.pdf'
   62    39    >   FETCH_OBJ_R                                      ~24     'document'
         40      > RETURN                                                   ~24
   63    41*     > RETURN                                                   null

End of function getdocument

End of class appendiceHelper.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.22 ms | 1398 KiB | 13 Q