3v4l.org

run code in 300+ PHP versions simultaneously
<?php # For a more type-safe ==, we have ===. For a more type-safe <, we have… nothing. "123" < "0124", always, no matter what you do. Casting doesn’t help, either. $x = ("123" < "0124") ? "true" : "false"; $y = (int("123") < int("0124")) ? "true" : "false"; echo $x . "\n"; echo $y . "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
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: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
Branch analysis from position: 15
filename:       /in/k6EqL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > JMPZ                                                     <true>, ->3
          1    >   QM_ASSIGN                                        ~2      'true'
          2      > JMP                                                      ->4
          3    >   QM_ASSIGN                                        ~2      'false'
          4    >   ASSIGN                                                   !0, ~2
    5     5        INIT_FCALL_BY_NAME                                       'int'
          6        SEND_VAL_EX                                              '123'
          7        DO_FCALL                                      0  $4      
          8        INIT_FCALL_BY_NAME                                       'int'
          9        SEND_VAL_EX                                              '0124'
         10        DO_FCALL                                      0  $5      
         11        IS_SMALLER                                               $4, $5
         12      > JMPZ                                                     ~6, ->15
         13    >   QM_ASSIGN                                        ~7      'true'
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~7      'false'
         16    >   ASSIGN                                                   !1, ~7
    6    17        CONCAT                                           ~9      !0, '%0A'
         18        ECHO                                                     ~9
    7    19        CONCAT                                           ~10     !1, '%0A'
         20        ECHO                                                     ~10
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.86 ms | 1398 KiB | 13 Q