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($InfIsGreatest and $InfIsGreatest == $arrayIsGreatest || $arrayIsGreatest and $arrayIsGreatest == $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 = 40
Branch analysis from position: 36
2 jumps found. (Code = 47) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
2 jumps found. (Code = 46) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 39
Branch analysis from position: 40
Branch analysis from position: 32
Branch analysis from position: 26
Branch analysis from position: 20
filename:       /in/og1Ng
function name:  (null)
number of ops:  46
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
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, INF
    7     1        ASSIGN                                                   !1, <array>
    8     2        CAST                                          8  ~14     !1
          3        ASSIGN                                                   !2, ~14
   10     4        IS_SMALLER                                       ~16     !1, !0
          5        ASSIGN                                                   !3, ~16
   11     6        IS_SMALLER                                       ~18     !2, !0
          7        ASSIGN                                                   !4, ~18
   13     8        IS_SMALLER                                       ~20     !0, !1
          9        ASSIGN                                                   !5, ~20
   14    10        IS_SMALLER                                       ~22     !2, !1
         11        ASSIGN                                                   !6, ~22
   16    12        IS_SMALLER                                       ~24     !0, !2
         13        ASSIGN                                                   !7, ~24
   17    14        IS_SMALLER                                       ~26     <array>, !2
         15        ASSIGN                                                   !8, ~26
   21    16        INIT_FCALL                                               'var_dump'
         17        ASSIGN                                           ~28     !9, !4
         18      > JMPZ_EX                                          ~28     ~28, ->20
         19    >   BOOL                                             ~28     !3
         20    >   SEND_VAL                                                 ~28
         21        DO_ICALL                                                 
   24    22        INIT_FCALL                                               'var_dump'
         23        ASSIGN                                           ~30     !10, !5
         24      > JMPZ_EX                                          ~30     ~30, ->26
         25    >   BOOL                                             ~30     !6
         26    >   SEND_VAL                                                 ~30
         27        DO_ICALL                                                 
   27    28        INIT_FCALL                                               'var_dump'
         29        ASSIGN                                           ~32     !11, !7
         30      > JMPZ_EX                                          ~32     ~32, ->32
         31    >   BOOL                                             ~32     !8
         32    >   SEND_VAL                                                 ~32
         33        DO_ICALL                                                 
   30    34        INIT_FCALL                                               'var_dump'
         35      > JMPZ_EX                                          ~34     !9, ->40
         36    >   IS_EQUAL                                         ~35     !9, !10
         37      > JMPNZ_EX                                         ~35     ~35, ->39
         38    >   BOOL                                             ~35     !10
         39    >   BOOL                                             ~34     ~35
         40    > > JMPZ_EX                                          ~34     ~34, ->43
         41    >   IS_EQUAL                                         ~36     !10, !11
         42        BOOL                                             ~34     ~36
         43    >   SEND_VAL                                                 ~34
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.19 ms | 1400 KiB | 15 Q