3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Which one is greatest? */ $inf = INF; $array = array(); $object = (object) $array; $InfGreaterThanArray = ($inf > $array); $InfGreaterThanObject = ($inf > $object); $arrayGreaterThanInf = ($array > $inf); $arrayGreaterThanObject = ($array > $object); $objectGreaterThanInf = ($object > $inf); $objectGreaterThanArray = ($object > array()); // Test1: Is INF greatest? # boolean(false) var_dump($InfIsGreatest = $InfGreaterThanObject and $InfGreaterThanArray); // Test2: Is Array greatest? # boolean(false) var_dump($arrayIsGreatest = $arrayGreaterThanInf and $arrayGreaterThanObject); // Test3: Is Object greatest? # boolean(false) var_dump($objectIsGreatest = $objectGreaterThanInf and $objectGreaterThanArray); // Test4: Undefined? # boolean(true) var_dump( $undefined = ( ($InfIsGreatest and $InfIsGreatest == $arrayIsGreatest) || ($arrayIsGreatest and $arrayIsGreatest == $objectIsGreatest) || (!$InfIsGreatest and $InfIsGreatest == $arrayIsGreatest and $InfIsGreatest == $objectIsGreatest) ) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
2 jumps found. (Code = 46) Position 1 = 31, Position 2 = 32
Branch analysis from position: 31
2 jumps found. (Code = 46) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
2 jumps found. (Code = 47) Position 1 = 39, Position 2 = 43
Branch analysis from position: 39
2 jumps found. (Code = 46) Position 1 = 40, Position 2 = 42
Branch analysis from position: 40
2 jumps found. (Code = 47) Position 1 = 44, Position 2 = 52
Branch analysis from position: 44
2 jumps found. (Code = 46) Position 1 = 46, Position 2 = 48
Branch analysis from position: 46
2 jumps found. (Code = 46) Position 1 = 49, Position 2 = 51
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
Branch analysis from position: 48
Branch analysis from position: 52
Branch analysis from position: 42
Branch analysis from position: 43
Branch analysis from position: 38
Branch analysis from position: 32
Branch analysis from position: 26
Branch analysis from position: 20
filename:       /in/FtF6I
function name:  (null)
number of ops:  56
compiled vars:  !0 = $inf, !1 = $array, !2 = $object, !3 = $InfGreaterThanArray, !4 = $InfGreaterThanObject, !5 = $arrayGreaterThanInf, !6 = $arrayGreaterThanObject, !7 = $objectGreaterThanInf, !8 = $objectGreaterThanArray, !9 = $InfIsGreatest, !10 = $arrayIsGreatest, !11 = $objectIsGreatest, !12 = $undefined
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, INF
    7     1        ASSIGN                                                   !1, <array>
    8     2        CAST                                          8  ~15     !1
          3        ASSIGN                                                   !2, ~15
   10     4        IS_SMALLER                                       ~17     !1, !0
          5        ASSIGN                                                   !3, ~17
   11     6        IS_SMALLER                                       ~19     !2, !0
          7        ASSIGN                                                   !4, ~19
   13     8        IS_SMALLER                                       ~21     !0, !1
          9        ASSIGN                                                   !5, ~21
   14    10        IS_SMALLER                                       ~23     !2, !1
         11        ASSIGN                                                   !6, ~23
   16    12        IS_SMALLER                                       ~25     !0, !2
         13        ASSIGN                                                   !7, ~25
   17    14        IS_SMALLER                                       ~27     <array>, !2
         15        ASSIGN                                                   !8, ~27
   21    16        INIT_FCALL                                               'var_dump'
         17        ASSIGN                                           ~29     !9, !4
         18      > JMPZ_EX                                          ~29     ~29, ->20
         19    >   BOOL                                             ~29     !3
         20    >   SEND_VAL                                                 ~29
         21        DO_ICALL                                                 
   24    22        INIT_FCALL                                               'var_dump'
         23        ASSIGN                                           ~31     !10, !5
         24      > JMPZ_EX                                          ~31     ~31, ->26
         25    >   BOOL                                             ~31     !6
         26    >   SEND_VAL                                                 ~31
         27        DO_ICALL                                                 
   27    28        INIT_FCALL                                               'var_dump'
         29        ASSIGN                                           ~33     !11, !7
         30      > JMPZ_EX                                          ~33     ~33, ->32
         31    >   BOOL                                             ~33     !8
         32    >   SEND_VAL                                                 ~33
         33        DO_ICALL                                                 
   30    34        INIT_FCALL                                               'var_dump'
   32    35      > JMPZ_EX                                          ~35     !9, ->38
         36    >   IS_EQUAL                                         ~36     !9, !10
         37        BOOL                                             ~35     ~36
         38    > > JMPNZ_EX                                         ~35     ~35, ->43
   33    39    > > JMPZ_EX                                          ~37     !10, ->42
         40    >   IS_EQUAL                                         ~38     !10, !11
         41        BOOL                                             ~37     ~38
         42    >   BOOL                                             ~35     ~37
         43    > > JMPNZ_EX                                         ~35     ~35, ->52
   34    44    >   BOOL_NOT                                         ~39     !9
         45      > JMPZ_EX                                          ~39     ~39, ->48
         46    >   IS_EQUAL                                         ~40     !9, !10
         47        BOOL                                             ~39     ~40
         48    > > JMPZ_EX                                          ~39     ~39, ->51
         49    >   IS_EQUAL                                         ~41     !9, !11
         50        BOOL                                             ~39     ~41
         51    >   BOOL                                             ~35     ~39
   31    52    >   ASSIGN                                           ~42     !12, ~35
         53        SEND_VAL                                                 ~42
         54        DO_ICALL                                                 
   36    55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.55 ms | 1400 KiB | 15 Q