3v4l.org

run code in 300+ PHP versions simultaneously
<?php class H { private $time; public function __construct($time) { $this->time = $time; } public function getTime() { return $this->time; } } $arr = [new H(-3600), new H(0), new H(-10)]; $highest = 0; for($i = 1; $i < count($arr); $i++) { if($arr[$i]->getTime() > $arr[$highest]->getTime()) $highest = $i; } var_dump($arr[$highest]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 16
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 16
Branch analysis from position: 29
Branch analysis from position: 16
Branch analysis from position: 25
filename:       /in/kXmNu
function name:  (null)
number of ops:  34
compiled vars:  !0 = $arr, !1 = $highest, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'H'
          1        SEND_VAL_EX                                              -3600
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~5      $3
          4        NEW                                              $6      'H'
          5        SEND_VAL_EX                                              0
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~5      $6
          8        NEW                                              $8      'H'
          9        SEND_VAL_EX                                              -10
         10        DO_FCALL                                      0          
         11        ADD_ARRAY_ELEMENT                                ~5      $8
         12        ASSIGN                                                   !0, ~5
   11    13        ASSIGN                                                   !1, 0
   12    14        ASSIGN                                                   !2, 1
         15      > JMP                                                      ->26
   13    16    >   FETCH_DIM_R                                      ~13     !0, !2
         17        INIT_METHOD_CALL                                         ~13, 'getTime'
         18        DO_FCALL                                      0  $14     
         19        FETCH_DIM_R                                      ~15     !0, !1
         20        INIT_METHOD_CALL                                         ~15, 'getTime'
         21        DO_FCALL                                      0  $16     
         22        IS_SMALLER                                               $16, $14
         23      > JMPZ                                                     ~17, ->25
   14    24    >   ASSIGN                                                   !1, !2
   12    25    >   PRE_INC                                                  !2
         26    >   COUNT                                            ~20     !0
         27        IS_SMALLER                                               !2, ~20
         28      > JMPNZ                                                    ~21, ->16
   16    29    >   INIT_FCALL                                               'var_dump'
         30        FETCH_DIM_R                                      ~22     !0, !1
         31        SEND_VAL                                                 ~22
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Class H:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kXmNu
function name:  __construct
number of ops:  4
compiled vars:  !0 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'time'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function __construct

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

End of function gettime

End of class H.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.56 ms | 1400 KiB | 15 Q