3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Process{ protected $valuationEstimatesArray; function __construct(){ $this->setValuationEstiamtesArray(); } function setValuationEstiamtesArray(){ $this->valuationEstimatesArray[1]['minPropertyValue'] = 100; $this->valuationEstimatesArray[1]['maxPropertyValue'] = 200; $this->valuationEstimatesArray[1]['valuationEstimate'] = 50; $this->valuationEstimatesArray[2]['minPropertyValue'] = 200; $this->valuationEstimatesArray[2]['maxPropertyValue'] = 300; $this->valuationEstimatesArray[2]['valuationEstimate'] = 100; $this->valuationEstimatesArray[3]['minPropertyValue'] = 300; $this->valuationEstimatesArray[3]['maxPropertyValue'] = 400; $this->valuationEstimatesArray[3]['valuationEstimate'] = 200; } function outputValues($search){ foreach($this->valuationEstimatesArray as $id=>$array){ if((($array['minPropertyValue'] - $search)< 0) AND (($array['maxPropertyValue'] - $search) > 0)){ echo $array['valuationEstimate']; } } } } $proc = new Process; $proc->outputValues(150);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WYiT6
function name:  (null)
number of ops:  7
compiled vars:  !0 = $proc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   NEW                                              $1      'Process'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   37     3        INIT_METHOD_CALL                                         !0, 'outputValues'
          4        SEND_VAL_EX                                              150
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Process:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WYiT6
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_METHOD_CALL                                         'setValuationEstiamtesArray'
          1        DO_FCALL                                      0          
   10     2      > RETURN                                                   null

End of function __construct

Function setvaluationestiamtesarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WYiT6
function name:  setValuationEstiamtesArray
number of ops:  37
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_W                                      $0      'valuationEstimatesArray'
          1        FETCH_DIM_W                                      $1      $0, 1
          2        ASSIGN_DIM                                               $1, 'minPropertyValue'
          3        OP_DATA                                                  100
   14     4        FETCH_OBJ_W                                      $3      'valuationEstimatesArray'
          5        FETCH_DIM_W                                      $4      $3, 1
          6        ASSIGN_DIM                                               $4, 'maxPropertyValue'
          7        OP_DATA                                                  200
   15     8        FETCH_OBJ_W                                      $6      'valuationEstimatesArray'
          9        FETCH_DIM_W                                      $7      $6, 1
         10        ASSIGN_DIM                                               $7, 'valuationEstimate'
         11        OP_DATA                                                  50
   17    12        FETCH_OBJ_W                                      $9      'valuationEstimatesArray'
         13        FETCH_DIM_W                                      $10     $9, 2
         14        ASSIGN_DIM                                               $10, 'minPropertyValue'
         15        OP_DATA                                                  200
   18    16        FETCH_OBJ_W                                      $12     'valuationEstimatesArray'
         17        FETCH_DIM_W                                      $13     $12, 2
         18        ASSIGN_DIM                                               $13, 'maxPropertyValue'
         19        OP_DATA                                                  300
   19    20        FETCH_OBJ_W                                      $15     'valuationEstimatesArray'
         21        FETCH_DIM_W                                      $16     $15, 2
         22        ASSIGN_DIM                                               $16, 'valuationEstimate'
         23        OP_DATA                                                  100
   22    24        FETCH_OBJ_W                                      $18     'valuationEstimatesArray'
         25        FETCH_DIM_W                                      $19     $18, 3
         26        ASSIGN_DIM                                               $19, 'minPropertyValue'
         27        OP_DATA                                                  300
   23    28        FETCH_OBJ_W                                      $21     'valuationEstimatesArray'
         29        FETCH_DIM_W                                      $22     $21, 3
         30        ASSIGN_DIM                                               $22, 'maxPropertyValue'
         31        OP_DATA                                                  400
   24    32        FETCH_OBJ_W                                      $24     'valuationEstimatesArray'
         33        FETCH_DIM_W                                      $25     $24, 3
         34        ASSIGN_DIM                                               $25, 'valuationEstimate'
         35        OP_DATA                                                  200
   25    36      > RETURN                                                   null

End of function setvaluationestiamtesarray

Function outputvalues:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 13
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/WYiT6
function name:  outputValues
number of ops:  19
compiled vars:  !0 = $search, !1 = $array, !2 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   28     1        FETCH_OBJ_R                                      ~3      'valuationEstimatesArray'
          2      > FE_RESET_R                                       $4      ~3, ->17
          3    > > FE_FETCH_R                                       ~5      $4, !1, ->17
          4    >   ASSIGN                                                   !2, ~5
   29     5        FETCH_DIM_R                                      ~7      !1, 'minPropertyValue'
          6        SUB                                              ~8      ~7, !0
          7        IS_SMALLER                                       ~9      ~8, 0
          8      > JMPZ_EX                                          ~9      ~9, ->13
          9    >   FETCH_DIM_R                                      ~10     !1, 'maxPropertyValue'
         10        SUB                                              ~11     ~10, !0
         11        IS_SMALLER                                       ~12     0, ~11
         12        BOOL                                             ~9      ~12
         13    > > JMPZ                                                     ~9, ->16
   30    14    >   FETCH_DIM_R                                      ~13     !1, 'valuationEstimate'
         15        ECHO                                                     ~13
   28    16    > > JMP                                                      ->3
         17    >   FE_FREE                                                  $4
   33    18      > RETURN                                                   null

End of function outputvalues

End of class Process.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.5 ms | 1403 KiB | 13 Q