3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compareNumeric($x, $y) { $x = floatval($x); $y = floatval($y); return $x > $y ? 1 : ($x === $y ? 0 : -1); } echo compareNumeric(true, false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KciSs
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'comparenumeric'
          1        SEND_VAL                                                 <true>
          2        SEND_VAL                                                 <false>
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function comparenumeric:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KciSs
function name:  compareNumeric
number of ops:  18
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        CAST                                          5  ~2      !0
          3        ASSIGN                                                   !0, ~2
    6     4        CAST                                          5  ~4      !1
          5        ASSIGN                                                   !1, ~4
    8     6        IS_SMALLER                                               !1, !0
          7      > JMPZ                                                     ~6, ->10
          8    >   QM_ASSIGN                                        ~7      1
          9      > JMP                                                      ->16
         10    >   IS_IDENTICAL                                             !0, !1
         11      > JMPZ                                                     ~8, ->14
         12    >   QM_ASSIGN                                        ~9      0
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~9      -1
         15    >   QM_ASSIGN                                        ~7      ~9
         16    > > RETURN                                                   ~7
    9    17*     > RETURN                                                   null

End of function comparenumeric

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.38 ms | 1398 KiB | 14 Q